-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat(listener): add listener_name as otel attribute #3050
Conversation
WalkthroughThe changes introduce a Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ChainListener
participant OtelRecorder
Client->>ChainListener: Initialize with WithName(name)
ChainListener->>ChainListener: Store name
ChainListener->>OtelRecorder: newOtelRecorder(meterHandler, chainID, name)
OtelRecorder->>OtelRecorder: Store listenerName
ChainListener->>Client: Ready to listen
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3050 +/- ##
====================================================
- Coverage 90.55118% 30.37006% -60.18113%
====================================================
Files 54 438 +384
Lines 1016 28347 +27331
Branches 82 82
====================================================
+ Hits 920 8609 +7689
- Misses 93 18926 +18833
- Partials 3 812 +809
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- ethergo/listener/listener.go (2 hunks)
- ethergo/listener/options.go (1 hunks)
- ethergo/listener/otel.go (3 hunks)
Additional comments not posted (6)
ethergo/listener/options.go (1)
57-57
: LGTM! The change enhances theWithName
function.Storing the listener's name within the
chainListener
instance improves the contextual representation and tracking of listeners.ethergo/listener/otel.go (3)
40-41
: LGTM! Addition oflistenerName
field enhances context.The
listenerName
field in theotelRecorder
struct provides better identification and tracking of listeners.
44-51
: LGTM! UpdatednewOtelRecorder
function signature.The addition of the
name
parameter to thenewOtelRecorder
function enhances the initialization of theotelRecorder
with the listener's name.
84-84
: LGTM! Inclusion oflistenerName
in metrics.The updates to
recordLastBlock
andrecordLastFetchedBlockAge
methods to include thelistenerName
attribute improve the tracking of listener-specific metrics.Also applies to: 99-99
ethergo/listener/listener.go (2)
56-56
: LGTM! Addition ofname
field inchainListener
.The
name
field enhances thechainListener
by allowing it to store a name associated with the listener instance.
98-98
: LGTM! UpdatedListen
method to passname
.Passing
c.name
to thenewOtelRecorder
function enhances the initialization of theotelRecorder
with the listener's name, improving metric tracking.
Deploying sanguine-fe with
|
Latest commit: |
fa71261
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ffed5f78.sanguine-fe.pages.dev |
Branch Preview URL: | https://feat-listener-otel.sanguine-fe.pages.dev |
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
WithName
option to store the listener's name in the chain listener instance.