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

The AWS trace id which is generating via this package is showing as invalid in AWS x-ray #11669

Open
aathirag opened this issue Nov 13, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@aathirag
Copy link

aathirag commented Nov 13, 2024

Describe the bug
The AWS trace id which is generating via this package is showing as invalid in AWS x-ray

Steps to reproduce

below is my code which I used in my nest application

import { NodeTracerProvider } from '@opentelemetry/sdk-node';
import { AWSXRayIdGenerator } from '@opentelemetry/id-generator-aws-xray';
import { AwsXRayExporter } from '@aws/otel-aws-xray-exporter';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';

const provider = new NodeTracerProvider({
idGenerator: new AWSXRayIdGenerator(), // Ensures X-Ray compatible trace IDs
});

const xrayExporter = new AwsXRayExporter({
// Optional configurations if needed
});

provider.addSpanProcessor(new SimpleSpanProcessor(xrayExporter));

provider.register();

// Register automatic instrumentation for Node.js
registerInstrumentations({
instrumentations: [getNodeAutoInstrumentations()],
});

I am getting trace id like this '68406520a006649127e371903a2de979'

What did you expect to see?

But the AWS -X-ray expecting '1-58406520-a006649127e371903a2de979'

What did you see instead?

I am getting trace id like this '68406520a006649127e371903a2de979'

What version did you use?

I am using
sdk-trace-base = 1.27.0
id-generator-aws-xray = 1.2.2
all others are 0.50 ranges

What config did you use?

Environment

Additional context

@aathirag aathirag added the bug Something isn't working label Nov 13, 2024
@codeboten
Copy link
Contributor

Can you give more details? Based on the description, I don't see any information about how this relates to the collector.

@aathirag
Copy link
Author

I added my code. Using this telemetry I am not getting a proper format of trace id. Am I missing anything ?

@aathirag
Copy link
Author

Can I get any help on this. Please let me know what details you need from my end

@aathirag
Copy link
Author

Is there a way I can convert W3C trace ID of 4efaaf4d1e8720b39541901950019ee5 to this format 1-4efaaf4d-1e8720b39541901950019ee5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants