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

Allow to pass schema_url when requesting meter and logger #3451

Closed
lmolkova opened this issue Sep 28, 2023 · 0 comments · Fixed by #3454
Closed

Allow to pass schema_url when requesting meter and logger #3451

lmolkova opened this issue Sep 28, 2023 · 0 comments · Fixed by #3454

Comments

@lmolkova
Copy link
Contributor

follow-up on #3251

#3251 (comment)
#3251 (comment)

According to the spec schema_url can be provided as parameter when getting a meter or a logger

While otel-api in python supports providing schema_url on metrics and logs, some overloads don't support it:

def get_meter(
name: str,
version: str = "",
meter_provider: Optional[MeterProvider] = None,
) -> "Meter":

or

def get_logger(
instrumenting_module_name: str,
instrumenting_library_version: str = "",
logger_provider: Optional[LoggerProvider] = None,
) -> "Logger":

while the same overload on traces takes schema_url

def get_tracer(
instrumenting_module_name: str,
instrumenting_library_version: typing.Optional[str] = None,
tracer_provider: Optional[TracerProvider] = None,
schema_url: typing.Optional[str] = None,
) -> "Tracer":

Is your feature request related to a problem?

With a lot of recent changes in OTel semconv, populating schema_url is essential for backends to understand telemetry, but many instrumentation libraries do not populate it
https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1746/files

Describe the solution you'd like
Add schema_url as parameter on convenience get_meter and get_logger methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant