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.
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
update HttpSemanticConventions for Instrumentation.AspNetCore #4537
update HttpSemanticConventions for Instrumentation.AspNetCore #4537
Changes from 11 commits
c60216f
8b892ac
9b5c800
d47b1f7
9215a07
f78aedf
b1fc737
4de47b4
357af6a
f2203e3
352f939
d03a1a5
14250da
cbd15c7
f2716a2
96ca6b0
85a9120
86ab41c
4da2eb7
808646b
406b24f
8796539
99eabb8
0933da2
8f7934c
2a6d88c
bf807eb
3020b62
e02b8c7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Are we clear on what this tag is meant for? And what does this value
context.Connection.RemotePort
represent?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.
I reviewed the spec and confirmed this was the wrong attribute. will change to
server.port
v1.20.0
https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/semantic_conventions/http.md#http-client
v1.21.0
https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/trace/semantic_conventions/http.md#http-server-semantic-conventions
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.
Regarding the value of
context.Connection.RemotePort
, the documentation states:This is not changed, it was mapped to the former attribute.
opentelemetry-dotnet/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
Lines 491 to 494 in 2a6d88c
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.
Some thoughts...
Just reading this work I found "New" and "Old" pretty confusing. Why not
Legacy
vsStable
or something along those lines?This is probably an issue for some users:
opentelemetry-dotnet/src/OpenTelemetry.Api/Internal/HttpSemanticConventionHelper.cs
Line 53 in 5d321ce
We should be using
IConfiguration
to get the switch.Shouldn't the environment key have HTTP in the name like
OTEL_HTTP_SEMCONV_STABILITY_OPT_IN
?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.
+1, I had similar concern here #4538 (comment)
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.
How strongly do you feel about this? :)
We can change the enum, but
New
andOld
shipped as part of OpenTelemetry.Api v1.5.0.It's
internal
so we CAN change it.But this would require re-releasing the Api library. (ie Instrumentation.AspNetCore would require an OpenTelemetry.Api v1.5.1).
Also, this is meant to be short lived. When these instrumentation libraries go stable this enum and helper class will be removed.
Can you please share an example of this?
That makes sense to me, but the spec defines OTEL_SEMCONV_STABILITY_OPT_IN
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.
The instrumentation libraries do not use this
enum
fromOpenTelemetry.Api
. They link to the file so each of the libraries have their own copy of it. You should be able to make the necessary changes without worrying about version ofOpenTelemetry.Api
.Note: This does not have to be done in this PR.