-
Notifications
You must be signed in to change notification settings - Fork 351
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
_X_AMZN_TRACE_ID
environment variable disappeared
#849
Comments
It's explained here: https://docs.rs/lambda_runtime/latest/lambda_runtime/struct.Runtime.html#method.new
Maybe we need to move that variable somewhere else that doesn't depend in the Tracing layer. |
You can also take the information from the information context in your own layer. See how that's extracted in these two lines of code: https://github.com/awslabs/aws-lambda-rust-runtime/blob/lambda-runtime-0.11.0/lambda-runtime/src/layers/trace.rs#L46 |
If you want to get the trace id in your handler, you can use |
I'm going to change the layers to make that env variable always present. I'll probably release the change this weekend. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
I just released the version 0.11.1 which exposes that variable again to all layers. |
I'm trying the layering of runtime feature
Below code failed with
"_X_AMZN_TRACE_ID not set"
error. It seems the environment variable is unset here. How can I create a span using OpenTelemetry SDK (not tracing crate) whose trace id is retrieved from_X_AMZN_TRACE_ID
environment variable?The text was updated successfully, but these errors were encountered: