[OpenTelemetry] Add schema URL to resources - #7726
martincostello merged 2 commits into
Conversation
Add schema URL to internally created resources, where relevant.
Pull request dashboard statusMerged · refreshed 2026-09-10 16:41 UTC Status above doesn't look right?
|
Add PR number.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7726 +/- ##
==========================================
- Coverage 91.64% 91.63% -0.02%
==========================================
Files 325 326 +1
Lines 18168 18165 -3
==========================================
- Hits 16650 16645 -5
- Misses 1518 1520 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
🟡 Changes recommended
It unintentionally changes empty service-instance handling, and the tests do not verify the exact schema version.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds semantic-convention schema URLs to resources created internally by the OpenTelemetry SDK.
Changes:
- Introduces centralized schema URL/version helpers.
- Applies schema URLs to default, telemetry SDK, service, and environment resources.
- Expands resource schema URL tests.
File summaries
| File | Description |
|---|---|
OpenTelemetry.slnx |
Includes the shared schema helper. |
OpenTelemetry.Extended.slnx |
Includes the shared schema helper. |
src/Shared/SchemaUrls.cs |
Builds versioned schema URLs. |
src/OpenTelemetry/SemanticConventionsVersion.cs |
Defines semantic conventions version 1.44.0. |
src/OpenTelemetry/OpenTelemetry.csproj |
Links the shared helper. |
src/OpenTelemetry/Resources/ResourceBuilder.cs |
Adds schema URL to default resources. |
src/OpenTelemetry/Resources/ResourceBuilderExtensions.cs |
Adds schema URLs to SDK and service resources. |
src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs |
Adds schema URL to detected service resources. |
src/OpenTelemetry/CHANGELOG.md |
Documents the behavioral change. |
test/OpenTelemetry.Tests/Resources/ResourceTests.cs |
Tests default resource schema propagation. |
test/OpenTelemetry.Tests/Resources/ResourceBuilderTests.cs |
Tests service resource schema URLs. |
test/OpenTelemetry.Tests/Resources/OtelServiceNameEnvVarDetectorTests.cs |
Tests detector schema URLs. |
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
705020c
#7723 (comment)
Changes
Add schema URL to internally created resources, where relevant, that were missed when implementing #7472.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)