Skip to content

Conversation

@andrewleith
Copy link
Member

Summary | Résumé

Use aws-lambda-powertools instead of trying to get a trace id directly from the xray sdk.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

TODO: Fill in test instructions for the reviewer.

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

@andrewleith andrewleith marked this pull request as ready for review June 3, 2025 15:34
@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 15:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces direct AWS X-Ray SDK usage with AWS Lambda Powertools for tracing, updating project dependencies and version references.

  • Bump version to 53.2.5 and add aws-lambda-powertools dependency
  • Swap aws_xray_sdk import for Tracer in logging and update trace ID logic
  • Update GitHub Actions requirement to use the new package version

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
pyproject.toml Bumped version and added aws-lambda-powertools dependency
notifications_utils/logging.py Imported Tracer, initialized tracer, and updated trace_id
.github/actions/waffles/requirements.txt Updated notifications-utils Git reference to version 53.2.5
Comments suppressed due to low confidence (2)

notifications_utils/logging.py:199

  • Add unit tests for XRayTraceIdFilter.trace_id to verify behavior when tracer.current_trace_id is set and when it falls back to "no-trace-id".
return tracer.current_trace_id or "no-trace-id"

pyproject.toml:17

  • [nitpick] Since the X-Ray SDK import was removed from logging.py, consider removing aws-xray-sdk from dependencies if it’s no longer used elsewhere.
aws-xray-sdk = "2.14.0"

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.

1 participant