Commit b16709e
Fix ImportError with slash-delimited Lambda handler paths (open-telemetry#3894)
* Fix ImportError with slash-delimited Lambda handler paths
AWS Lambda accepts handler paths in both formats:
- Slash-delimited: python/functions/api.handler
- Dot-delimited: python.functions.api.handler
The instrumentation was failing when slash-delimited paths were used
because it attempted to import invalid Python module paths containing
forward slashes. This fix normalizes the handler path by converting
slashes to dots before splitting the module and function names.
Fixes open-telemetry#1465
* Add changelog and unit test for slash-delimited handler fix
- Add changelog entry in Unreleased section
- Add unit test verifying both slash and dot-delimited handler paths work
- Test confirms instrumentation handles both formats correctly
Related to open-telemetry#1465
* Update CHANGELOG.md
Co-authored-by: Tammy Baylis <[email protected]>
---------
Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Tammy Baylis <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>1 parent e63e626 commit b16709e
File tree
3 files changed
+51
-0
lines changed- instrumentation/opentelemetry-instrumentation-aws-lambda
- src/opentelemetry/instrumentation/aws_lambda
- tests
3 files changed
+51
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| 463 | + | |
| 464 | + | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| |||
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
730 | 777 | | |
731 | 778 | | |
732 | 779 | | |
| |||
0 commit comments