Repository navigation
chipingress: add WithClientName option - #2433
Merged
Merged
Conversation
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.
Contributor
✅ API Diff Results -
|
2 of 3 tasks
# Conflicts: # pkg/chipingress/client.go
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
An empty client name clears an earlier identity despite the documented no-op behavior.
Review effort: Balanced
Findings: 1
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_namespan 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.
| // 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 } |
skippaDaBitFlippa
approved these changes
Oct 2, 2026
jmank88
approved these changes
Oct 2, 2026
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.

Summary
chipingress.WithClientName(name)option: sets the gRPC user-agent and aclient_nameattribute on the otelgrpc spans and metrics, so callers can be identified by chip-ingress and in telemetry. An empty name is a no-op.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)
Jira: INFOPLAT-19423
Test plan
go test ./pkg/chipingress -run TestOptions and TestClient_