-
Notifications
You must be signed in to change notification settings - Fork 513
Add attributes for InstrumentationScope
#2004
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
Add attributes for InstrumentationScope
#2004
Conversation
+ Move `MakeAttributes` from `logger.h` to `key_value_iterable_view.h` + Add attributes support for InstrumentationScope in `GetLogger()` Signed-off-by: owent <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2004 +/- ##
==========================================
+ Coverage 87.29% 87.32% +0.03%
==========================================
Files 166 166
Lines 4662 4673 +11
==========================================
+ Hits 4069 4080 +11
Misses 593 593
|
Signed-off-by: owent <[email protected]>
InstrumentationScopeInstrumentationScope
sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h
Outdated
Show resolved
Hide resolved
Signed-off-by: WenTao Ou <[email protected]>
lalitb
left a comment
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.
LGTM. Thanks for the changes.
| * @param attributes | ||
| * @return nostd::span<const std::pair<nostd::string_view, common::AttributeValue>> | ||
| */ | ||
| inline static nostd::span<const std::pair<nostd::string_view, common::AttributeValue>> |
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.
nit - with this cleanup, we can also remove
# include "opentelemetry/nostd/span.h"
# include "opentelemetry/nostd/type_traits.h"
from header includes, need to check if there are others too.
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.
Thanks, and the unused headers are removed now.
And #2008 is also included in this PR.
+ Populate Instrumentation Scope attributes Signed-off-by: owent <[email protected]>
Fixes #1690
Fixes #1882
Fixes #2008
Should we alse add attribute for
TracerProvider::GetTracerandMeterProvider::GetMeter?Changes
InstrumentationScopeMakeAttributesfromlogger.htokey_value_iterable_view.hGetLogger()For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes