OEV-1414 Add feedAddress to meta metrics#502
Open
cll-gg wants to merge 7 commits into
Open
Conversation
Contributor
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Meta client OTEL metrics to include a per-feed/per-contract address dimension, improving observability by allowing status/latency/errors/bid counts to be segmented by destination.
Changes:
- Added a new
feedAddressparameter to MetaMetrics recording methods and propagated it through MetaClient call sites. - Attached an address attribute to Meta-related metrics (status code, latency, bids received, and error counters).
- Updated unit tests to cover the new method signatures.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| pkg/txm/clientwrappers/dualbroadcast/meta_metrics.go | Adds an address attribute to Meta metrics and updates metric recording method signatures. |
| pkg/txm/clientwrappers/dualbroadcast/meta_metrics_test.go | Updates tests to call the updated MetaMetrics methods with a feed address argument. |
| pkg/txm/clientwrappers/dualbroadcast/meta_client.go | Passes an address through when recording Meta metrics during request/operation lifecycle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
207
to
210
| meta, err := a.SendRequest(ctx, tx, attempt, *meta.DualBroadcastParams, tx.ToAddress) | ||
| if err != nil { | ||
| a.metrics.RecordSendRequestError(ctx) | ||
| a.metrics.RecordSendRequestError(ctx, tx.ToAddress.Hex()) | ||
| a.metrics.emitAtlasError(ctx, "send_request", a.customURL, err, tx) |
Comment on lines
215
to
218
| if meta != nil { | ||
| if err := a.SendOperation(ctx, tx, attempt, *meta); err != nil { | ||
| a.metrics.RecordSendOperationError(ctx) | ||
| a.metrics.RecordSendOperationError(ctx, tx.ToAddress.Hex()) | ||
| a.metrics.emitAtlasError(ctx, "send_operation", a.customURL, err, tx) |
Comment on lines
+389
to
+394
| latency := time.Since(requestStartTime) | ||
|
|
||
| feedAddress := tx.ToAddress.Hex() | ||
|
|
||
| // Record latency | ||
| a.metrics.RecordLatency(ctx, latency) | ||
| a.metrics.RecordLatency(ctx, latency, feedAddress) |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+333
to
334
| func (a *MetaClient) SendRequest(parentCtx context.Context, tx *types.Transaction, attempt *types.Attempt, txMeta *types.TxMeta, fwdrDestAddress common.Address) (*MetacalldataResponse, error) { | ||
| m := []byte{97, 116, 108, 97, 115, 95, 111, 101, 118, 65, 117, 99, 116, 105, 111, 110} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add feedAddress to meta client related metrics
Why
To improve observability