You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The traces that the Botocore instrumentation is generating is missing the resource attributes(service.name and version). The traces generated by the Flask instrumentation have these resources. Is this a bug or am I missing something?
What is the expected behavior?
Expecting to see service.name and version in the traces.
Botocore trace InstrumentationLibrary opentelemetry.instrumentation.botocore 0.13b0 Span #0 Trace ID : 1f87a1cc76c38b2e6879a9d9459c8e3e Parent ID : ID : 375e03d19f05e29e Name : s3.command Kind : SPAN_KIND_CONSUMER Start time : 2020-09-28 21:47:25.9426736 +0000 UTC End time : 2020-09-28 21:47:26.004678 +0000 UTC Status code : STATUS_CODE_UNKNOWN_ERROR Status message : NoCredentialsError: Unable to locate credentials Attributes: -> params.Bucket: STRING(data) -> params.Key: STRING(xlsx) -> params.ServerSideEncryption: STRING(aws:kms) -> aws.agent: STRING(botocore) -> aws.operation: STRING(PutObject) -> aws.region: STRING(us-east-1)
Other traces
InstrumentationLibrary postgres 0.13b0 Span open-telemetry/opentelemetry-python#16 Trace ID : 0ef61b3da87cdcc46bd150336fbe7cdb Parent ID : 600800d603896b80 ID : 6181692326794a48 Name : postgres.query Resource labels: -> service.name: STRING(myapp) -> version: STRING(1)
See how this one has service.name while the Boto traces does not. Let me know if you need any other details
The text was updated successfully, but these errors were encountered:
I believe the issue here is that the OTLP trace exporter does not attach the TracerProvider's resource. Instead, it is taking resource from individual spans which I believe is an issue (see open-telemetry/opentelemetry-python#1180).
codeboten
transferred this issue from open-telemetry/opentelemetry-python
Nov 26, 2020
I'm manually instrumenting Botocore (v0.13b) in my Flask/postgres app as follows with OTLP exporter.
from opentelemetry.instrumentation.botocore import BotocoreInstrumentor labels = { "service.name": "myapp", "version": 1 } resource = Resource(attributes=labels) trace.set_tracer_provider(TracerProvider(resource=resource)) otlp_exporter = OTLPSpanExporter(endpoint=endpoint) span_processor = BatchExportSpanProcessor(otlp_exporter) FlaskInstrumentor().instrument_app(tapp) BotocoreInstrumentor().instrument()
The traces that the Botocore instrumentation is generating is missing the resource attributes(service.name and version). The traces generated by the Flask instrumentation have these resources. Is this a bug or am I missing something?
What is the expected behavior?
Expecting to see service.name and version in the traces.
Botocore trace
InstrumentationLibrary opentelemetry.instrumentation.botocore 0.13b0 Span #0 Trace ID : 1f87a1cc76c38b2e6879a9d9459c8e3e Parent ID : ID : 375e03d19f05e29e Name : s3.command Kind : SPAN_KIND_CONSUMER Start time : 2020-09-28 21:47:25.9426736 +0000 UTC End time : 2020-09-28 21:47:26.004678 +0000 UTC Status code : STATUS_CODE_UNKNOWN_ERROR Status message : NoCredentialsError: Unable to locate credentials Attributes: -> params.Bucket: STRING(data) -> params.Key: STRING(xlsx) -> params.ServerSideEncryption: STRING(aws:kms) -> aws.agent: STRING(botocore) -> aws.operation: STRING(PutObject) -> aws.region: STRING(us-east-1)
Other traces
InstrumentationLibrary postgres 0.13b0 Span open-telemetry/opentelemetry-python#16 Trace ID : 0ef61b3da87cdcc46bd150336fbe7cdb Parent ID : 600800d603896b80 ID : 6181692326794a48 Name : postgres.query Resource labels: -> service.name: STRING(myapp) -> version: STRING(1)
See how this one has service.name while the Boto traces does not. Let me know if you need any other details
The text was updated successfully, but these errors were encountered: