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

Instrumentation for AWS SDK 1.11 not setting db.system for DynamoDB requests #12493

Open
akats7 opened this issue Oct 21, 2024 · 3 comments · May be fixed by #12756
Open

Instrumentation for AWS SDK 1.11 not setting db.system for DynamoDB requests #12493

akats7 opened this issue Oct 21, 2024 · 3 comments · May be fixed by #12756
Assignees
Labels
bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome

Comments

@akats7
Copy link
Contributor

akats7 commented Oct 21, 2024

Describe the bug

The AWS 1.11 requests auto instrumentation does not seem to be setting the db.system attribute for dynamoDB spans. This is stopping our platform from identifying it properly as a db span.

Steps to reproduce

Enable javaagent and make request to dynamoDB using AWS 1.11 SDK

Expected behavior

db.* attributes to be set on dynamodb spans

Actual behavior

No db.* attributes set, treated as external service call

Javaagent or library instrumentation version

io.opentelemetry.aws-sdk-1.11

Environment

JDK:
OS:

Additional context

No response

@akats7 akats7 added bug Something isn't working needs triage New issue that requires triage labels Oct 21, 2024
@akats7 akats7 changed the title AWS SDK not setting db.system for DynamoDB AWS requests Instrumentation for AWS SDK 1.11 not setting db.system for DynamoDB AWS requests Oct 21, 2024
@akats7 akats7 changed the title Instrumentation for AWS SDK 1.11 not setting db.system for DynamoDB AWS requests Instrumentation for AWS SDK 1.11 not setting db.system for DynamoDB requests Oct 21, 2024
@trask
Copy link
Member

trask commented Oct 21, 2024

hi @akats7!

it looks like AWS SDK 2.2 instrumentation sets a couple of db attributes:

if (awsSdkRequest.type() == DYNAMODB) {
span.setAttribute(DB_SYSTEM, DB_SYSTEM_DYNAMODB);
String operation = attributes.getAttribute(SdkExecutionAttribute.OPERATION_NAME);
if (operation != null) {
span.setAttribute(DB_OPERATION, operation);
}
}

I think we'd welcome the equivalent change to AWS SDK 1.1 instrumentation if that's possible

@trask trask added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome and removed needs triage New issue that requires triage labels Oct 21, 2024
@vasantteja
Copy link

Hello @trask, Can you please assign this to me if this needs a code change?

@akats7
Copy link
Contributor Author

akats7 commented Oct 22, 2024

Hi @vasantteja, thanks for offering, we already have a proposed fix, I just wanted to create an issue prior to opening a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants