-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update Instrumenting Amazon API Gateway with v2 content #29566
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
Conversation
Preview links (active after the
|
✅ Documentation Team ReviewThe documentation team has approved this pull request. Thank you for your contribution! |
|
||
### HTTP API (V2) | ||
|
||
Attach the parameter mapping that injects the headers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also include here info on what customers will need to do this manually, should they not deploy using the cdk? I'm thinking something along the lines of the "header|value" table that's included in V1. You can see what exactly those are here.
It's vitally important that the x-dd-proxy-request-time-ms
gets three zeros appended, as done with "${context.requestTimeEpoch}000"
, which turns the request time from seconds to milliseconds. Without this, the start time of the synthetic span will be off my a factor of 1000.
| `x-dd-proxy-domain-name` | `context.domainName` | | ||
| `x-dd-proxy-httpmethod` | `context.httpMethod` | | ||
| `x-dd-proxy-path` | `context.path` | | ||
| `x-dd-proxy-stage` | `context.stage` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These headers are set differently based on apigw version. Specifically the requestTimeEpoch
needs to be handled differently in v2 than in v1.
Take a look at https://github.com/DataDog/datadog-cdk-constructs/blob/b7a9aa75a8d40a89718481fecf8f41e175f5704f/src/apigateway/parameters.ts for the different values that should be set based on v1 or v2.
What does this PR do? What is the motivation?
https://datadoghq.atlassian.net/browse/DOCS-10997
Updating the Instrumenting Amazon API Gateway page to incorporate new content, as introduced in this PR: DataDog/datadog-cdk-constructs#430.
Merge instructions
Merge readiness:
For Datadog employees:
Merge queue is enabled in this repo. Your branch name MUST follow the
<name>/<description>
convention and include the forward slash (/
). Without this format, your pull request will not pass in CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.If your branch doesn't follow this format, rename it or create a new branch and PR.
To have your PR automatically merged after it receives the required reviews, add the following PR comment:
Additional notes