Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add http.route tags for API Gateway #524

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

nhulston
Copy link
Contributor

@nhulston nhulston commented Oct 25, 2024

What does this PR do?

Adds http.route tags for Lambdas that were triggered by API Gateway.

  • For APIGW v1, we set the route to the resource
  • For APIGW v2, we set the route to the routeKey

Motivation

These tags are used by API Catalog
https://datadoghq.atlassian.net/browse/SVLS-5779

A similar PR for universal instrumentation (Java, .NET, Golang) is already done: DataDog/datadog-agent@315c38f

See DataDog/datadog-lambda-js#584 for JavaScript changes.

Testing Guidelines

Manual tests; update unit tests and snapshots

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@nhulston nhulston force-pushed the nicholas.hulston/add-httproute-tags branch from 7bc663d to 1b7aee3 Compare October 25, 2024 19:02
@nhulston nhulston marked this pull request as ready for review October 25, 2024 19:08
@nhulston nhulston requested a review from a team as a code owner October 25, 2024 19:08
@nhulston nhulston requested a review from wantsui October 29, 2024 14:52
Copy link

@wantsui wantsui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I defer the serverless portion of the review to @duncanpharvey or anyone else in the Serverless side of things but the test results of http.route look good to me.

@nhulston nhulston merged commit 2b85536 into main Oct 29, 2024
51 checks passed
@nhulston nhulston deleted the nicholas.hulston/add-httproute-tags branch October 29, 2024 18:12
avedmala pushed a commit that referenced this pull request Oct 30, 2024
avedmala added a commit that referenced this pull request Nov 18, 2024
* add logic to extract traceID from _datadog header

* rename test

* fix type

* added root arn case

* trigger ci

* Add `http.route` tags for API Gateway (#524)

Add route tags

* feat: [SVLS-5677] DynamoDB Stream event span pointers (#522)

* trigger ci

* use default propagator.extract

* lint

* lint

* updated to use trace/parent hash from _datadog

* lint

* skip is context complete check

* remove unused import

* fix legacy lambda parsing with new header

* using context object instead of pre-hashed values

* fixed trigger tags and tests

* pull sfn trace id generation out into a helper

* added unit tests

* update test data

* rename stepfunctions to states

* update current serverless version to v1

* Update trigger comment

Co-authored-by: kimi <[email protected]>

---------

Co-authored-by: Nicholas Hulston <[email protected]>
Co-authored-by: Aleksandr Pasechnik <[email protected]>
Co-authored-by: kimi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants