Update the parameter names in LoggerProvider::GetLogger
The following spec says name and version' for "Get a Logger" in LoggerProvider, but they are named as library_nameandlibrary_version` in the OpenTelemetry C++ API (see the second link below). Could the parameter names be updated to be consistent with the spec which could reduce confusion for the users coming from spec or SDK from other languages?
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md#get-a-logger
https://github.com/open-telemetry/opentelemetry-cpp/blob/main/api/include/opentelemetry/logs/logger_provider.h#L48
This is based on https://github.com/open-telemetry/opentelemetry-cpp/issues/2680#issuecomment-2140346314.
Reviewed the GetTracer API. The same issue is not there. @lalitb thanks for the reminder.
https://github.com/open-telemetry/opentelemetry-cpp/blob/4f37503105d1572423e161ca171ac8d046d66341/api/include/opentelemetry/trace/tracer_provider.h#L121
This issue was marked as stale due to lack of activity.
This issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles:
could i work on this since no body pick it? @ThomsonTan and @marcalff
The spec link should be: get-a-logger
Hi @ThomsonTan @marcalff and @lalitb , i want align with you for clarification on the design choices and potential next steps.
Background
The current C++ implementation of GetLogger uses parameters logger_name, library_name, library_version and schema_url, which appear to deviate from the OpenTelemetry Logger Specification. The spec defines name, version, schema_url, and attributes as the parameters for instrumentation scope identification.
Key Questions:
Parameter Naming Consistency
The spec uses name to identify the instrumentation scope (e.g., library/module/component). In the current implementation, logger_name seems to serve this role. Would renaming library_name to name align with the spec’s intent while maintaining backward compatibility?
Ambiguity Between logger_name and name
The parameter logger_name is used as a provider-specific identifier (e.g., ETW Provider name). However, this conflicts with the spec’s name, which is meant to identify the instrumentation scope.
How does logger_name conceptually differ from the spec’s name?
Could logger_name be moved to vendor-specific configurations (e.g., LoggerProvider options) to avoid confusion?
This issue was marked as stale due to lack of activity.