Skip to content

fix: negative duration on aws.apigateway.authorizer span#782

Merged
pablomartinezbernardo merged 2 commits intomainfrom
pmartinez/authorizer-span
Apr 6, 2026
Merged

fix: negative duration on aws.apigateway.authorizer span#782
pablomartinezbernardo merged 2 commits intomainfrom
pmartinez/authorizer-span

Conversation

@pablomartinezbernardo
Copy link
Copy Markdown
Contributor

@pablomartinezbernardo pablomartinezbernardo commented Apr 6, 2026

What does this PR do?

Replicates what was done for DataDog/datadog-lambda-js#751

  • Fix authorizer-request-api-gateway-v1.json as it was using a ms x-datadog-parent-span-finish-time when it should be in ns
  • Ensure no negative duration authorizer spans
  • Add test

Motivation

Testing Guidelines

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)

"requestContext": {
"resourceId": "0et54l",
"authorizer": {
"_datadog": "eyJ4LWRhdGFkb2ctdHJhY2UtaWQiOiAiMTM0Nzg3MDU5OTU3OTcyMjEyMDkiLCAieC1kYXRhZG9nLXBhcmVudC1pZCI6ICI4NDcxMjg4MjYzMzg0MjE2ODk2IiwgIngtZGF0YWRvZy1zYW1wbGluZy1wcmlvcml0eSI6ICIxIiwgIngtZGF0YWRvZy1wYXJlbnQtc3Bhbi1maW5pc2gtdGltZSI6IDE2NjMyOTUwMjE4MjcuNTIxLCAieC1kYXRhZG9nLWF1dGhvcml6aW5nLXJlcXVlc3RpZCI6ICJhYmMxMjMifQ==",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

{
   "x-datadog-trace-id":"13478705995797221209",
   "x-datadog-parent-id":"8471288263384216896",
   "x-datadog-sampling-priority":"1",
   "x-datadog-parent-span-finish-time":1663295021827.521,
   "x-datadog-authorizing-requestid":"abc123"
}

"resourceId": "0et54l",
"authorizer": {
"_datadog": "eyJ4LWRhdGFkb2ctdHJhY2UtaWQiOiAiMTM0Nzg3MDU5OTU3OTcyMjEyMDkiLCAieC1kYXRhZG9nLXBhcmVudC1pZCI6ICI4NDcxMjg4MjYzMzg0MjE2ODk2IiwgIngtZGF0YWRvZy1zYW1wbGluZy1wcmlvcml0eSI6ICIxIiwgIngtZGF0YWRvZy1wYXJlbnQtc3Bhbi1maW5pc2gtdGltZSI6IDE2NjMyOTUwMjE4MjcuNTIxLCAieC1kYXRhZG9nLWF1dGhvcml6aW5nLXJlcXVlc3RpZCI6ICJhYmMxMjMifQ==",
"_datadog": "eyJ4LWRhdGFkb2ctdHJhY2UtaWQiOiAiMTM0Nzg3MDU5OTU3OTcyMjEyMDkiLCAieC1kYXRhZG9nLXBhcmVudC1pZCI6ICI4NDcxMjg4MjYzMzg0MjE2ODk2IiwgIngtZGF0YWRvZy1zYW1wbGluZy1wcmlvcml0eSI6ICIxIiwgIngtZGF0YWRvZy1wYXJlbnQtc3Bhbi1maW5pc2gtdGltZSI6IDE2NjMyOTUwMjE4Mjc1MjEwMDAsICJ4LWRhdGFkb2ctYXV0aG9yaXppbmctcmVxdWVzdGlkIjogImFiYzEyMyJ9",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

{
   "x-datadog-trace-id":"13478705995797221209",
   "x-datadog-parent-id":"8471288263384216896",
   "x-datadog-sampling-priority":"1",
   "x-datadog-parent-span-finish-time":1663295021827521000,
   "x-datadog-authorizing-requestid":"abc123"
}

Copy link
Copy Markdown
Contributor

@joeyzhao2018 joeyzhao2018 left a comment

Choose a reason for hiding this comment

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

:shipit:

@pablomartinezbernardo pablomartinezbernardo merged commit 3883ffd into main Apr 6, 2026
105 checks passed
@pablomartinezbernardo pablomartinezbernardo deleted the pmartinez/authorizer-span branch April 6, 2026 14:24
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.

2 participants