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

What should be unique traces are all getting same traceId with the axios instrumentation #456

Open
jeffthompson1971 opened this issue Nov 17, 2019 · 1 comment

Comments

@jeffthompson1971
Copy link
Contributor

jeffthompson1971 commented Nov 17, 2019

So all I'm doing is integrating at the axios level in ONE place. There is nothing downstream adding spans. This is simply ONE place where I've added axios (web-service call) instrumentation. In this instance this is a NestJS service (javascript of course) that polls the same endpoint every 30 seconds looking for notifications. So every 30 seconds it does

GET /api/v1/notifications

So what I expect is that every 30 seconds I have a brand new trace with a single span because i have no other instrumentation anywhere. So every web-service call is it's own trace.

But what I get is EVERY span is logged with the same traceId forever. So it seems there is like only one ID generated and used as a traceID from a single instrumentation point - and every single span logged from that instrumentation point will ONLY every have this one ID.

Then on top of that, every subsequent call, even though they are totally unrelated and distinct calls, the previous spanID is set as the parentID of the span... So ONE trace for every single call out of this service and one has a child, and he has a child and so on and on forever.

Here is the log of 3 spans being logged. You can see they all use same traceID somehow, and each spawns a child, even though these should all just be discrete traces - these spans have nothing to do with each other.

Can anyone explain
a) why would every single flow through an instrumnation part reuse the traceID?
b) what triggers the system to think that the previous span is the current's span's parent when they have no such relation?

[Nest] 83298 - 11/16/2019, 8:19:36 PM [
{
"traceId": "39ac8b70786e7660",
"parentId": "57bfbbd396033f90",
"id": "5d3a212eef248142",
"name": "get",
"kind": "CLIENT",
"timestamp": 1573957175933000,
"duration": 209000,
"localEndpoint": {
"serviceName": "bis-app-web"
},
"remoteEndpoint": {
"serviceName": "hub-service"
},
"tags": {
"http.path": "/hub-api/notifications/all",
"http.status_code": "200",
}
},
{
"traceId": "39ac8b70786e7660",
"parentId": "5d3a212eef248142",
"id": "48146177b16174eb",
"name": "get",
"kind": "CLIENT",
"timestamp": 1573957205931000,
"duration": 223000,
"localEndpoint": {
"serviceName": "bis-app-web"
},
"remoteEndpoint": {
"serviceName": "hub-service"
},
"tags": {
"http.path": "/hub-api/notifications/all",
"http.status_code": "200",
}
}
{
"traceId": "39ac8b70786e7660",
"parentId": "48146177b16174eb",
"id": "b75e403e79d0d1b7",
"name": "get",
"kind": "CLIENT",
"timestamp": 1573957235240000,
"duration": 180000,
"localEndpoint": {
"serviceName": "bis-app-web"
},
"remoteEndpoint": {
"serviceName": "hub-service"
},
"tags": {
"http.path": "/hub-api/notifications/all",
"http.status_code": "200",
}
}

@drazenbuljovcic
Copy link

+1

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