[EntityFrameworkCore] Add schema URL to traces#4078
[EntityFrameworkCore] Add schema URL to traces#4078martincostello wants to merge 3 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4078 +/- ##
==========================================
+ Coverage 72.83% 72.96% +0.13%
==========================================
Files 460 452 -8
Lines 17875 17835 -40
==========================================
- Hits 13019 13014 -5
+ Misses 4856 4821 -35
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
src/OpenTelemetry.Instrumentation.EntityFrameworkCore/CHANGELOG.md
Outdated
Show resolved
Hide resolved
Add schema URL to the `ActivitySource`. Contributes to open-telemetry#4064.
Add PR number.
072e8ab to
761ecec
Compare
There was a problem hiding this comment.
Pull request overview
Adds OpenTelemetry schema URL metadata to EntityFrameworkCore instrumentation traces by creating the ActivitySource via the shared factory and updating registration/tests accordingly (contributes to #4064 / #4078).
Changes:
- Create EF Core
ActivitySourceusingActivitySourceFactorywith semantic conventions version1.36.0(enablesTelemetrySchemaUrl+ version). - Update
TracerProviderBuilderExtensionsto register the newActivitySourcename. - Add/extend unit test assertions and update the EF Core instrumentation changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs | Asserts ActivitySource name/version/schema URL on exported activities. |
| src/OpenTelemetry.Instrumentation.EntityFrameworkCore/TracerProviderBuilderExtensions.cs | Registers EF Core instrumentation by ActivitySource name from the new factory-created source. |
| src/OpenTelemetry.Instrumentation.EntityFrameworkCore/OpenTelemetry.Instrumentation.EntityFrameworkCore.csproj | Links in shared ActivitySourceFactory.cs for schema URL support. |
| src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs | Switches EF Core activity source creation to ActivitySourceFactory and introduces semantic conventions version constant. |
| src/OpenTelemetry.Instrumentation.EntityFrameworkCore/CHANGELOG.md | Notes addition of schema URL to traces. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...elemetry.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs
Outdated
Show resolved
Hide resolved
|
Need to update to account for |
Set the right schema URL based on the version of the semantic conventions being used via `OTEL_SEMCONV_STABILITY_OPT_IN`.
Contributes to #4064.
Changes
Add schema URL to the
ActivitySource.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)