-
Notifications
You must be signed in to change notification settings - Fork 292
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
[Instrumentation.AWSLambda] Issue/aws lambda http server semantic conventions attributes #626
[Instrumentation.AWSLambda] Issue/aws lambda http server semantic conventions attributes #626
Conversation
- refactored internal Trace methods calls in order to access value returned by handler - check header also in APIGatewayProxyRequest.Headers collection - implemented setting of HTTP Server tags on Activity start
…equest + comment about headers doc
…tions-attributes # Conflicts: # src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs # src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/CommonExtensions.cs # src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/HttpSemanticConventions.cs
…tions-attributes # Conflicts: # src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs
…-forwarded-port" + adapted unit tests respectively
…tions-attributes # Conflicts: # src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #626 +/- ##
==========================================
+ Coverage 77.22% 77.59% +0.36%
==========================================
Files 173 175 +2
Lines 5160 5222 +62
==========================================
+ Hits 3985 4052 +67
+ Misses 1175 1170 -5
|
Hi, I would propose we merge this only after the first release is cut in #590. |
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/HttpSemanticConventions.cs
Outdated
Show resolved
Hide resolved
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
This PR was waiting for the next -beta release. The release was published and PR can be further reviewed and merged. |
…tions-attributes # Conflicts: # src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs # src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSLambdaUtils.cs
src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/AWSLambdaWrapper.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/CommonExtensions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/HttpSemanticConventions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/HttpSemanticConventions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/HttpSemanticConventions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/HttpSemanticConventions.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/HttpSemanticConventions.cs
Outdated
Show resolved
Hide resolved
Applied review Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
@Oberon00, thank you for the review ! |
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSLambdaHttpUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSLambdaHttpUtils.cs
Outdated
Show resolved
Hide resolved
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.
We need make sure the URL-encoding of the query string parts is correct, see
#626 (comment)
…LambdaHttpUtils.cs Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
- added url encoding of http parameters names and values - changed path source for v1 http trigger (REST) in order to include stage
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.
@rypdal Update the CHANGELOG.
- adapted setting of http.target logic: it shouldn't be set if neither path nor query string is provided - added unit tests for check last header value - fixed CHANGELOG markup
I made small code adaptation to be aligned with the AWS doc (see request examples https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html):
These changes shouldn't be obstacles for merge. |
Is this possible? I don't think that would be a HTTP request then. Maybe we should fall back to |
I think I would prefer always treating Path as if it was empty if it is actually null. But do not add extra code to try to get something sensible in these situations; just ensure we do not crash. Garbage-in/garbage-out applies here. (BTW: Before the next release we should ensure we catch any errors that happen before the traced handler is called and call it without tracing in the worst case; the code is now complex enough for a good chance of bugs) |
…s not set and allow http.target to be an empty string
@Oberon00 : I rolled back to the previous code and updated unit test. So, even if neither path nor query string is set the http.target is still set to an empty string. |
Seems build fails because of failing test not related to changes from this PR: Failed OpenTelemetry.Instrumentation.Wcf.Tests.TelemetryClientMessageInspectorTests.OutgoingRequestInstrumentationTest(instrument: True, filter: False, suppressDownstreamInstrumentation: True, includeVersion: True, enrich: False, enrichmentException: False, emptyOrNullAction: False) [1 ms] Details can be found here: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/runs/3188299150/jobs/5200797125 |
open-telemetry#583: applied re-phrasing Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
I think this PR can be merged now. (The build failure was indeed unrelated, it became green after changing the totally unrelated CHANGELOG) |
Changes
Added HTTP Server semantic conventions required tags to
Activity
created inOpenTelemetry.Instrumentation.AWSLambda
.