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 of internal files in scoped packages doesn't work on windows #4436

Closed
Flarna opened this issue Jan 23, 2024 · 0 comments · Fixed by #4467
Closed

instrumentation of internal files in scoped packages doesn't work on windows #4436

Flarna opened this issue Jan 23, 2024 · 0 comments · Fixed by #4467
Assignees
Labels
bug Something isn't working pkg:instrumentation priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect

Comments

@Flarna
Copy link
Member

Flarna commented Jan 23, 2024

What happened?

Steps to Reproduce

Use an instrumentation which patched internal files in an scoped package. I used @opentelemetry/instrumentation-aws-sdk together with AWS SDK v3. This tries to patch e.g. @smithy/middleware-stack/dist-cjs/MiddlewareStack.js, see here.

Expected Result

Instrumentation works independent of the OS used.

Actual Result

Instrumentation fails on windows.

Additional Details

I think problem is somewhere here because name uses mixed slashes @smithy/middleware-stack\\dist-cjs\\MiddlewareStack.js but correct would be backslashes only.

OpenTelemetry Setup Code

import { AwsInstrumentation } from "@opentelemetry/instrumentation-aws-sdk";

registerInstrumentations({
    instrumentations: [
        new AwsInstrumentation({
            suppressInternalInstrumentation: true
        }),
    ]
});

import { SQSClient, ReceiveMessageCommand, DeleteMessageCommand, DeleteMessageBatchCommand, MessageAttributeValue, SendMessageCommand } from "@aws-sdk/client-sqs";
import { SNSClient, PublishCommand } from "@aws-sdk/client-sns";

package.json

{
  "dependencies": {
    "@aws-sdk/client-sqs": "3.461.0",
    "@aws-sdk/client-sns": "3.461.0",
    "@opentelemetry/api": "1.7.0",
    "@opentelemetry/instrumentation-aws-sdk": "0.37.2",
    "@opentelemetry/sdk-trace-node": "1.20.0"
  }
}

Relevant log output

No response

I think this is caused by/related to #3161.

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