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

SDK V2 intrumentation of DynamoDB doesn't capture table name #417

Open
POlczak-ITTouch opened this issue Sep 18, 2023 · 2 comments
Open

Comments

@POlczak-ITTouch
Copy link

I use the following function to instrument the github.com/aws/aws-sdk-go-v2/aws config of DynamoDB:

func InstrumentAWSV2SDK(cfg *aws.Config) {
	xray.AWSV2Instrumentor(&cfg.APIOptions)
}

However the resulting segments and subsegments only include the operation field. The table_name field which is filled by v1 instrumentation is missing from V2 segments:

{
    "id": "41dca423be59c89b",
    "name": "DynamoDB",
    "start_time": 1695049841.6308432,
    "end_time": 1695049842.310672,
    "http": {
        "response": {
            "status": 200,
            "content_length": 2
        }
    },
    "aws": {
        "region": "eu-west-3",
        "operation": "PutItem",
        "request_id": "ST03KT8SKU47VP27DQ5MDT9C83VV4KQNSO5AEMVJF66Q9ASUAAJG"
    },
    "namespace": "aws"
}
@wangzlei
Copy link
Contributor

wangzlei commented Sep 25, 2023

Sorry for bringing this sorry for the inconvenience. Currently, both OpenTelemetry and XRay do not support AWS service specific attributes in AWS SDK for Go v2 instrumentation. This feature is on our backlog but does not have a concrete schedule yet. A complete solution would involve covering all AWS service operations through configuration, similar to the AWS SDK for Go v1 instrumentation.

For DynamoDB(and SQS), there is a temporary solution available through OpenTelemetry. So, if you only need the DynamoDB table name, you can consider options:

  1. migrate to OpenTelemetry.
  2. customize your AWS SDK v2 instrumentation by copying OpenTelemtry code into XRay SDK.

@POlczak-ITTouch
Copy link
Author

POlczak-ITTouch commented Sep 26, 2023

Ok, thank you for your answer. I'll consider using one of the temporary solutions. However having this feature in the future release without any workarounds would obviously be great, so please consider this ticket a feature request.

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

No branches or pull requests

2 participants