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

aws-sdk instrumentation is definining span.kind as internal #1128

Closed
mentos1386 opened this issue Aug 25, 2022 · 7 comments
Closed

aws-sdk instrumentation is definining span.kind as internal #1128

mentos1386 opened this issue Aug 25, 2022 · 7 comments
Assignees
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect

Comments

@mentos1386
Copy link
Contributor

What version of OpenTelemetry are you using?

    "@opentelemetry/api": "1.1.0",
    "@opentelemetry/exporter-metrics-otlp-http": "^0.30.0",
    "@opentelemetry/exporter-trace-otlp-http": "^0.30.0",
    "@opentelemetry/instrumentation": "~0.30.0",
    "@opentelemetry/instrumentation-aws-sdk": "^0.8.0",
    "@opentelemetry/instrumentation-http": "~0.30.0",
    "@opentelemetry/instrumentation-pino": "~0.30.0",
    "@opentelemetry/resource-detector-aws": "~1.1.1",
    "@opentelemetry/resource-detector-github": "~0.27.0",
    "@opentelemetry/resources": "~1.4.0",
    "@opentelemetry/sdk-metrics-base": "^0.30.0",
    "@opentelemetry/sdk-node": "~0.30.0",
    "@opentelemetry/semantic-conventions": "~1.4.0",

What version of Node are you using?

v16

What did you do?

Using @opentelemetry/instrumentation-aws-sdk to instrument our aws sdk requests.

What did you expect to see?

Requests to all AWS Services should have span.kind as client. Except for SNS/SQS where this is handled correctly.

What did you see instead?

span.kind is set as internal (the default value).

@mentos1386 mentos1386 added the bug Something isn't working label Aug 25, 2022
@haddasbronfman
Copy link
Member

Can you assign this to me please?

@haddasbronfman
Copy link
Member

@mentos1386 Hi, I tried to reproduce your issue by instrumenting dynamodb.listTables() and s3.listBuckets() and both of them created spans with spanKind:2 (CLIENT).
What are the steps to reproduce your issue?
Do you use AWS api 2 or 3 ?

@mentos1386
Copy link
Contributor Author

mentos1386 commented Sep 8, 2022

@haddasbronfman I am using aws sdk v3.

We are also using the following options:

suppressInternalInstrumentation: true,

If you can't reproduce with aws sdk v3, i can try to create a working repo.

@haddasbronfman
Copy link
Member

I couldn't reproduce although I used suppressInternalInstrumentation: true.
I got this span:

items to be sent [ Span { attributes: { 'rpc.system': 'aws-api', 'rpc.method': 'ListTables', 'rpc.service': 'DynamoDB', 'db.system': 'dynamodb', 'db.operation': 'ListTables', 'db.statement': '{"Limit":10}', 'aws.region': 'us-west-2', 'aws.request.id': 'BL88QM307CEV1T8DDNI7VSRE1VVV4KQNSO5AEMVJF66Q9ASUAAJG', 'http.status_code': 200 }, links: [], events: [], status: { code: 0 }, endTime: [ 1662645360, 493240280 ], _ended: true, _duration: [ 2, 23756081 ], name: 'DynamoDB.ListTables', _spanContext: { traceId: '0adc6cd07348a985a47403bb7a2fa75a', spanId: 'd9a24fc0bb1aa340', traceFlags: 1, traceState: undefined }, parentSpanId: undefined, kind: 2, startTime: [ 1662645358, 469484199 ], resource: Resource { attributes: [Object] }, instrumentationLibrary: { name: '@opentelemetry/instrumentation-aws-sdk', version: '0.8.1', schemaUrl: undefined }, _spanLimits: { attributeValueLengthLimit: Infinity, attributeCountLimit: 128, linkCountLimit: 128, eventCountLimit: 128 }, _spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] }, _attributeValueLengthLimit: Infinity } ]

@haddasbronfman
Copy link
Member

Hi @mentos1386, can you supply a working example?

@dyladan dyladan added triage priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect and removed triage labels Sep 14, 2022
@haddasbronfman
Copy link
Member

Thanks to @blumamir I managed to reproduce the issue. I'll fix it.

@haddasbronfman
Copy link
Member

@mentos1386 bug fixed. you can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
Projects
None yet
Development

No branches or pull requests

3 participants