Skip to content

chipingress: add WithClientName option - #2433

Merged
jmank88 merged 2 commits into
mainfrom
chipingress-client-name
Oct 2, 2026
Merged

jmank88 merged 2 commits into
mainfrom
chipingress-client-name

Conversation

@pkcll

@pkcll pkcll commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • New chipingress.WithClientName(name) option: sets the gRPC user-agent and a client_name attribute on the otelgrpc spans and metrics, so callers can be identified by chip-ingress and in telemetry. An empty name is a no-op.
  • README updated; tests check the option is applied and that the user-agent reaches the server.

Used by the durable emitter in a follow-up PR (client_name=durable_emitter); that PR pins this branch until this is released.

PR stack (merge in this order)

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

Jira: INFOPLAT-19423

Test plan

  • go test ./pkg/chipingress -run TestOptions and TestClient_
  • CI

Sets the gRPC user-agent and a client_name attribute on the otelgrpc spans and metrics so callers can be identified by chip-ingress and in telemetry. An empty name is a no-op.
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ API Diff Results - github.com/smartcontractkit/chainlink-common/pkg/chipingress

✅ Compatible Changes (1)

./ (1)
  • WithClientName — ➕ Added

📄 View full apidiff report

@pkcll
pkcll marked this pull request as ready for review October 2, 2026 00:23
@pkcll
pkcll requested a review from a team as a code owner October 2, 2026 00:23
Copilot AI balanced review requested due to automatic review settings October 2, 2026 00:23

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

🟡 Changes recommended

An empty client name clears an earlier identity despite the documented no-op behavior.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds client identification to chip-ingress calls and telemetry through WithClientName.

Changes:

  • Adds a custom gRPC user-agent prefix and client_name span and metric attributes.
  • Documents the option and tests configuration and user-agent propagation.
File Description
pkg/​chipingress/​README.md Documents client identification.
pkg/​chipingress/​client.go Adds the option and telemetry integration.
pkg/​chipingress/​client_test.go Tests option configuration and server-visible user-agent.

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

Comment thread pkg/chipingress/client.go
// user-agent and recorded as a client_name attribute on the otelgrpc spans and metrics. An empty
// name is a no-op.
func WithClientName(name string) Opt {
return func(c *clientConfig) { c.clientName = name }
@pkcll
pkcll enabled auto-merge October 2, 2026 00:40
@pkcll
pkcll requested review from bolekk and removed request for DylanTinianov October 2, 2026 00:45
@jmank88
jmank88 added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit dbc6c22 Oct 2, 2026
37 of 38 checks passed
@jmank88
jmank88 deleted the chipingress-client-name branch October 2, 2026 00:52
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.

4 participants