open-telemetry / open-telemetry/opentelemetry-python-contrib

AwsLambda instrumentation not compatible with path based handlers.

Open
#3,733 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

Creating an issue to track this before opening a PR.

The AwsLambda Instrumentation attempts to load the lambda handler with import_module which if the user sets the handler with slashes instead of dots will cause the lambda error out. Both the lambda interfaces's bootstrap.sh and the otel_wrapper script in the layer replace the slashes with dots. Due to this, especially the fact that boostrap does the replacement, this change seems free of side effects.

I will open a PR if there are no concerns.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the AwsLambda Instrumentation handler-loading path and compare it with the slash-to-dot replacement in bootstrap.sh and the otel_wrapper script in the layer. Reproduce a path-based handler failure, then verify that the handler loads successfully without introducing side effects before opening a PR.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.