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

Implement InstrumentationLibrary Instance in SDK #567

Closed
lalitb opened this issue Feb 9, 2021 · 2 comments · Fixed by #693
Closed

Implement InstrumentationLibrary Instance in SDK #567

lalitb opened this issue Feb 9, 2021 · 2 comments · Fixed by #693
Assignees
Labels
area:sdk bug Something isn't working release:required-for-ga To be resolved before GA release spec-compliance Not compliant to OpenTelemetry specs
Milestone

Comments

@lalitb
Copy link
Member

lalitb commented Feb 9, 2021

As per specs for Tracer Creation :

New Tracer instances are always created through a TracerProvider (see API). The name and version arguments supplied to the TracerProvider must be used to create an InstrumentationLibrary instance which is stored on the created Tracer.

Currently for cpp, we do pass instrumentation library name and version in tracer sdk, but it is never used internally to create InstrumentationLibrary instance, and further passing it to otel (and other) exporters:

opentelemetry::nostd::shared_ptr<opentelemetry::trace::Tracer> GetTracer(
nostd::string_view library_name,
nostd::string_view library_version = "") noexcept override;

As per the otel protocol:
https://github.com/open-telemetry/opentelemetry-proto/blob/e73df7c9f3c474c992990e82aa09ee46c39d6aab/opentelemetry/proto/common/v1/common.proto#L72-L78:

// InstrumentationLibrary is a message representing the instrumentation library information
// such as the fully qualified name and version. 
message InstrumentationLibrary {
  // An empty instrumentation library name means the name is unknown. 
  string name = 1;
  string version = 2;
}

`

@lalitb lalitb added bug Something isn't working area:sdk release:required-for-ga To be resolved before GA release spec-compliance Not compliant to OpenTelemetry specs labels Feb 9, 2021
@ThomsonTan
Copy link
Contributor

Do we need create a definition of InstrumentationLibrary for SDK or reuse the definition from OTLP? Reuse it will introduce dependency on protobuf.

@lalitb
Copy link
Member Author

lalitb commented Feb 9, 2021

Do we need create a definition of InstrumentationLibrary for SDK or reuse the definition from OTLP? Reuse it will introduce dependency on protobuf.

Yes, we need to create SDK implementation ( without protobuf dependency), and then propagate to otlp exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sdk bug Something isn't working release:required-for-ga To be resolved before GA release spec-compliance Not compliant to OpenTelemetry specs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants