Description
Issue with OpenTelemetry.Instrumentation.AWS
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g. OpenTelemetry 1.3.2
):
OpenTelemetry.Instrumentation.AWS - 1.1.0-beta.1
OpenTelemetry.Instrumentation.AWSLambda 1.3.0-beta.1
Runtime version : net6.0
Is this a feature request or a bug?
- Feature Request
- Bug
What is the expected behavior?
When a Producer publishes a message to a SNS topic, the span representing the Publish operation should have attributes that help in uniquely identifying the SNS topic.
The topic arn can be included in the attribute messaging.destination.name
. This would be inline with the recommendation provided in messaging semcov https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/messaging-spans.md.
What is the actual behavior?
In the current instrumentation for AWS SNS service, the span does not contain any attribute that helps in uniquely identifying the topic to which a message was published.
Here is a sample span that is generated on publish, the only information it contains is that a publish operation was performed and the service is SNS
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope Amazon.AWS.AWSClientInstrumentation
Span #0
Trace ID : 0230ddbaedf0649af93ad87c13291b4d
Parent ID : ea9d4fa4683e3a6b
ID : 6a9e9154557241a9
Name : SimpleNotificationService.Publish
Kind : Client
Start time : 2024-03-13 17:57:44.2185586 +0000 UTC
End time : 2024-03-13 17:57:45.182434 +0000 UTC
Status code : Unset
Status message :
Attributes:
-> aws.service: Str(SimpleNotificationService)
-> aws.operation: Str(Publish)
-> aws.region: Str(us-west-2)
-> aws.requestId: Str(8bf7d0fb-8236-5250-bc05-8e90696f9a7d)
-> http.status_code: Int(200)
-> http.response_content_length: Int(294)
Additional Context
Related contributions in Python and JS contrib repos:
open-telemetry/opentelemetry-js-contrib#1727
open-telemetry/opentelemetry-python-contrib#1995