Skip to content

BAU: configure OpenTelemetry ID Generator#1852

Merged
cadmiumcat merged 1 commit intomainfrom
whi-tw/configure_propagator_id_generator
Feb 12, 2026
Merged

BAU: configure OpenTelemetry ID Generator#1852
cadmiumcat merged 1 commit intomainfrom
whi-tw/configure_propagator_id_generator

Conversation

@whi-tw
Copy link
Copy Markdown
Contributor

@whi-tw whi-tw commented Jan 20, 2026

We need to use the XRay ID generator when using the XRay propagator, in
order to generate trace IDs in the correct format. As we're configuring
the propagator via the OTEL_PROPAGATORS environment variable, we can
gate the ID generator configuration behind the same variable to keep
things agnostic.

This can only be done via code, so we have to add this to the
OpenTelemetry SDK configuration in an initializer.
see: https://arc.net/l/quote/ctffkmlm

What problem does this pull request solve?

Trello card:

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@lfdebrux
Copy link
Copy Markdown
Contributor

Please could you replace the link in the commit message with https://aws-otel.github.io/docs/getting-started/ruby-sdk/trace-manual-instr#instrumenting-an-application:~:text=Next%2C%20because%20the%20AWS%20X%2DRay%20ID%20Generator%20can%20only%20be%20configured%20through%20code%2C%20you%20cannot%20use%20an%20environment%20variable%20to%20select%20it.%20The%20ID%20Generator%20must%20be%20used%20at%20the%20time%20OpenTelemetry%20Ruby%20SDK%20is%20configured. so that the destination is transparent and recoverable if something happens to Arc/the AWS Otel docs? Thanks! 🙏

We need to use the XRay ID generator when using the XRay propagator, in
order to generate trace IDs in the correct format. As we're configuring
the propagator via the OTEL_PROPAGATORS environment variable, we can
gate the ID generator configuration behind the same variable to keep
things agnostic.

This can only be done via code, so we have to add this to the
OpenTelemetry SDK configuration in an initializer.
see: https://aws-otel.github.io/docs/getting-started/ruby-sdk/trace-manual-instr#instrumenting-an-application:~:text=Next%2C%20because%20the%20AWS%20X%2DRay%20ID%20Generator%20can%20only%20be%20configured%20through%20code%2C%20you%20cannot%20use%20an%20environment%20variable%20to%20select%20it.%20The%20ID%20Generator%20must%20be%20used%20at%20the%20time%20OpenTelemetry%20Ruby%20SDK%20is%20configured
@cadmiumcat cadmiumcat force-pushed the whi-tw/configure_propagator_id_generator branch from 6c62a01 to 73d19ba Compare February 12, 2026 09:05
@sonarqubecloud
Copy link
Copy Markdown

@cadmiumcat cadmiumcat added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit 1722ca0 Feb 12, 2026
5 checks passed
@cadmiumcat cadmiumcat deleted the whi-tw/configure_propagator_id_generator branch February 12, 2026 09:13
@github-actions
Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

Important

Not all of the functionality of forms-runner is present in review apps.
Functionality such as sending emails, file upload, and S3 submission types are
deliberately disabled for the sake of simplifying review apps.

You should use the full dev environment to test the functionality which is disabled here.

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

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.

3 participants