-
Notifications
You must be signed in to change notification settings - Fork 1
RA-8279: feat(otel): Add OpenTelemetry distributed tracing and ctutils logging integration #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
RA-8279: feat(otel): Add OpenTelemetry distributed tracing and ctutils logging integration #3
Conversation
… integration
This change integrates the digicert/ctutils shared logging library to enable
OpenTelemetry-compliant distributed tracing across the Trillian log server and
signer components.
Key changes:
- Add config/config.go with InitLogging() for centralized OTEL configuration
- Update log_server and log_signer main.go to call config.InitLogging()
- Add chained gRPC interceptors for trace context propagation
- Add Dockerfile.unified with SSH access for private ctutils dependency
- Update go.mod/go.sum for ctutils v0.1.6 and OTEL dependencies
The logging configuration is driven by environment variables:
- OTEL_ENABLED: Enable/disable OpenTelemetry (default: false)
- OTEL_EXPORTER: Exporter type ('otlp' or 'stdout')
- OTEL_COLLECTOR_ENDPOINT: OTLP collector URL
- OTEL_SERVICE_NAME: Service name for traces
- OTEL_SAMPLE_RATIO: Sampling ratio (0.0-1.0)
This enables end-to-end request tracing from CTFE through Trillian backends,
allowing operators to correlate logs and traces across the CT infrastructure.
Refs: RA-8279
chore(deps): update ctutils
chore(deps): update ctutils
chore(deps): update ctutils
There was a problem hiding this 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 integrates OpenTelemetry distributed tracing into Trillian log server and signer components through the digicert/ctutils shared logging library, enabling end-to-end request tracing and structured logging.
Changes:
- Added OTEL-compliant distributed tracing via ctutils dependency
- Configured gRPC and HTTP middleware for trace propagation and logging
- Added environment-variable based OTEL configuration
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| config/config.go | New centralized logging initialization with OTEL setup |
| cmd/trillian_log_server/main.go | Initialize logging on server startup |
| cmd/trillian_log_signer/main.go | Initialize logging on signer startup |
| cmd/internal/serverutil/main.go | Add gRPC/HTTP interceptors for trace propagation |
| go.mod/go.sum | Add ctutils v0.1.13-test and updated OTEL dependencies |
| examples/deployment/docker//Dockerfile | Docker build configuration for private ctutils dependency |
| .github/workflows/*.yaml | CI authentication for private ctutils repository |
| README.md | Documentation for OTEL configuration |
| experimental/batchmap/batchmap.shims.go | Auto-generated code formatting updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chore(deps): update ctutils
chore(deps): update ctutils
Removed accidental duplicate comments introduced during previous edits to ensure clean and readable Dockerfiles.
Removed a commented-out require statement for ctutils that was causing confusion, as the actual requirement is correctly defined later in the file.
replaced os.Setenv with t.Setenv to fix errcheck lint errors and improve test cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ockerfiles for log server and signer
…argument and streamlining build commands
Co-authored-by: himaschal <himaschal@users.noreply.github.com> Test version for golem rollout
…cessary and not recommended according to best practice. This will also keep the logserver / logsigner logs clean from unnecessary logs when scheduled jobs run like health checks or metrics scraping
|
QA Evidence for CT Log : Test Case 1 : Deploy Jaeger and Configure OTLP Export : Jaeger pod deployed successfully - Services configured with OTLP export - Jaeger UI accessible at http://localhost:16686 CTFE API accessible at http://localhost:6962 ======================================================================================== Test 2: Verify Distributed Tracing in Jaeger UI
======================================================================================== Test 3: W3C Trace Context Propagation
======================================================================================== Test 4: Cross-Service Trace Propagation
======================================================================================== Test 5: Structured Logging with Trace Context
======================================================================================== Test 6: Multiple Requests with Shared Trace **- All 3 requests succeed : ** - Logs show 3+ entries with same trace_id : - Each entry has different span_id : ======================================================================================== Test 7: Performance and Timing Analysis 1. Trace ID : 4dd4c18687c1d0f1b54bba5f7223efd7 : 2.Trace ID : 089ff8e936e3df81afbfb9fe416f3194 : 3.Trace ID : b3aec802d23c219702cc36f7d7a3b1e6 : 4.Trace ID : 9a4723af4335407b39318948fb92d9b6 : 5.Trace ID : bea9a080ada3f6739735ab113f1ad7c2 : 6.Trace ID : 4ae35982188663fee3d8eeb622866356 : 7.Trace ID : 8018b3ff51e0b343206a6b984802c18b : 8.Trace ID : a3699b3aef49a80fc73aae7bb5bd6e5f : 9.Trace ID : 4a4f82d3b182303ed0b773c0460b9169 : 10.Trace ID : 26a99abfc5ad08be508a00b301abb032 : ======================================================================================== Test 8: Service Dependencies Visualization
|
ℹ️ Release Coordination (Downstream of ctutils)
This feature depends on
digicert/ctutils(RA-8279).Status: Ready for review (ensure
ctutilsv1.0.0 tag is available).Plan:
digicert/ctutilsPR1 merge & v1.0.0 tag.go.modin this PR to usedigicert/ctutils v1.0.0.Summary
Integrates the
digicert/ctutilsshared logging library to enable OpenTelemetry distributed tracing across Trillian Log Server and Log Signer. This allows full request tracing from the frontend (CTFE) through to the storage layer.Features
ctutilsadapters.OTEL_*environment variables.Configuration
See the README Observability Section for full details.
OTEL_ENABLEDOTEL_EXPORTERotlp(collector) orstdout(debug)LOG_LEVELTesting
Integration verified in typical deployment scenarios:
See full e2e testing here
Refs: RA-8279