Skip to content

Replace gRPC header selectors with exact-name capture lists - #21082

Draft
trask with Copilot wants to merge 1 commit into
mainfrom
copilot/delete-old-deprecated-stuff
Draft

trask with Copilot wants to merge 1 commit into
mainfrom
copilot/delete-old-deprecated-stuff

Conversation

Copilot AI commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Replace gRPC request-header selectors with exact-name lists for 3.0; unset or empty lists capture nothing.

otel.instrumentation.grpc.client.request-captured-headers=x-request-id
otel.instrumentation.grpc.server.request-captured-headers=x-request-id
  • Configuration: Replace .request-headers.included / .excluded with .request-captured-headers; declarative configuration uses list-valued java.grpc.{client,server}.request_captured_headers.
  • Java API: Replace setClientRequestHeaders(IncludeExclude) and setServerRequestHeaders(IncludeExclude) with setClientRequestCapturedHeaders(Collection<String>) and setServerRequestCapturedHeaders(Collection<String>).
  • Selection: Remove wildcard expansion and exclusion-only capture. Preserve case-insensitive lookup, lowercase rpc.request.header.<key> string-array attributes, multiple values, and binary/pseudo-header exclusions.

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-10-30 03:36 UTC

Move out of draft to request review.

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.

Copilot AI changed the title [WIP] Delete old deprecated implementations for breaking changes Replace gRPC header selectors with exact-name capture lists Oct 30, 2026
Copilot AI requested a review from trask October 30, 2026 03:47
@trask
trask requested a balanced review from Copilot October 30, 2026 03:52

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

No active review issues block the change to exact-name gRPC header capture lists.

No open issues 🎉

What changed in this PR

This PR replaces gRPC request-header selectors with exact-name capture lists for 3.0, building on the header naming changes in #20985 across library and javaagent instrumentation.

Changes:

  • Replaces selector-based configuration and builder APIs with client/server header-name lists; unset or empty lists capture nothing.
  • Removes wildcard and exclusion selection while preserving case-insensitive matching, multiple values, and binary/pseudo-header exclusions.
  • Updates tests, configuration references, and breaking-change documentation.
File Description
instrumentation/​grpc-1.6/​testing/​src/​main/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​AbstractGrpcTest.java Checks multiple captured values and omission of unlisted headers.
instrumentation/​grpc-1.6/​README.md Documents exact-name capture settings and defaults.
instrumentation/​grpc-1.6/​metadata.yaml Replaces selector metadata with list-valued settings.
instrumentation/​grpc-1.6/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​internal/​GrpcConfigTest.java Tests list configuration and empty defaults.
instrumentation/​grpc-1.6/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​GrpcTest.java Exercises new builder APIs and disabled capture.
instrumentation/​grpc-1.6/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​GrpcAttributesExtractorTest.java Tests exact matching, filtering, and wildcard rejection.
instrumentation/​grpc-1.6/​library/​src/​test/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​CapturedGrpcRequestHeadersUtilTest.java Removes obsolete selector utility tests.
instrumentation/​grpc-1.6/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​internal/​GrpcConfig.java Reads client/server capture lists.
instrumentation/​grpc-1.6/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​GrpcTelemetryBuilder.java Introduces collection-based header capture setters.
instrumentation/​grpc-1.6/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​GrpcAttributesExtractor.java Captures only configured, valid header names.
instrumentation/​grpc-1.6/​library/​src/​main/​java/​io/​opentelemetry/​instrumentation/​grpc/​v1_6/​CapturedGrpcRequestHeadersUtil.java Removes obsolete selector support.
instrumentation/​grpc-1.6/​javaagent/​src/​main/​java/​io/​opentelemetry/​javaagent/​instrumentation/​grpc/​v1_6/​GrpcSingletons.java Passes configured lists to the telemetry builder.
instrumentation/​grpc-1.6/​javaagent/​build.gradle.kts Updates agent test properties to capture lists.
docs/​declarative-configuration-example.yaml Shows the new list-valued YAML settings.
declarative-config-bridge/​src/​test/​java/​io/​opentelemetry/​instrumentation/​config/​bridge/​ConfigPropertiesBackedDeclarativeConfigPropertiesTest.java Verifies flat-property mapping and empty-list handling.
CHANGELOG.md Documents replacement APIs, settings, and selection behavior.

Review effort: Balanced

@laurit

laurit commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Are you dropping wildcards because

Instrumentations SHOULD require an explicit configuration of which headers are to be captured.

doesn't that mean just that instrumenations shouldn't capture headers by default not that the captured headers would need to be explicitly named?

Base automatically changed from copilot/align-grpc-headers to main October 30, 2026 15:43
@trask
trask force-pushed the copilot/delete-old-deprecated-stuff branch from 0210f17 to f2b9575 Compare October 30, 2026 15:43
@trask
trask removed this pull request from stack #21084 October 30, 2026 15:45
Co-authored-by: trask <218610+trask@users.noreply.github.com>
@trask
trask force-pushed the copilot/delete-old-deprecated-stuff branch from f2b9575 to d4e27fb Compare October 30, 2026 15:45

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.

4 participants