-
Notifications
You must be signed in to change notification settings - Fork 440
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
Move KeyValueIterable and KeyValueIterableView from trace to common #363
Conversation
@@ -43,7 +43,7 @@ TEST(NoopMeter, RecordBatch) | |||
std::unique_ptr<Meter> m{std::unique_ptr<Meter>(new NoopMeter{})}; | |||
|
|||
std::map<std::string, std::string> labels = {{"Key", "Value"}}; | |||
auto labelkv = opentelemetry::trace::KeyValueIterableView<decltype(labels)>{labels}; | |||
auto labelkv = opentelemetry::common::KeyValueIterableView<decltype(labels)>{labels}; |
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.
Not related to this PR, but seems we need to be consistent with the scope resolution usage - either use opentelemetry::common::KeyValueIterableView
or common::KeyValueIterableView
.
Nothing wrong with this PR thought. This needs to be fixed as separate PR for all such entities.
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 for the feedback! I've filed an issue for this here: #368
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 for this work, this looks good.
It makes perfect sense to get rid of dependencies from the metrics
to the trace
part.
Approved pending all the tests are passing.
CLA is broken today. |
There's also something with GitHub actions runner being unable to fetch packages (totally unrelated to this PR). |
@xukaren please rebase to the latest master branch. |
d027b01
to
3f73296
Compare
Rebased! |
A simple PR based on this comment from @maxgolov.
Since
KeyValueIterable
is used by metrics, traces, and possibly later on by logs, it would be better if it belonged to the “common” namespace as it is no longer exclusive to being used for “trace”.In this PR,
KeyValueIterable
and its derived classKeyValueIterableView
, are refactored from namespacetrace::*
tocommon::*
and their corresponding*.h
files are moved fromapi/.../trace
toapi/.../common
.cc @alolita