opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

[Python] Lambda Layer with AppSync DataSource

Open lancetarn opened this issue 3 years ago • 1 comments

Hello! I am interested in setting up lambda functions as AppSync data sources. One of my goals is to propagate the trace Id from a browser-instrumented fetch call through to these data sources. I'm currently using the x-amzn-trace-id via the AwsXRayPropagator on the front-end. This comes through to the lambda event under a nested key

event["request"]["headers"]

which is a good start. I see that the python AwsLambdaInstrumentor can accept a custom function to extract the request context. However, the layer here does not appear to provide any way to hook into that.

Anyone have advice on how I can accomplish this, aside from forking and building my own layer? I'm hoping I'm just missing something. I'm also willing to do some work if there are PRs that would be useful. The lambda layer is otherwise auto-instrumenting the lambda functions and exporting in a way that I mostly expect.

Thanks!

lancetarn avatar Sep 15 '22 20:09 lancetarn

This issue was marked stale. It will be closed in 30 days without additional activity.

github-actions[bot] avatar Jun 23 '24 03:06 github-actions[bot]