-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Error on span using sentry-opentelemetry #12697
Comments
Thanks for the detailed issue report @MeCapron. On the prod environment you're using, it looks like the timestamp is recorded as milliseconds in OpenTelemetry and breaks our converting utility. I'll open a PR to add a support for that case 👍 |
Do you know what causes this? From my side the only thing that differs from my Docker environment to the production one in K8S is the Kernel. I might miss some thing, I'm trying to add some context by adding the full debug mode in the server side When I looked of the code related to opentelemetry, AFAIK the startTime must be a |
Here are the logs found on server side from server started to server crash :
In any case it helps, here is the same thing I do (build and start the server) locally :
Here are some spans after the POST Some things that appears in my production but not in local :
|
import { startExpressServer } from "./server/express";
import "./instrumentation.server.mjs";
startExpressServer(); Could you move |
A span appeared but it crahses after! I updated my comment just before to add the logs of my local Here is the full stack after the change you asked for :
|
Thanks for the additional info, we are looking into it! I still don't really get how a span may have a different startTime type, because it should not really be possible according to the spec/types, but we'll guard more carefully there anyhow! |
Hello @mydea @onurtemizkan I thank you for your glad help and looking into this issue. I can say how precisely this scenario appears. After digging a bit more in the code side and debugging locally, I checked on the server side (since it was only happening there) just to find, after getting some accesses from the provider, that they were installing on the deployment side some packages : ni express-prom-bundle@6.4.1 prom-client@14.0.1 @opentelemetry/instrumentation@0.34.0 @opentelemetry/instrumentation-http@0.34.0 @opentelemetry/api@1.3.0 Sentry JS needs version 0.52.0 for telemetry and instrumentation, 1.9.0 for its main API It seemed to conflict. Removing these packages solved the issue, I did not took the time to dug into oldest telemetry and API on their repository but it might be the oldest way they handled starting time for spans. However one thing that comes in my mind (tbh I'm not fully comfortable with npm management regarding conflicts since I come from composer) and I would be glad if you can give me some hints : how can the install goes well in terms of conflict management? AFAIK the installation is not forced, even though it made the all system incompatible between the requirements of the provider vs Sentry. I think that it should have crashed, am I wrong? |
Yeah, this is unfortunate as of today 😬 Especially because all/most of these packages are <1, deduping does not work at all for them. Ideally we can find some ways to report on this better than we do today, but this is a bit tricky. For now, I believe if you enable |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
8.13.0
Framework Version
Remix 2.8.1
Link to Sentry event
https://adexos.sentry.io/issues/5547923468/?project=4507505661837312&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=14d&stream_index=0
SDK Setup/Reproduction Example
Steps to Reproduce
See file configurations below
Specs
Here are the specs :
I tried to reproduce it locally with the same docker config but I do not have any errors on my side
File configurations
Here are my files :
I launch the server this way :
"start": "cross-env NODE_ENV=production node --import tsx/esm ./server.mjs"
What I tried
Sorry I could not reproduce it locally, but maybe you have an idea of what is going on.
I also tried with a lower version of
@sentry/remix:8.0.0
instead of my@sentry/remix:8.13.0
and the same result occurs.Not tried with a different version of the vite plugin.
Since I cannot reproduce it locally, I only checked the code regarding Sentry and open telemetry and did not find anything suspicious regarding my issue.
I linked an issue where you can see the crash happening on Sentry side (that is captured)
Expected Result
Having no error on Node side
Actual Result
The logs
I have installed Sentry properly on my local docker without any problem, evertyhing is running smoothly.
However, in production I have a problem I cannot tackle, here are the two traces that reboot the server again and again :
and
The application crashes here : https://github.com/getsentry/sentry-javascript/blob/develop/packages/opentelemetry/src/spanExporter.ts#L239 where the
span.startTime
is a full number instead of an array[number, number]
I hope you have some ideas!
Thanks you
The text was updated successfully, but these errors were encountered: