Add resource attribute support to ChipIngress client#2216
Draft
pkcll wants to merge 2 commits into
Draft
Conversation
Contributor
✅ API Diff Results -
|
e6eabcc to
fdb6dee
Compare
Contributor
✅ API Diff Results -
|
606a264 to
ada7f9b
Compare
2 tasks
| gopkg.in/yaml.v2 v2.4.0 // indirect | ||
| ) | ||
|
|
||
| replace github.com/smartcontractkit/chainlink-common/pkg/chipingress => ./pkg/chipingress |
Contributor
There was a problem hiding this comment.
any way to avoid the local replace?
Contributor
Author
There was a problem hiding this comment.
For sure, will clean this up.
patrickhuie19
previously approved these changes
Jul 10, 2026
4a43f88 to
de3f8a9
Compare
Propagate node resource attributes from beholder.Config.ResourceAttributes to the cre topic via gRPC metadata headers and sanitized CloudEvent extensions, matching legacy beholder__platform__messages identification.
Root module must pin the submodule commit that contains the new chipingress API; required after removing the local replace directive.
aa6b73c to
d6a531b
Compare
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
beholder.Config.ResourceAttributesto the ChipIngresscretopic via two mechanisms: (1) gRPC metadata headers (chipingress.WithHeaderProvider/NewStaticHeaderProvider), raw key names, parity withbeholder__platform__messages; (2) CloudEvent extensions (chipingress.WithResourceAttributeExtensions) with keys sanitized to^[a-z0-9]+$per the CloudEvents spec, surfacing asce_<name>Kafka headers.ChipIngressEmitterandChipIngressBatchEmitterServiceto stamp resource attributes on every emitted event.Known gaps / follow-ups (called out for reviewers)
baseKafkaHeaderslogic does not appear to forward arbitrary incoming gRPC metadata onto Kafka headers today. The CE-extension mechanism guarantees headers immediately; the gRPC-metadata mechanism is shipped for observability now, with full parity once/if a chip-ingress server-side change forwards it. A follow-up ticket against chip-ingress should track that.pkg/durableemitteris out of scope. It has its ownNewEventcall site and config, and wiring it up would also requirechainlinkcore changes (application.go,shell.go,plugins/loop_registry.go). This assumes production CRE-topic traffic goes through the beholder emitters, notDurableEmitter— unconfirmed, worth a sanity check before merge.pkg/chipingressis its own Go module;go.mod's pinnedpkg/chipingresspseudo-version needs bumping to pick these changes up inpkg/beholder(standard two-step process per this repo's history).Test plan
go test ./pkg/chipingress/...andgo test ./pkg/beholder/...passSanitizeExtensionName,WithResourceAttributeExtensions(sanitization, reserved-name skip, deterministic dedup),NewStaticHeaderProvider,resourceAttributesToStringMap, and emitter-level tests assertingce_<sanitized>extensions land on published/batched events