opentelemetry-python
opentelemetry-python copied to clipboard
get_meter Is Missing Required Attributes Arg
Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
This is not an environment specific issue. It appears (apologies if I'm confused!) that the python impl is missing a behavior that is required by the spec.
Steps to reproduce Describe exactly how to reproduce the error. Include a code sample if applicable.
In MeterProvider
, the method get_meter
does not have an argument attributes
.
The spec says that:
Get a Meter: This API MUST accept the following parameters:
The last of those parameters, after schema_url
, is a set of attributes:
[since 1.13.0] attributes: Specifies the instrumentation scope attributes to associate with emitted telemetry.
What is the expected behavior? What did you expect to see?
Expected to see the spec fully implemented. Being able to specify crosscutting attributes at init time would be extremely valuable.
What is the actual behavior? What did you see instead?
The final arg for get_meter
is schema_url
, attributes
is not present: https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/init.py#L512
Additional context Add any other context about the problem here.
@ocelotl Would you be open to a PR for this?
Yes, please.
Hi: Is anyone still working on this issue? If so, can I help?