Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otel.instrumentation.common.peer-service-mapping: support glob #13111

Open
codefromthecrypt opened this issue Jan 27, 2025 · 2 comments
Open
Assignees
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request

Comments

@codefromthecrypt
Copy link

codefromthecrypt commented Jan 27, 2025

Is your feature request related to a problem? Please describe.

Right now, there's a handy feature to map peer service names, given hostname or hostname:port. This is important for topology view.
https://opentelemetry.io/docs/zero-code/java/agent/instrumentation/#peer-service-name

One issue is that you may want to bucket a service like "openai-azure", but be stifled by its use of subdomains. It isn't viable in some cases to enumerate all possible hostnames as they could be parametrized in a way that changes independent from the agent config.

E.g. x.openai.azure.com, y.openai.azure.com

This concern is not limited to azure openai as it applies to anything using subdomains, like s3.

Describe the solution you'd like

I think the simplest way out would be to accept asterisk as a wildcard. so, *.openai.azure.com=openai-azure or similar. This could be very efficient especially if only one wildcard was permitted, or a substring variant.

Describe alternatives you've considered

Today, if you know the names, you can just list them all.

Also, you could instead map other things instead of hostname, like db.system recently renamed to db.system.name. However, as this is already a drifted config pattern (due to appending ".name"), it might be confusing to document. So, it seems low-hanging fruit to just accept a wildcard.

Also, I think while we could do regex, it is overkill for the pattern described vs a glob or substring.

Additional context

thought about this, testing otel-tui ymtdzzz/otel-tui#200

@codefromthecrypt codefromthecrypt added enhancement New feature or request needs triage New issue that requires triage labels Jan 27, 2025
@trask
Copy link
Member

trask commented Jan 29, 2025

makes sense to me, agree on simplified matching, we should align with https://github.com/open-telemetry/opentelemetry-configuration/blob/main/README.md#properties-which-pattern-matching

@trask trask added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome and removed needs triage New issue that requires triage labels Jan 29, 2025
@xiepuhuan
Copy link
Contributor

Please assign to me.
@trask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants