Tracing HTTP from Lambda to containers
Lumigo just got better at tracing your applications end-to-end! Since the launch of the support for Amazon Elastic Container Service, Lumigo has known how to trace HTTP requests issued by containers instrumented with OpenTelemetry and served via Lambda functions with Lumigo tracers (we call it the "Container -- HTTP -> Lambda" flow). Today, we launch support for "the other direction": tracing HTTP requests issued by Lambda functions and served by containers using OpenTelemetry ("Lambda -- HTTP -> Container" flow). Lambda functions interacting over HTTP with containers is a pattern we see, for example, in projects that started out as entirely serverless, and then introduced containers for specialized workloads that require specific hardware capabilities like GPUs for computation-intensive tasks. It is also rather common in lift-and-shift scenarios, where existing, on-premise workloads get containerized, and new capabilities surrounding them are developed serverless.
How does it work?
This new capability is based on the [W3C TraceContext standard](https://www.w3.org/TR/trace-context/), which is implemented by all OpenTelemetry SDKs and the [Lumigo OpenTelemetry distributions](https://docs.lumigo.io/docs/containerized-applications#lumigo-opentelemetry-distributions), and now is also implemented for outgoing HTTP requests in the Lumigo Lambda tracers for Python and Node.js. (Details on the precise versions of the tracers and Lambda layers are found below.)
Opt-in support for W3C TraceContext
Note that the support for W3C TraceContext in the Lumigo Lambda tracers is opt-in, activated via the `LUMIGO_PROPAGATE_W3C=true` environment variable to be set on the Lambda function. No additional work is needed on the container / OpenTelemetry side. There, W3C TraceContext support is built-in and enabled by default by the Lumigo OpenTelemetry distributions and virtually all upstream OpenTelemetry SDKs.
Supported Lambda tracer and layer versions
Node.js:
- @lumigo/tracer v1.75.0 and above
- Minimum layer versions (applicable to all supported Node.js runtimes)
Python:
- lumigo-tracer v1.1.206 and above
- Minimum layer versions (applicable to all supported Node.js runtimes)
How to activate W3C TraceContext support for your Lambda functions
- Ensure you are using a supported version of the tracer or the layer providing the tracer to your application (see previous section)
- Set on your Lambda function the `LUMIGO_PROPAGATE_W3C=true` environment variable
Further reading
- Lambda Python tracer documentation
- Lambda Node.js tracer documentation