Skip to content

Add OpenTelemetry support to AWS binary - #985

Closed
ryanmilne-digicert wants to merge 1 commit into
transparency-dev:mainfrom
digicert:feat/aws-otel-exporter
Closed

ryanmilne-digicert wants to merge 1 commit into
transparency-dev:mainfrom
digicert:feat/aws-otel-exporter

Conversation

@ryanmilne-digicert

Copy link
Copy Markdown

This pull request adds comprehensive OpenTelemetry (OTel) metrics and tracing support to the AWS binary, closely aligning it with the POSIX binary's observability features. It introduces a new initialization routine for OTel, exposes configuration options via environment variables and flags, and includes robust documentation and tests for various exporter scenarios.

Key changes include:

OpenTelemetry Integration:

  • Added a new initOTel function in otel.go to set up OTel metrics, tracing, and Go runtime metrics using environment-driven exporters (OTLP, Prometheus, or none). This function configures resource attributes, sets up batchers, and ensures proper shutdown on service termination. (cmd/tesseract/aws/otel.go)
  • Introduced a --trace_fraction flag to control the sampling rate of root traces, with special handling for periodic Tessera root spans. (cmd/tesseract/aws/main.go)

Configuration and Documentation:

  • Updated the AWS binary documentation to explain OTel configuration, including exporter selection, resource attributes, Prometheus endpoint setup, and security considerations. (cmd/tesseract/aws/README.md)

Code Integration:

  • Integrated the OTel initialization and shutdown into the main binary startup sequence, ensuring metrics and tracing are active for the service lifetime. (cmd/tesseract/aws/main.go)

Testing:

  • Added comprehensive tests for OTel initialization covering Prometheus, OTLP, exporter misconfiguration, port conflicts, and trace sampling. The tests verify correct metrics exposure, resource labeling, and graceful shutdown. (cmd/tesseract/aws/otel_test.go)

@ryanmilne-digicert
ryanmilne-digicert requested a review from a team as a code owner November 6, 2026 20:38
@ryanmilne-digicert
ryanmilne-digicert requested review from mhutchinson and removed request for a team November 6, 2026 20:38
@google-cla

google-cla Bot commented Nov 6, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ryanmilne-digicert

Copy link
Copy Markdown
Author

Meant to create pull request in fork.

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