Skip to content

Conversation

@jaydeluca
Copy link
Member

Related to #13468

There are some instrumentations that use instrumenters or Telemetry classes from other instrumentation modules, and the resulting telemetry has a scope that does not match the instrumentation name. For example, the armeria-grpc-1.14 instrumentation installs Client and server interceptors from the grpc-1.6 instrumenation library, and therefore the resulting spans have a scope of io.opentelemetry.grpc-1.6

This causes issues with the SpanParser when trying to show telemetry emitted, because we are filtering out all telemetry signals that don't match the scope of the instrumentation module we are processing.

I think in cases like this, it's useful to have that telemetry documented, even if the scope doesn't match, since it is armeria-grpc-1.14 installing those filters and enabling the telemetry.

So I added a new capability to specify a scopeAllowList so that you can define additional scopes to include in telemetry collection for a given scope (for example to allow showing the telemetry from grpc-1.6 for armeria-grpc-1.14).

@jaydeluca jaydeluca requested a review from a team as a code owner August 12, 2025 11:15
Comment on lines 90 to 93
if (spansByScope.getScope().equals(targetScopeName)
|| scopeAllowList
.getOrDefault(targetScopeName, Set.of())
.contains(spansByScope.getScope())) {
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest not using inheritance for this

instead maybe something like (didn't think too much about names so feel free to pick others)

Suggested change
if (spansByScope.getScope().equals(targetScopeName)
|| scopeAllowList
.getOrDefault(targetScopeName, Set.of())
.contains(spansByScope.getScope())) {
if (AllowedScopes.contains(spansByScope, targetScopeName)) {

@trask trask enabled auto-merge (squash) August 12, 2025 19:47
@trask trask merged commit b6b334f into open-telemetry:main Aug 12, 2025
88 of 89 checks passed
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.

2 participants