-
Notifications
You must be signed in to change notification settings - Fork 443
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
Logger: Support for Instrumentation library #1128
Logger: Support for Instrumentation library #1128
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1128 +/- ##
=======================================
Coverage 93.39% 93.39%
=======================================
Files 165 165
Lines 6229 6229
=======================================
Hits 5817 5817
Misses 412 412 |
|
||
virtual nostd::shared_ptr<Logger> GetLogger(nostd::string_view logger_name, | ||
nostd::span<nostd::string_view> args) = 0; | ||
virtual nostd::shared_ptr<Logger> GetLogger(nostd::string_view library_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not clarifying this in the issue, but I think logger_name
and library_name
are two separate entities and would be good to support both of them. While LoggerName
is still not in the log data model ( in specs ) the PR is open - open-telemetry/opentelemetry-specification#1236 - and hopefully it would get added soon.
Also, do you think we can keep options
and args
even though they are not used as of now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So logger_name
, library_name
, options
and args
. library_name
goes to the instrumentation , and options
and args
will stay unused correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes correct.
@@ -44,19 +46,13 @@ nostd::shared_ptr<logs_api::Logger> LoggerProvider::GetLogger(nostd::string_view | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The search logic also needs changes. Probably storing in the vector
instead of map
, and comparing for instrumentation_library ( as done in tracer ) along with the logger_name to get the right logger.
|
@lalitb Sorry, seems my Windows machine's git is still connected to my old email. I'd prefer to close this one and raise a new PR. |
Fixes #1087 (issue)
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes