Troubleshooting
Missing Log Trace Correlation
Use this guide when logs appear in Vight but do not link back to traces or spans.
Symptom
Use this guide when logs appear in Vight but do not link back to traces or spans.
Logs appear on the Logs page but trace or span links are empty. Trace detail does not show the expected related logs. Only some requests have correlated events.
Likely causes
- Outside request context
- Logs created before a request starts, after it finishes, or in detached work may not have trace context.
- Startup order
- Logger capture that starts before trace context is available can produce logs without request links.
- Mismatched identity
- Traces and logs with different service or environment values are harder to compare and may not appear together.
Checks
Start with the broadest possible evidence window, then narrow the cause once you know where data is landing.
- 1
Confirm the log event is emitted while a traced request is active.
- 2
Confirm the logger integration runs in the same service process as the trace instrumentation.
- 3
Check whether asynchronous work emits logs after request context has ended.
- 4
Compare service, environment, trace, and timestamp filters on Logs and Traces.
Resolution
The fix should make new telemetry appear in the expected Vight page, under the expected service and environment, without relying on stale data.
Emit request logs inside the traced request path where possible. Start trace instrumentation before logger capture. Keep service and environment values consistent across traces and logs. Use trace detail related logs for request events and the Logs page for wider service context.
After applying the fix, validate it this way: Emit a log inside the handler for a traced request. Open the trace detail and check related logs. Open the same event in Logs and confirm trace and span fields are populated. Repeat with one asynchronous path if that is where important events are emitted.