OTEL: adding flags to cli traces#10974
Merged
milas merged 5 commits intodocker:mainfrom Sep 7, 2023
Merged
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #10974 +/- ##
==========================================
- Coverage 58.30% 57.65% -0.65%
==========================================
Files 124 127 +3
Lines 10912 11046 +134
==========================================
+ Hits 6362 6369 +7
- Misses 3922 4044 +122
- Partials 628 633 +5
☔ View full report in Codecov by Sentry. |
milas
suggested changes
Sep 6, 2023
Contributor
milas
left a comment
There was a problem hiding this comment.
Nice! LGTM, just a pedantic naming style request that's not your fault since I never documented it anywhere 😛
Comment on lines
+57
to
+58
| cmdSpan.SetAttributes(attribute.StringSlice("cliArgs", args)) | ||
| cmdSpan.SetAttributes(attribute.StringSlice("cliFlags", getFlags(cmd.Flags()))) |
Contributor
There was a problem hiding this comment.
Since span attributes are a single-level map, so far I've been separating logical groups with ., e.g. cli.args / cli.flags.
(I'm realizing I should add a TRACING.md to the repo here with some info...serious 🚌 factor right now)
Contributor
|
Ah, for your failures:
|
Signed-off-by: rvigus <[email protected]>
Signed-off-by: rvigus <[email protected]>
Signed-off-by: rvigus <[email protected]>
Signed-off-by: rvigus <[email protected]>
48f9952 to
1d2ac5d
Compare
milas
approved these changes
Sep 7, 2023
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.
What I did
Adds cli args and flags (e.g.
--timeout,--dry-run, etc) as attributes to cli trace data. These attributes are then picked up by the collector and made available to the end user.Related issue
https://docker.atlassian.net/browse/ENV-276