You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When prod traces are logged with autoInstrumentation=true some traces fail to be shown in the DevUI. The proximate cause is that traces are logged without a startTime attribute on the span. You will also see spans in GCP with "Missing span ID" errors. The start/end dates are missing for the same reason. We determined that turning off autoinstrumentation restores startTime, because the root span will be provided by Genkit in that case.
Describe the bug
When prod traces are logged with
autoInstrumentation=true
some traces fail to be shown in the DevUI. The proximate cause is that traces are logged without a startTime attribute on the span. You will also see spans in GCP with "Missing span ID" errors. The start/end dates are missing for the same reason. We determined that turning off autoinstrumentation restores startTime, because the root span will be provided by Genkit in that case.Upon further investigation, this appears to be attributed to Nextjs specific behavior. Sentry also encountered this issue: getsentry/sentry-javascript#11046. Most likely Nextjs specific implementation details are required to resolve. Nextjs provides a "hook" (
instrumentation.ts
) for initializing OTel. See also: https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation.To Reproduce
Steps to reproduce the behavior. Code samples.
Expected behavior
All prod traces in the remote tracestore should be viewable in the DevUI
Screenshots
Here's an example trace in Firestore without startTime
And in cloud trace (missing root span)
![image](https://private-user-images.githubusercontent.com/2858322/343288218-f809df66-854e-435d-b9b6-65008975a08f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5ODc1MzMsIm5iZiI6MTczOTk4NzIzMywicGF0aCI6Ii8yODU4MzIyLzM0MzI4ODIxOC1mODA5ZGY2Ni04NTRlLTQzNWQtYjliNi02NTAwODk3NWEwOGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTlUMTc0NzEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTc0ZmUwNWZlMzFiODQyZDE1MDViNTJhYzQzOGM2NmEzMDNmZTFkMzlmNGVhZTE3OTdjNWMxNzg0NjA5M2U4YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.LrNGc0fXxpBOaM46gkOhW6vge0bEUExOv7Vs4YLAJw4)
Runtime (please complete the following information):
NextJS app deployed to Firebase App Hosting
The text was updated successfully, but these errors were encountered: