-
Notifications
You must be signed in to change notification settings - Fork 259
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 InstrumentationLibrary and plugin into the collector #94
Conversation
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.
@bogdandrutu can you please provide the context of this change? Is LibraryInfo something that was recently added to the spec? I check the last few commits in spec repo and cannot see anything relevant.
The Library info are the data used for the "Named Tracer/Meter" which are associated with every Span/Instrument created by these instances. I picked the name library info instead of "NamedXYZ". |
Why does it need to be a separate data structure and not simply part of Resource message? We already have semantic conventions that allow to differentiate library attributes from the rest, including library name and version: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-resource-semantic-conventions.md#library |
Based on my understanding the library name inside the Resource is the "instrumentation" library (99% of the time opentelemetry), this is the "instrumented" library (e.g. mongo, etc.). |
You are, right, my mistake. However, the original question still holds: would it be better if we defined semantic conventions for "instrumented" library or you think this is information is fundamental property of a span, will always be present and is better represented as a hard-coded Protobuf field? |
Do you mean semantic conventions inside the Resource? I think this does not belong to the resource (which describes the application) and is a sub-component of the application described by the resource. |
Yes, I was thinking library info could be added to Resource and one request could carry multiple ResourceSpans/ResourceMetrics messages, each carrying data from a particular Resource/Library combination. However, it seems like it logically is separate, so making it a separate message is the right approach (what you did). |
@@ -53,3 +53,10 @@ message StringKeyValue { | |||
string key = 1; | |||
string value = 2; | |||
} | |||
|
|||
// LibraryInfo is a message representing the instrumented library informations such as the fully |
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.
Should this be
// LibraryInfo is a message representing the instrumented library informations such as the fully | |
// LibraryInfo is a message representing the instrumenting library informations such as the fully |
and represent the information that comes from the "named tracer"?
Otherwise, where would this information come from?
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.
It can be both instrumenting and instrumented. Think if a library has a dependency on otel and instruments itself (not via a plugin).
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.
A library can be both. But that is a special case and in all cases where it's different using the "instrumented" library is wrong.
Just calling out that we currently do not have any API nor conventions to report the "instrumented" library, just the "instrumenting" (aka reporting) library. I did not know that "instrumentation" is yet another distinct thing, I thought that to be synonymous to "instrumenting" library. |
I have the same qq as @tigrannajaryan . We already have this: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-resource-semantic-conventions.md#library BTW, I do believe storing library info in resource has some side effects. Change like this may be needed, I want to make sure this is what you are trying to solve |
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.
I'm blocking PR to better understand intent behind the change and make sure it's aligned with the changes on specs side.
I have the same qq as @tigrannajaryan . We already have this: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-resource-semantic-conventions.md#library BTW, I do believe storing library info in resource has some side effects. Change like this may be needed, I want to make sure this is what you are trying to solve. |
@SergeyKanzhelev I think you got some answers, can you clarify what did we miss to explain? |
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.
qq about language field and general observation that this may be generalized further
|
||
// LibraryInfo is a message representing the instrumented library informations such as the fully | ||
// qualified name and version. | ||
message LibraryInfo { |
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.
Spec https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-resource-semantic-conventions.md#library ? also defines a language. Should it be defined here as well?
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.
Does the discussion from today sig meeting + open-telemetry/oteps#84 + open-telemetry/opentelemetry-specification#494 clarifies.
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.
@SergeyKanzhelev As discussed today, the linked resource convention is unrelated, so "language" does not apply here (yet).
This adds the maturity levels for individual parts of the protocol according to recently agreed project-wide definition of maturity levels. After merging this change we will declare Trace (Span), Resource and Common parts of the protocol as Beta, which means no more than once in 3 months changes are allowed after that. We need this declaration of maturity so that we can begin implementation of OTLP in the Collector. One known pending change that prevents us from declaring the components as Stable is open-telemetry#94 We assume that if this change is accepted there will be no other changes within the next 3-months timeframe. The assumption seems reasonable since there are no other known shortcomings in this part of the protocol that may require more modifications.
This adds the maturity levels for individual parts of the protocol according to recently agreed project-wide definition of maturity levels. After merging this change we will declare Trace (Span), Resource and Common parts of the protocol as Beta, which means no more than once in 3 months changes are allowed after that. We need this declaration of maturity so that we can begin implementation of OTLP in the Collector. One known pending change that prevents us from declaring the components as Stable is open-telemetry#94 We assume that if this change is accepted there will be no other changes within the next 3-months timeframe. The assumption seems reasonable since there are no other known shortcomings in this part of the protocol that may require more modifications.
This adds the maturity levels for individual parts of the protocol according to recently agreed project-wide definition of maturity levels. After merging this change we will declare Trace (Span), Resource and Common parts of the protocol as Beta, which means no more than once in 3 months changes are allowed after that. We need this declaration of maturity so that we can begin implementation of OTLP in the Collector. One known pending change that prevents us from declaring the components as Stable is open-telemetry#94 We assume that there will be no other changes within the next 3-months timeframe. The assumption seems reasonable since there are no other known shortcomings in this part of the protocol that may require more modifications. Note that metrics part is considered Alpha since it is still under active development.
This adds the maturity levels for individual parts of the protocol according to recently agreed project-wide definition of maturity levels. After merging this change we will declare Trace (Span), Resource and Common parts of the protocol as Beta, which means no more than once in 3 months changes are allowed after that. We need this declaration of maturity so that we can begin implementation of OTLP in the Collector. One known pending change that prevents us from declaring the components as Stable is #94 We assume that there will be no other changes within the next 3-months timeframe. The assumption seems reasonable since there are no other known shortcomings in this part of the protocol that may require more modifications. Note that metrics part is considered Alpha since it is still under active development. Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com> Co-authored-by: Bogdan Drutu <lazy@splunk.com>
766486e
to
add2ece
Compare
Updated to match the current names proposed in the open-telemetry/oteps#84 |
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.
Please also change the PR title to match the updated content before merging.
// such as the fully qualified name and version. | ||
message InstrumentationLibrary { | ||
string name = 1; | ||
string version = 2; |
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.
Please specify the format or add a link to the spec.
https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/api-tracing.md#obtaining-a-tracer is a bit vague on the version format, though.
86a37b1
to
05b057d
Compare
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com