Conversation
added 5 commits
August 24, 2022 11:09
The rhai code had got a bit out of shape recently. This cleans things up a bit. I've also added a couple of tracing spans for tracing request and response processing.
to make it clearer what the span measures.
to see what that looks like in jaeger.
The rhai span doesn't need to duplicate the data from the supergraph span. That means, it doesn't really have any useful information, but that's what it is for now.
instrument looks like the right way to go, so get rid of the commented out _span commands.
This comment has been minimized.
This comment has been minimized.
added 2 commits
August 24, 2022 12:33
If you are processing multiple services in your rhai script, it will be helpful to have an attribute which identifies which service the span relates to. It's already fairly clear from the position in the processing pipeline, but a bit of extra information won't hurt.
o0Ignition0o
approved these changes
Aug 24, 2022
Contributor
o0Ignition0o
left a comment
There was a problem hiding this comment.
Super neat! I feel like this kinda opens new possibilities wrt telemetry in rhai, which we can explore... soon ™️ !
bnjjj
approved these changes
Aug 24, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If we add a tracing span to our rhai plugin, we can now reason (from a tracing span point of view) about requests within our rhai plugin. See the screenshot for what this looks like in jaeger.
If your router doesn't have an active rhai script, then this trace won't appear.
I've set the trace at info level. I think that's reasonable, but happy to change that if people think that's the wrong level.
also: tidy up the rhai code a little to reflect recent renaming and to make this simpler.