ref(aws-serverless): Streamline AwsLambda instrumentation#21758
Draft
nicohrubec wants to merge 4 commits into
Draft
ref(aws-serverless): Streamline AwsLambda instrumentation#21758nicohrubec wants to merge 4 commits into
nicohrubec wants to merge 4 commits into
Conversation
… e2e coverage Adds e2e cases for callback-style handlers (success + error) and trace continuation from incoming headers, covering paths the existing async-only suite missed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Create the Lambda span via the `@sentry/core` `startInactiveSpan` API (within the extracted parent context) instead of the OTel tracer, and fold the integration's `requestHook` (origin/op) and `responseHook` (captureException) directly into the instrumentation. `otel.kind: SERVER` is preserved via the `kind` option. Ref JS-2849 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
size-limit report 📦
|
…gging Remove the vendored internal-types.ts (inline the one-line LambdaModule type) and replace OTel `diag` logging with Sentry's `debug` (gated on DEBUG_BUILD), dropping the `diag` import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cate disableAwsContextPropagation The eventContextExtractor option was hardcoded and never user-overridable, so inline Sentry's extractor directly and remove the unreachable default extractor (and the now-unused headerGetter/propagation plumbing). Deprecate the disableAwsContextPropagation option, which has been a no-op, and drop its dead default in the instrument factory. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Streamlines the AWS Lambda instrumentation.
The Lambda span is now created via the
@sentry/corestartInactiveSpanAPI — within the extracted parent context (otelContext.with(parent, …)) so incoming trace propagation is preserved — and activated withwithActiveSpan, instead oftracer.startSpan+trace.setSpan. The integration'srequestHook(origin/op) andresponseHook(captureExceptionwith mechanismauto.function.aws_serverless.otel) are folded directly into the instrumentation, and the hook config is removed.eventContextExtractor,disableAwsContextPropagation, force-flush, the SentrywrapHandlerlayering, andInstrumentationBasescaffolding are kept.otel.kind: SERVERis preserved via thekindoption onstartInactiveSpan; OTelrecordExceptionis dropped (errors are captured viacaptureException).Also adds e2e coverage for handler paths the existing async-only suite missed — callback-style handlers (success + error) and trace continuation from incoming headers. These pass both before and after the streamline, guarding that the migration is behavior-preserving.
Ref JS-2849
🤖 Generated with Claude Code