opentelemetry-js-contrib
opentelemetry-js-contrib copied to clipboard
feat: report url for lambda invoked via api gateway
Which problem is this PR solving?
- Currently lambda invocations through an api gateway don't report the invoked url. The event passed to the handler has a different shape in that type of invocation. This can make it hard to tell invocations apart when different paths flow to the same logic.
Short description of the changes
- I cribbed from the java implementation of this concept - basically if it appears that all the necessary information to compute the invoked url is there, then use that. Java was using the new http semantic conventions (
url.full) but nothing else in this repo was, so I stuck withhttp.url
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.78%. Comparing base (
ba615db) to head (67b0ae5). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2404 +/- ##
==========================================
+ Coverage 90.75% 90.78% +0.03%
==========================================
Files 169 169
Lines 8026 8055 +29
Branches 1635 1643 +8
==========================================
+ Hits 7284 7313 +29
Misses 742 742
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...-instrumentation-aws-lambda/src/instrumentation.ts | 94.52% <100.00%> (+0.92%) |
:arrow_up: |
This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature. Are you familiar with this package? Consider becoming a component owner.
Could we mark @open-telemetry/lambda-extension-approvers or somesuch as the owner of the lambda instrumentation? Essentially this component is used as part of the otel-lambda repo/build.
Could we mark
@open-telemetry/lambda-extension-approversor somesuch as the owner of the lambda instrumentation? Essentially this component is used as part of the otel-lambda repo/build.
@pichlermarc also https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2403 was approved and merged a couple days ago... this lambda instrumentation is in fact under active development/maintenance.
@tylerbenson your thoughts on lambda sig ownership of the various language components?
I'm fine with the lambda approvers taking ownership. @serkan-ozal also volunteered to own it if you'd prefer an individual vs a team.
Could we mark
@open-telemetry/lambda-extension-approversor somesuch as the owner of the lambda instrumentation? Essentially this component is used as part of the otel-lambda repo/build.
@johnbley absolutely, we'd very much appreciate this. :slightly_smiling_face: The way to do is is that someone from @open-telemetry/lambda-extension-maintainers opens a component ownership request issue. I'll then open a PR to add the team there :slightly_smiling_face:
@pichlermarc also #2403 was approved and merged a couple days ago... this lambda instrumentation is in fact under active development/maintenance.
In #2403 @dyladan acted as a feature sponsor according to the guidelines. Components are marked as "unmaintained" when there's no assigned owner.
Unfortunately, we had to introduce this guideline as many contributed components (like @opentelemetry/instrumentation-aws-lambda) got abandoned by their original owners. We would like to keep all components around, but the diverse set of packages that are being instrumented in this repo require immense maintenance effort which significantly slows down SDK/API development.
@serkan-ozal Thanks for your careful review!
@johnbley You're welcome and thanks for the contribution.
there is a ongoing PR for adding a component owner https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2506
@jj22ee you may want to have a look a this one