Sorry for the late response.
We enabled debug: true and confirmed that Sentry is definitely initialized in Lambda.
We’ve also verified:
- CLI import (
--import) is in place
- we additionally tested with the Sentry Lambda Layer
- no relevant errors/warnings in the Lambda logs besides Sentry debug output
What we’re currently seeing is:
- We do get root HTTP transactions such as
GET /[slug]
- however, those transactions do not contain the expected SSR / middleware spans
- instead, middleware-like entries such as
00.ignore, 01.redirect, 02.auth, 03.getUserLangSettings, 04.queryObjects, etc. appear as separate transactions
- those separate transactions are then dropped by
NuxtLowQualityTransactionsFilter
An additional interesting detail is that even our manual spans are ingested, but they also show up without a parent.
That seems to suggest the issue is not limited to the automatic middleware instrumentation, but that the active parent/root span context is generally not preserved or available when SSR-related work is executed.
So the issue does not seem to be that Sentry is missing entirely or that no HTTP root transactions are created.
Rather, the SSR-related spans do not seem to be attached to the existing HTTP root transaction and instead become standalone transactions.
We have also checked our infrastructure configuration and sentry-trace / baggage should be forwarded through CloudFront / API Gateway.
Given this, do you have any ideas what could cause spans in a Nuxt + Nitro aws_lambda setup to lose their parent / active context and become standalone transactions instead of child spans of the HTTP request transaction?
Would you expect any special handling or known limitations around async context propagation in Lambda / Nitro here?