Skip to content
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

Add new localstack tracer to return tracing headers set by invoke #31

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Feb 5, 2024

Motivation

With the latest release, due to changes in the upstream code, the tracing id was not sent to the runtime interface clients as expected.
Due to the interface changes, returning the trace id sent in the invoke id was directly possible anymore, which is why we need to set the invoke struct into the tracer on every "configure" call (happens on every invoke), which we can then use to return the trace ID again.

Changes

  • Add new LocalStack tracer that replaces the NoopTracer and takes the tracing header from the invoke payload

Copy link
Member

@joe4dev joe4dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Successfully run a couple of test cases:

  • test_lambda_xray.TestLambdaXrayIntegration.test_basic_xray_integration
  • test_lambda.TestLambdaBehavior.test_runtime_introspection_arm
  • test_lambda.TestLambdaBehavior.test_runtime_introspection_x86
  • test_lambda.TestLambdaFeatures.test_invocation_type_request_response

cmd/localstack/tracer.go Show resolved Hide resolved
@dfangl dfangl merged commit e063557 into localstack Feb 6, 2024
1 check passed
@dfangl dfangl deleted the fix-xray-tracing-header branch February 6, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants