Skip to content

loop: pass beholder TracerProvider to the durable emitter - #2434

Merged
pkcll merged 4 commits into
mainfrom
loop-durable-emitter-tracing
Oct 6, 2026
Merged

pkcll merged 4 commits into
mainfrom
loop-durable-emitter-tracing

Conversation

@pkcll

@pkcll pkcll commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Passes the TracerProvider of the beholder client to durableemitter.Setup in the LOOP server, alongside the existing Meter, so the plugin-side durable emitter and its chip ingress client use the tracer provider of beholder.
  • Addresses the Copilot review comment on durableemitter: add tracing spans and chip ingress client name #2432: the retransmit deliver test now waits for the tick span that queued the row to end, then asserts the deliver span parent, link and trace ID against that tick (previously it only compared the link to the parent, and looked the tick up immediately, which could race with the delivery callback).
  • Bumps pkg/chipingress in go.mod to the latest main pseudo-version v0.0.11-0.20261005132539-b7d63d5fd549 (commit b7d63d5). No release tag is needed.

PR stack

  1. chipingress: add WithClientName option #2433 - chipingress: add WithClientName option (merged)
  2. durableemitter: add tracing spans and chip ingress client name #2432 - durableemitter: add tracing spans and chip ingress client name (merged)
  3. loop: pass beholder TracerProvider to the durable emitter #2434 - loop: pass beholder TracerProvider to the durable emitter (this PR) (base: main)

Jira: INFOPLAT-19423

Notes

  • When no telemetry endpoint is set, beholder.GetClient() is the noop client, so its tracer provider is a noop. Durable emitter spans are then off even if tracing is enabled via SetupTracing (same as Meter today).
  • bc.TracerProvider is not wrapped by the pyroscope tracer provider, so these spans are not linked to profiles when PyroscopeLinkTracesToProfiles is on.

Test plan

  • go build ./pkg/..., go vet, go mod tidy -diff clean
  • go test -race ./pkg/durableemitter/ ./pkg/loop/; the retransmit link test passes 80 runs under -race
  • CI

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

@pkcll
pkcll force-pushed the loop-durable-emitter-tracing branch from 517d425 to fe4e44e Compare October 2, 2026 00:17
@pkcll
pkcll force-pushed the loop-durable-emitter-tracing branch 3 times, most recently from 2c79161 to 4b4da23 Compare October 2, 2026 07:16
Base automatically changed from durable-emitter-tracing to main October 2, 2026 22:31
@pkcll
pkcll force-pushed the loop-durable-emitter-tracing branch from 4b4da23 to a3444f6 Compare October 5, 2026 22:09
pkcll added 3 commits October 5, 2026 18:12
Mirrors how the beholder Meter is passed, so the LOOP-plugin durable emitter and its chip ingress client use the beholder client's tracer provider.
…k span

The retransmit link test only compared the link to the parent, so both could point at the same wrong span, and it looked up the tick immediately, which could race with the delivery callback. It now waits for the parent tick to end and asserts the parent, link and trace ID against that tick.
Moves the pin from dbc6c22 to b7d63d5 (v0.0.11-0.20261005132539-b7d63d5fd549). No release tag exists for the WithClientName changes yet.
@pkcll
pkcll force-pushed the loop-durable-emitter-tracing branch from a3444f6 to c770679 Compare October 5, 2026 22:14
@pkcll
pkcll marked this pull request as ready for review October 5, 2026 22:15
@pkcll
pkcll requested a review from a team as a code owner October 5, 2026 22:15
@pkcll
pkcll requested review from jmank88 and patrickhuie19 and a balanced review from Copilot October 5, 2026 22:15

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.

Copilot review overview

🟢 Approval recommended

The provider behavior matches the documented intent, and no blocking issues remain.

Review effort: Balanced
Findings: None

What changed in this PR

Routes LOOP durable-emitter tracing through Beholder’s provider, completing the tracing integration.

Changes:

  • Passes Beholder’s tracer provider to durable-emitter setup.
  • Waits for the parent retransmit tick before checking span relationships.
  • Updates the chipingress dependency and checksums.
File Description
pkg/​loop/​server.go Supplies Beholder’s tracer provider.
pkg/​durableemitter/​tracing_test.go Synchronizes and strengthens span assertions.
go.sum Updates chipingress checksums.
go.mod Advances the chipingress pseudo-version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@pkcll
pkcll added this pull request to the merge queue Oct 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 5, 2026
@pkcll
pkcll added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit 9626e35 Oct 6, 2026
35 of 36 checks passed
@pkcll
pkcll deleted the loop-durable-emitter-tracing branch October 6, 2026 01:14
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.

5 participants