Skip to content

Add x-ray tracing to tag-page-rendering - #16453

Draft
jorgeazevedo wants to merge 1 commit into
mainfrom
ja-auto-instrumentation
Draft

Add x-ray tracing to tag-page-rendering#16453
jorgeazevedo wants to merge 1 commit into
mainfrom
ja-auto-instrumentation

Conversation

@jorgeazevedo

@jorgeazevedo jorgeazevedo commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What does this change?

This implements request tracing in tag-page-rendering. There quite a number of technical aspects to review, but broadly the idea is

  • Make this safe to merge by not modifying the main express server, as this is used by ec2. Instead, we use the otel auto instrumentation, which works by injecting some javascript that runs before the main express server (TODO: is this still true now that it's using new OpenTelemetryWebpackPlugin at build time ?)
  • Have the traces be available locally (via Jaeger) and on AWS (via X-ray )

Jaeger screenshot
Screenshot 2026-07-24 at 13 16 20

X-ray screenshot (see it in AWS)

Screenshot 2026-07-24 at 13 20 51

Architecture

OTEL (OpenTelemetry)

While there is an AWS X-ray SDK to post traces directly to the service, I believe it's been deprecated in favour of using OTEL. OTEL Is also a good match as it decouples the collection of traces from the services they end up in. The application posts the traces to http://localhost:4318, which in AWS is an x-ray sidecar that forwards them to x-ray, but locally is a Jaeger container that stores the data and makes available via a web UI.

Auto instrumentation

TODO: how we inject the javascript. And how auto instrumentation doesn't support webpack, so this PR uses a community plugin to get it to work

Jaeger

Jaeger is an open-source tracing platform. We use the official container

X-ray

TODO: The implementation is based on the official AWS otel collector container. I found documentation to be quite sparse, so I had copilot help write it and set it up with a default configuration file that's bundled with the container and does what we want, but I'm not super familiar with this aspect of it yet. The end result is similar to the one in this aws page.

Why?

How has this change been tested?

Screenshot 2026-07-24 at 13 22 58

Screenshots

Before After
before after

@jorgeazevedo jorgeazevedo changed the title Add automatic telemetry export Add x-ray tracing to tag-page-rendering Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

@jorgeazevedo jorgeazevedo added the feature Departmental tracking: work on a new feature label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant