-
Notifications
You must be signed in to change notification settings - Fork 566
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
Add semconv v1.24.0 to otelhttp
#5092
base: main
Are you sure you want to change the base?
Add semconv v1.24.0 to otelhttp
#5092
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5092 +/- ##
=======================================
+ Coverage 61.2% 61.8% +0.5%
=======================================
Files 185 190 +5
Lines 11207 11444 +237
=======================================
+ Hits 6865 7076 +211
- Misses 4142 4163 +21
- Partials 200 205 +5
|
Removed Metrics Placeholders
@@ -0,0 +1,22 @@ | |||
# Migration Plan |
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.
when using both, which metric names do they get, or are the metric names the same?
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.
This could go one of two ways:
- Because the Metrics Semconv, and our package is not stable we just eat this breaking change. Then in the both we follow whatever we set for the instrumentation's Semantic Version (which should be 1.24.0 for both).
- We add an abstraction back in that makes the creation of the metrics (from the
MeterProvider
) and what names are used as part of this new package. This is basically what I've tried to remove in this package as much as possible.
I would very much not want to build an abstraction on this code path; it's what made it so hard to upgrade and will eventually leave us with an API surface that no longer makes sense, e.g., HTTPFlavor was something we eventually had to drop.
if attr, ok := methodLookup[strings.ToUpper(method)]; ok { | ||
attrs[0] = attr | ||
} else { | ||
// If the Original methos is not a standard HTTP method fallback to GET |
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.
nit: :s/methos/method
This change adds the new semantic version (v1.24.0) attribute producer to the semconv of otlehttp. The full PR is #5092 Part of #5331 --------- Co-authored-by: Aaron Clawson <[email protected]>
This change adds semantic convention v1.24.0 to
otlehttp
and the compatibility mode that was required in the v1.21.0 semantic convention.Scope
This is the first in a series of patches to fully finish out this feature. The goal is to show how the environment variable can be supported and how it can be used.
What was excluded to aid in reviewability, all can be added after:
HTTPServer
interface and supplied by new types.Benchmarks
A benchmark was added to aid in comparing. I've added the raw data to this gist.
First I wanted to make sure that this didn't introduce performance regressions to users using the default/old attributes:
Next I wanted to make sure the new way of attributes were not significantly different. I assumed that
http/dup
will take more time, because it has to deal with twice as many attributes, but I wanted to allocations to stay the same.Testing
I utilized the semantic convention checker, from PR4701, but modified, set to
http/dup
, and used two configs one for v1.20 and v1.24. I can put this onto a branch if someone would like to recreate this work.