-
Notifications
You must be signed in to change notification settings - Fork 544
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
feat(lambda): add OTEL_LAMBDA_DISABLE_AWS_CONTEXT_PROPAGATION environment variable #1227
feat(lambda): add OTEL_LAMBDA_DISABLE_AWS_CONTEXT_PROPAGATION environment variable #1227
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1227 +/- ##
==========================================
- Coverage 96.13% 95.15% -0.98%
==========================================
Files 14 17 +3
Lines 906 1177 +271
Branches 197 249 +52
==========================================
+ Hits 871 1120 +249
- Misses 35 57 +22
|
plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts
Outdated
Show resolved
Hide resolved
@@ -77,6 +78,18 @@ export class AwsLambdaInstrumentation extends InstrumentationBase { | |||
|
|||
constructor(protected override _config: AwsLambdaInstrumentationConfig = {}) { | |||
super('@opentelemetry/instrumentation-aws-lambda', VERSION, _config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about modifying the config object before using it as a paramater in the super
call? might be a bit more robust IMO
e.g, apply the env variable logic first, construct an updated config object, and only then call super
with this final config
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plugins/node/opentelemetry-instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts
Outdated
Show resolved
Hide resolved
plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dyladan I was about to submit this same PR! It would be great to have this shipped
…ronment variable The variable `OTEL_LAMBDA_DISABLE_AWS_CONTEXT_PROPAGATION` can be used to disable aws context propagation. This is similar to the proposed changes in the JS implementation: open-telemetry/opentelemetry-js-contrib#1227 Signed-off-by: Alex Boten <[email protected]>
…ronment variable (#1507) * Adds an option to configure `disable_aws_context_propagation` by environment variable The variable `OTEL_LAMBDA_DISABLE_AWS_CONTEXT_PROPAGATION` can be used to disable aws context propagation. This is similar to the proposed changes in the JS implementation: open-telemetry/opentelemetry-js-contrib#1227 Signed-off-by: Alex Boten <[email protected]> * update changelog * Apply suggestions from code review Co-authored-by: Srikanth Chekuri <[email protected]> Signed-off-by: Alex Boten <[email protected]> Co-authored-by: Srikanth Chekuri <[email protected]>
There are still some open comments in this PR which I think are easy to address. |
@dyladan - I cannot rebase this PR. |
Needs to run lint:fix and check why tests are failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's been an update toe the spec to change the behaviour and add a span link for the trace available in the environment variable. See open-telemetry/opentelemetry-specification#3166 and here's an example implementation: open-telemetry/opentelemetry-specification#3166. This change can be addressed separately
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This PR was closed because it has been stale for 14 days with no activity. |
Adds an option to configure the
disableAwsContextPropagation
by environment variable