-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Wire up ChIP ingress client for TelemetryIngress #20063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
patrickhuie19
merged 2 commits into
develop
from
INFOPLAT-2731-telemetry-wire-up-chip-ingress
Oct 30, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "chainlink": patch | ||
| --- | ||
|
|
||
| #updated Wire up CHIP ingress client in telemetry manager |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,8 @@ import ( | |
| "github.com/pkg/errors" | ||
| "github.com/smartcontractkit/libocr/commontypes" | ||
|
|
||
| "github.com/smartcontractkit/chainlink-common/pkg/logger" | ||
| "github.com/smartcontractkit/chainlink-common/pkg/beholder" | ||
| "github.com/smartcontractkit/chainlink-common/pkg/chipingress" | ||
| common "github.com/smartcontractkit/chainlink-common/pkg/logger" | ||
| "github.com/smartcontractkit/chainlink-common/pkg/services" | ||
| "github.com/smartcontractkit/chainlink/v2/core/services/keystore" | ||
|
|
@@ -32,6 +33,8 @@ type Manager struct { | |
| uniConn bool | ||
| useBatchSend bool | ||
| MonitoringEndpointGenerator MonitoringEndpointGenerator | ||
|
|
||
| chipIngressClient chipingress.Client | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add reference to chip ingress client to be used for OTI telemetry ingress |
||
| } | ||
|
|
||
| type telemetryEndpoint struct { | ||
|
|
@@ -43,16 +46,23 @@ type telemetryEndpoint struct { | |
| } | ||
|
|
||
| // NewManager create a new telemetry manager that is responsible for configuring telemetry agents and generating the defined telemetry endpoints and monitoring endpoints | ||
| func NewManager(cfg config.TelemetryIngress, csaKeyStore keystore.CSA, lggr logger.Logger) *Manager { | ||
| func NewManager(cfg config.TelemetryIngress, csaKeyStore keystore.CSA, lggr common.Logger) *Manager { | ||
| var chipIngressClient chipingress.Client | ||
| if cfg.ChipIngressEnabled() { | ||
| lggr.Info("ChIP Ingress is enabled for telemetry") | ||
| chipIngressClient = beholder.GetClient().Chip | ||
| } | ||
|
|
||
| m := &Manager{ | ||
| bufferSize: cfg.BufferSize(), | ||
| ks: csaKeyStore, | ||
| logging: cfg.Logging(), | ||
| maxBatchSize: cfg.MaxBatchSize(), | ||
| sendInterval: cfg.SendInterval(), | ||
| sendTimeout: cfg.SendTimeout(), | ||
| uniConn: cfg.UniConn(), | ||
| useBatchSend: cfg.UseBatchSend(), | ||
| bufferSize: cfg.BufferSize(), | ||
| ks: csaKeyStore, | ||
| logging: cfg.Logging(), | ||
| maxBatchSize: cfg.MaxBatchSize(), | ||
| sendInterval: cfg.SendInterval(), | ||
| sendTimeout: cfg.SendTimeout(), | ||
| uniConn: cfg.UniConn(), | ||
| useBatchSend: cfg.UseBatchSend(), | ||
| chipIngressClient: chipIngressClient, | ||
| } | ||
| m.Service, m.eng = services.Config{ | ||
| Name: "TelemetryManager", | ||
|
|
@@ -102,7 +112,7 @@ func (m *Manager) GenMultitypeMonitoringEndpoint(network string, chainID string, | |
| return NewMultiIngressAgent(e.client, network, chainID, contractID) | ||
| } | ||
|
|
||
| func (m *Manager) newEndpoint(e config.TelemetryIngressEndpoint, lggr logger.Logger, cfg config.TelemetryIngress) (services.Service, error) { | ||
| func (m *Manager) newEndpoint(e config.TelemetryIngressEndpoint, lggr common.Logger, cfg config.TelemetryIngress) (services.Service, error) { | ||
| if e.Network() == "" { | ||
| return nil, errors.New("cannot add telemetry endpoint, network cannot be empty") | ||
| } | ||
|
|
@@ -123,7 +133,7 @@ func (m *Manager) newEndpoint(e config.TelemetryIngressEndpoint, lggr logger.Log | |
| return nil, errors.Errorf("cannot add telemetry endpoint for network %q and chainID %q, endpoint already exists", e.Network(), e.ChainID()) | ||
| } | ||
|
|
||
| lggr = logger.Sugared(lggr).Named(e.Network()).Named(e.ChainID()) | ||
| lggr = common.Sugared(lggr).Named(e.Network()).Named(e.ChainID()) | ||
| var tClient synchronization.TelemetryService | ||
| if m.useBatchSend { | ||
| tClient = synchronization.NewTelemetryIngressBatchClient(e.URL(), e.ServerPubKey(), m.ks, cfg.Logging(), lggr, cfg.BufferSize(), cfg.MaxBatchSize(), cfg.SendInterval(), cfg.SendTimeout(), cfg.UniConn()) | ||
|
|
||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flag to enable OTI telemetry ingress via ChIP Ingress