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

Setup integration tests for each lambda layer

Open wpessers opened this issue 1 month ago • 0 comments

Is your feature request related to a problem? Please describe. There have been some problems in the past with unexpected behaviour of the instrumentation layers. Very recently for example an upgrade of a transitive dependency in the nodejs layer lead to issues with instrumentation libs no longer working inside the bundled code we deploy through the lambda layer, see: https://github.com/nodejs/require-in-the-middle/issues/120 and https://github.com/open-telemetry/opentelemetry-js-contrib/issues/3219

Not long after that the node 24 runtime was released and again we had some issues: https://github.com/open-telemetry/opentelemetry-lambda/issues/2034

At other times we've mentioned preferring to "smoke-test" some change to make sure stuff like runtime upgrades etc. will work nicely with the layers: https://github.com/open-telemetry/opentelemetry-lambda/pull/2056#pullrequestreview-3533941134

Describe the solution you'd like An integration test suite to quickly "smoke-test" each of the language-specific layers, as well as the collector layer. We can then run the relevant workflow(s) when a pr is submitted. Not certain how easy it is to set that up as a workflow that has to be approved, but for example only run the nodejs integration test when only nodejs code has been impacted.

Since we have an AWS account for publishing the lambda layers, we should be able to use that to run these integration tests as well. It should be relatively simple:

  1. setup infra (lambda function with layer(s), cloudwatch log group,...)
  2. invoke lambda function
  3. check debug logs to assert the required telemetry has been generated / exported
  4. destroy infra

Describe alternatives you've considered Currently I have some small repos for testing nodejs and python lambda layers. The samples for each layer are also a nice starting point. But it's annoying to have to deploy and manually check when this can all be automated.

Additional context Add any other context or screenshots about the feature request here.

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

wpessers avatar Dec 17 '25 21:12 wpessers