open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
811 stars 391 forks source link

Update the parameter names in LoggerProvider::GetLogger #2689

Open ThomsonTan opened 1 month ago

ThomsonTan commented 1 month ago

The following spec says name and version' for "Get a Logger" inLoggerProvider, but they are named aslibrary_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.

ThomsonTan commented 3 weeks ago

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