-
Notifications
You must be signed in to change notification settings - Fork 52
feat: Relayer tracing #681
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: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #681 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 17 17
Lines 767 767
=======================================
Hits 766 766
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 introduces distributed tracing capabilities to the relayer while minimizing code modifications. The implementation adds OpenTelemetry support with OTLP export alongside traditional stdout logging, moving tracing configuration from the server config to a dedicated tracing configuration section.
- Adds new tracing module with OpenTelemetry OTLP support and configurable logging
- Updates tracing attributes across relayer modules to include error debugging information
- Migrates log level configuration from server config to dedicated tracing config section
Reviewed Changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
programs/relayer/src/tracing.rs | New tracing configuration module with OpenTelemetry OTLP support |
programs/relayer/config.example.json | Updates configuration format to use dedicated tracing section |
packages/relayer/core/src/config.rs | Moves tracing config from server config to dedicated TracingConfig struct |
packages/relayer/core/src/builder.rs | Enhances instrumentation in relayer startup and request handling |
Multiple module files | Updates tracing attributes to include error debugging across relayer modules |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This task was only for the relayer and should target main. You can split out the attestor tracing and put that into a separate PR when this has been merged to main and then backported to Edit: I see now that there are only minor changes to the attestor part, which is good. But please target main for this. |
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.
This is a good start, left a few comments, but I also wonder about issue (IBC-145): it states a couple of definitions of done that I am not sure is fulfilled here. Please make sure that it is.
9f159f4
to
b989964
Compare
8b13a80
to
c15f1a1
Compare
3959487
to
d4be5b4
Compare
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
de96759
to
cde32e6
Compare
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 adds distributed tracing capability to the IBC Eureka relayer to improve observability and debugging in distributed systems. The implementation leverages OpenTelemetry standards for trace collection and propagation across service boundaries.
- Introduces observability configuration with optional OTLP export for distributed tracing
- Adds automatic trace context propagation for gRPC services using interceptors
- Includes local Grafana stack setup for development and testing
Reviewed Changes
Copilot reviewed 34 out of 38 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
programs/relayer/src/observability.rs |
Core observability module with OTLP tracer/logger setup |
packages/relayer/lib/src/utils/tracing_layer.rs |
gRPC interceptor for automatic trace context extraction |
packages/relayer/core/src/builder.rs |
Integration of tracing interceptor with gRPC server |
packages/relayer/core/src/config.rs |
Configuration structure for observability settings |
scripts/local-grafana-stack/ |
Complete local observability stack with Grafana, Tempo, and Prometheus |
Various module files | Enhanced tracing attributes for better error context |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
} | ||
if let Some(provider) = self.otel_logger_provider.take() { | ||
// There is no shutdown on SdkLoggerProvider in 0.30; drop flushes processors. | ||
let _ = provider; |
Copilot
AI
Aug 26, 2025
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.
The comment indicates there's no shutdown method in 0.30, but using let _ = provider;
makes the intent unclear. Consider using drop(provider);
to explicitly show intentional disposal or add a more descriptive comment explaining why the variable is being discarded.
let _ = provider; | |
drop(provider); |
Copilot uses AI. Check for mistakes.
|
||
let provider = setup_otlp_logger(&config); | ||
assert!(provider.is_ok()); | ||
drop(provider); |
Copilot
AI
Aug 26, 2025
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.
These explicit drop()
calls in tests are unnecessary since variables would be dropped automatically at the end of their scope. Consider removing them for cleaner test code.
drop(provider); |
Copilot uses AI. Check for mistakes.
|
||
let tracer_provider = setup_otlp_tracer(&config); | ||
assert!(tracer_provider.is_ok()); | ||
drop(tracer_provider); |
Copilot
AI
Aug 26, 2025
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.
These explicit drop()
calls in tests are unnecessary since variables would be dropped automatically at the end of their scope. Consider removing them for cleaner test code.
drop(tracer_provider); |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Description
💀 Similar Files
docs/tracing.md and docs/logging.md slightly overlap. Since both tracing and logging sometimes share similar characteristics and their responsibilities are also close, we need to decide whether and how to merge these two files.
closes: IBC-145
🔴 Please read
start
function, which requires extensive tracing.Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.