Skip to content

[maintenance/v2.x] Fix resource schema conflict - #20915

Open
trask with Copilot wants to merge 3 commits into
maintenance/v2.xfrom
copilot/maintenance-v2x-fix-schema-conflict
Open

trask with Copilot wants to merge 3 commits into
maintenance/v2.xfrom
copilot/maintenance-v2x-fix-schema-conflict

Conversation

Copilot AI commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fix startup schema-conflict messages in Java agent 2.33.0 when a service name is configured.

Align the built-in host, OS, process, and process-runtime resources with the SDK's schema 1.40.0. Resource attribute names, values, and detection behavior are unchanged.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-10-23 23:19 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Java agent 2.33.0 startup resource-schema conflict for 2.33.1 Fix resource schema conflict for 2.33.1 on maintenance/v2.x Oct 23, 2026
Copilot AI requested a review from trask October 23, 2026 21:01
@trask
trask requested a balanced review from Copilot October 23, 2026 21:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped schema correction preserves detector behavior and includes focused regression coverage, with no blocking issues identified.

No open issues 🎉

What changed in this PR

This PR fixes the 2.33.1 resource-schema conflict by aligning the four built-in resource detectors with SDK 1.67.0’s schema, without changing detector attributes or configuration behavior.

Changes:

  • Update host, OS, process, and process-runtime schema metadata and assertions from 1.24.0 to 1.40.0.
  • Add autoconfiguration regression coverage for both service-name configuration paths, checking attribute preservation and absence of schema-conflict warnings.
  • Add test dependencies for autoconfiguration and log capture; disable exporters and close constructed SDKs.
File Description
instrumentation/​resources/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​resources/​ResourceProviderRegistrationTest.java Verify resource merging for both service-name settings.
instrumentation/​resources/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​resources/​ProcessRuntimeResourceTest.java Expect runtime schema 1.40.0.
instrumentation/​resources/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​resources/​ProcessResourceTest.java Expect process schema 1.40.0.
instrumentation/​resources/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​resources/​OsResourceTest.java Expect schema 1.40.0 across OS cases.
instrumentation/​resources/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​resources/​HostResourceTest.java Expect host schema 1.40.0.
instrumentation/​resources/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​resources/​ProcessRuntimeResource.java Align runtime resource schema.
instrumentation/​resources/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​resources/​ProcessResource.java Align process resource schema.
instrumentation/​resources/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​resources/​OsResource.java Align OS resource schema.
instrumentation/​resources/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​resources/​HostResource.java Align host resource schema.
instrumentation/​resources/​library/​build.gradle.kts Add autoconfiguration and log-capture test dependencies.

Review effort: Balanced

@trask trask changed the title Fix resource schema conflict for 2.33.1 on maintenance/v2.x [maintenance/v2.x] Fix resource schema conflict Oct 23, 2026
@trask
trask marked this pull request as ready for review October 23, 2026 21:40
@trask
trask requested a review from a team as a code owner October 23, 2026 21:40
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI requested a review from trask October 23, 2026 22:49
@trask
trask requested a balanced review from Copilot October 23, 2026 22:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The consistent schema-only production changes preserve detection behavior and have targeted regression coverage, with no unresolved findings.

No open issues 🎉

Review effort: Balanced

steffan-westcott added a commit to steffan-westcott/clj-otel that referenced this pull request Oct 24, 2026
- Bump OpenTelemetry deps to 1.67.0
- Bump OpenTelemetry instrumentation deps to 2.33.0

Note: There is a known issue in OpenTelemetry Java concerning schemaUrl
mismatches affecting the service name resource when using the
instrumentation agent. This will be addressed in later releases of
OpenTelemetry Java.

See open-telemetry/opentelemetry-java-instrumentation#20915

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants