Skip to content

OEV-1414 Add feedAddress to meta metrics#502

Open
cll-gg wants to merge 7 commits into
developfrom
OEV-1414-add-feed-label-to-meta-metrics
Open

OEV-1414 Add feedAddress to meta metrics#502
cll-gg wants to merge 7 commits into
developfrom
OEV-1414-add-feed-label-to-meta-metrics

Conversation

@cll-gg

@cll-gg cll-gg commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What

Add feedAddress to meta client related metrics

Why

To improve observability

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-evm

⚠️ Breaking Changes (6)

pkg/txm/clientwrappers/dualbroadcast.(*MetaClient) (1)
  • SendRequest — Type changed:
func(
  context.Context, 
  *github.com/smartcontractkit/chainlink-evm/pkg/txm/types.Transaction, 
  *github.com/smartcontractkit/chainlink-evm/pkg/txm/types.Attempt, 
  - string, 
  + *github.com/smartcontractkit/chainlink-evm/pkg/txm/types.TxMeta, 
  github.com/ethereum/go-ethereum/common.Address
)
(*MetacalldataResponse, error)
pkg/txm/clientwrappers/dualbroadcast.(*MetaMetrics) (5)
  • RecordBidsReceived — Type changed:
func(
  context.Context, 
  int, 
  + string
)
  • RecordLatency — Type changed:
func(
  context.Context, 
  time.Duration, 
  + string
)
  • RecordSendOperationError — Type changed:
func(
  context.Context, 
  + string
)
  • RecordSendRequestError — Type changed:
func(
  context.Context, 
  + string
)
  • RecordStatusCode — Type changed:
func(
  context.Context, 
  int, 
  + string
)

📄 View full apidiff report

@cll-gg cll-gg marked this pull request as ready for review July 14, 2026 16:32
@cll-gg cll-gg requested review from a team and dimriou as code owners July 14, 2026 16:32
Copilot AI review requested due to automatic review settings July 14, 2026 16:32
@cll-gg cll-gg requested a review from a team as a code owner July 14, 2026 16:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 feedAddress parameter 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)
Comment thread pkg/txm/clientwrappers/dualbroadcast/meta_metrics.go
Comment thread pkg/txm/clientwrappers/dualbroadcast/meta_metrics.go
Comment thread pkg/txm/clientwrappers/dualbroadcast/meta_metrics.go
Comment thread pkg/txm/clientwrappers/dualbroadcast/meta_metrics.go
Comment thread pkg/txm/clientwrappers/dualbroadcast/meta_metrics.go
cll-gg and others added 5 commits July 15, 2026 09:08
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated 1 comment.

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}
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.

2 participants