[Instrumentation.AWS{Lambda}] Add schema URL#4063
Open
martincostello wants to merge 8 commits intoopen-telemetry:mainfrom
Open
[Instrumentation.AWS{Lambda}] Add schema URL#4063martincostello wants to merge 8 commits intoopen-telemetry:mainfrom
martincostello wants to merge 8 commits intoopen-telemetry:mainfrom
Conversation
- Add schema URL and version to AWS traces. - Add test to validate new version additions.
Add missing exception message.
martincostello
commented
Apr 5, 2026
Add PR number.
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds OpenTelemetry schema URL and instrumentation scope version metadata to AWS client tracing, aligned to the configured AWS semantic convention version, and extends tests to guard against future enum/version additions causing runtime failures.
Changes:
- Pass
SemanticConventionVersioninto the AWS tracer provider registration. - Create
ActivitySourceinstances withTelemetrySchemaUrland packageVersion. - Add a theory test that exercises all
SemanticConventionVersionenum values; update AWS instrumentation changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/OpenTelemetry.Instrumentation.AWS.Tests/AWSClientInstrumentationOptionsTests.cs | Adds a theory test enumerating all semantic convention versions to ensure no exceptions when versions are added. |
| src/OpenTelemetry.Instrumentation.AWS/TracerProviderBuilderExtensions.cs | Registers AWSTracerProvider with the configured semantic convention version. |
| src/OpenTelemetry.Instrumentation.AWS/Implementation/Tracing/AWSTracerProvider.cs | Sets ActivitySource version and schema URL (based on semantic convention version) when creating tracers. |
| src/OpenTelemetry.Instrumentation.AWS/CHANGELOG.md | Documents the addition of instrumentation scope version and schema URL to traces. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/OpenTelemetry.Instrumentation.AWS/Implementation/Tracing/AWSTracerProvider.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWS/Implementation/Tracing/AWSTracerProvider.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWS/Implementation/Tracing/AWSTracerProvider.cs
Outdated
Show resolved
Hide resolved
- Make dictionary non-static. - Use `InvalidEnumArgumentException` for consistency. - Assert spans have version and schema URL.
This was referenced Apr 5, 2026
- Also add the version and schema URL to metrics. - Refactor to support using for AWS Lambda too.
Add schema URL and version to traces.
Pass attributes through to meters to use as tags. Resolves open-telemetry#4065.
Use `TryAdd()` overload that avoids allocating closures.
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.
Changes
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)