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

Nextjs service not showing errors #1415

Closed
awilson1801 opened this issue Jun 9, 2021 · 7 comments
Closed

Nextjs service not showing errors #1415

awilson1801 opened this issue Jun 9, 2021 · 7 comments

Comments

@awilson1801
Copy link

I recently updated a couple Nextjs apps to dd-trace-js 0.34.0 to take advantage of the tracing support for next. However, after upgrading I noticed that an entire separate service was created in APM. While this was not desired it would be acceptable if the new "next" service was properly showing errors in the "Errors Widget" (see below). I have two different services with the new tracer version and neither of them properly report errors in this widget. The original service that was created in the previous tracer version however does show these errors. Is this behavior expected?

Original service properly showing errors:
image

Newly created "Next" service without errors (same time period):
image

@awilson1801 awilson1801 added the bug Something isn't working label Jun 9, 2021
@rochdev
Copy link
Member

rochdev commented Jun 9, 2021

Is this something you can minimally replicate? We do test errors and they are working in our tests, and for the top-level service it should be based on the status code, so having the additional Next span shouldn't make a difference there in theory.

@awilson1801
Copy link
Author

When you say "replicate" what do you mean, exactly? The use case here is I am trying to create SLIs from these metrics. Ideally, all spans and all errors would be contained in the same service. I suppose technically I can grab the errors from the top-level service (which doesn't identify endpoints properly so i'll have to create a custom metric) and grab the total count of requests from the "next" service (in order to avoid having to create a custom metric). It's just not very clean. If this behavior is expected you can close this and I'll work around it.

@rochdev
Copy link
Member

rochdev commented Jun 9, 2021

When you say "replicate" what do you mean, exactly?

I meant reproduce, sorry for the confusion.

If this behaviour is expected you can close this and I'll work around it.

It's expected with the way the code is currently written, but if you can't group errors properly because of it, it's definitely a behaviour we should change. Right now only actual exceptions thrown from Next will be caught as error for the -next suffixed service. I'll have to check with the team what we could do here to improve this and get back to you.

@rochdev
Copy link
Member

rochdev commented Jun 21, 2021

@awilson1801 We're planning to merge the http.request and next.request spans soon, which should resolve your issue. It should make it to the next release, but at worst it would be the release after that one.

@rochdev rochdev added community integrations and removed bug Something isn't working labels Jun 21, 2021
@rochdev rochdev added this to the 0.36.0 milestone Jun 21, 2021
@jakemhiller
Copy link

Should this be moved to a newer milestone? I don't think it has been resolved

@rochdev rochdev modified the milestones: 0.36.0, 2.0.0 Dec 3, 2021
@rochdev
Copy link
Member

rochdev commented Dec 3, 2021

It ended up requiring a breaking change to do this properly, so I'll move it to 2.0. We hope to ship this release by EOY or otherwise start of next quarter.

@rochdev
Copy link
Member

rochdev commented Feb 1, 2022

Fixed by #1802. It didn't make it into 2.0 but will be in the next release.

@rochdev rochdev closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants