-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve tracing usage and examples #32
Merged
Merged
Conversation
This file contains 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
This is on top of #29 which should be merged first |
395418b
to
1bb68db
Compare
refi64
reviewed
Feb 28, 2024
oh oops I ended up with review comments from #29 in here didn't I 😅 it's mostly just small nits on that end though |
Merged
tracing_subscriber supports per-layer filtering. This partially works by the Filtered wrapper having a private thread-local variable as a backchannel to the Registry. So to have functional per-layer filtering the Filtered wrapper is required. Adjust the GitlabLayer constructor to actually create one wrapped in a Filtered, with a basic filter to only enable spans and events which have a gitlab related field Signed-off-by: Sjoerd Simons <[email protected]>
2327c04
to
f24933f
Compare
refi64
reviewed
Mar 1, 2024
refi64
reviewed
Mar 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other than single nit LGTM
Define tracing target gitlab_runner::gitlab::job as the stable span target that will add the gitlab.job field. This allows users to add that specifically to their filtering if they want to ensure the relevant gitlab job id gets logged even if no other spans or events from gitlab-runner crate are enabled. Signed-off-by: Sjoerd Simons <[email protected]>
Make the demo runners logging slighly more examplary by allowing it to be configurable as well as switching to json style if not run on a terminal. Signed-off-by: Sjoerd Simons <[email protected]>
By default cargo check doesn't check examples which caused a too low tracing_subscriber dependency to not be caught. Signed-off-by: Sjoerd Simons <[email protected]>
f24933f
to
0f61768
Compare
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.
No description provided.