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

Access names from mdatagen generated metrics #12459

Open
braydonk opened this issue Feb 22, 2025 · 2 comments · May be fixed by #12531
Open

Access names from mdatagen generated metrics #12459

braydonk opened this issue Feb 22, 2025 · 2 comments · May be fixed by #12531
Labels
cmd/mdatagen help wanted Good issue for contributors to OpenTelemetry Service to pick up

Comments

@braydonk
Copy link
Contributor

Component(s)

cmd/mdatagen

Describe the issue you're reporting

I have a use case where I'm trying to produce a configuration validation error for a receiver that intends to reference a particular metric name. In particular the scenario is if a particular technology is disabled but a particular metric that requires that subsystem is enabled, I want to produce an error like:

Metric metric.name requires subsystem to be enabled

What would be great would be to reference the name directly from the mdatagen generated package, as putting the metric name directly in the error isn't future-proof against the metric name changing.

I have no particular preference for what this API looks like, provided it allows me to access any metric or resource attribute names. If there already is a way to do this and I've missed it, I will close this issue.

Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@dmitryax
Copy link
Member

Sounds reasonable to expose that. AFAIR we already need this in some other scrapers

@dmitryax dmitryax added the help wanted Good issue for contributors to OpenTelemetry Service to pick up label Feb 23, 2025
@sincejune sincejune linked a pull request Mar 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/mdatagen help wanted Good issue for contributors to OpenTelemetry Service to pick up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants