-
Notifications
You must be signed in to change notification settings - Fork 821
Description
Describe your environment
OS: Amazon Linux
Python version: Python 3.11
Package version: 0.60b0.dev
What happened?
The OpenTelemetry semantic conventions for AWS Lambda state that:
For all events, a span with kind
SERVERSHOULD be created corresponding to the function invocation unless stated otherwise below.
Furthermore, it also states that
Span name MUST be set to the function name from the Lambda
Contextunless stated otherwise.
The current implementation violates both of these requirements, it sets the span name to the name of the Python handler function instead of the Lambda function name itself. It also occasionally sets the span kind to CONSUMER when receiving events from SQS, SNS, DynamoDB or S3. (source)
Steps to Reproduce
Invoke an AWS Lambda function with the opentelemetry-instrumentation-aws-lambda Python package installed and observe the resulting Span names.
Expected Result
The Span kind should be always marked as SERVER and the Span name should be the invoked function name provided in the Context argument provided in the Lambda handler.
Would you like to implement a fix?
Yes
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.