Skip to content
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

Merged
merged 1 commit into from
Mar 14, 2020

Conversation

bogdandrutu
Copy link
Member

Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com

Copy link
Member

@tigrannajaryan tigrannajaryan left a 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.

@bogdandrutu
Copy link
Member Author

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".

@tigrannajaryan
Copy link
Member

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

@bogdandrutu
Copy link
Member Author

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.).

@tigrannajaryan
Copy link
Member

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?

@bogdandrutu
Copy link
Member Author

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.

@tigrannajaryan
Copy link
Member

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).

opentelemetry/proto/collector/trace/v1/trace_service.proto Outdated Show resolved Hide resolved
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be

Suggested change
// 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?

Copy link
Member Author

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).

Copy link
Member

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.

@Oberon00
Copy link
Member

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.

@SergeyKanzhelev
Copy link
Member

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

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a 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.

@SergeyKanzhelev
Copy link
Member

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.

@bogdandrutu
Copy link
Member Author

@SergeyKanzhelev I think you got some answers, can you clarify what did we miss to explain?

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a 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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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.

Copy link
Member

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).

opentelemetry/proto/collector/trace/v1/trace_service.proto Outdated Show resolved Hide resolved
tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-proto that referenced this pull request Feb 12, 2020
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.
tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-proto that referenced this pull request Feb 12, 2020
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.
tigrannajaryan pushed a commit to tigrannajaryan/opentelemetry-proto that referenced this pull request Feb 12, 2020
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.
bogdandrutu pushed a commit that referenced this pull request Feb 25, 2020
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>
@bogdandrutu bogdandrutu force-pushed the libinfo branch 2 times, most recently from 766486e to add2ece Compare March 9, 2020 22:30
@bogdandrutu
Copy link
Member Author

Updated to match the current names proposed in the open-telemetry/oteps#84

Copy link
Member

@arminru arminru left a 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.

opentelemetry/proto/common/v1/common.proto Outdated Show resolved Hide resolved
// such as the fully qualified name and version.
message InstrumentationLibrary {
string name = 1;
string version = 2;
Copy link
Member

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.

opentelemetry/proto/metrics/v1/metrics.proto Outdated Show resolved Hide resolved
opentelemetry/proto/trace/v1/trace.proto Outdated Show resolved Hide resolved
opentelemetry/proto/trace/v1/trace.proto Outdated Show resolved Hide resolved
@bogdandrutu bogdandrutu changed the title Add LibraryInfo and plugin into the collector Add InstrumentationLibrary and plugin into the collector Mar 13, 2020
@bogdandrutu bogdandrutu force-pushed the libinfo branch 2 times, most recently from 86a37b1 to 05b057d Compare March 14, 2020 00:03
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants