Skip to content

Commit

Permalink
Adding OCR3 metrics promwrapper to LLO
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara committed Dec 6, 2024
1 parent dae4203 commit 375b3c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions core/services/llo/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

corelogger "github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr3/promwrapper"
"github.com/smartcontractkit/chainlink/v2/core/services/streams"
)

Expand Down Expand Up @@ -59,6 +60,7 @@ type DelegateConfig struct {
ShouldRetireCache datastreamsllo.ShouldRetireCache
EAMonitoringEndpoint ocrcommontypes.MonitoringEndpoint
DonID uint32
ChainID string

// OCR3
TraceLogging bool
Expand Down Expand Up @@ -151,8 +153,20 @@ func (d *delegate) Start(ctx context.Context) error {
OffchainConfigDigester: d.cfg.OffchainConfigDigester,
OffchainKeyring: d.cfg.OffchainKeyring,
OnchainKeyring: d.cfg.OnchainKeyring,
ReportingPluginFactory: datastreamsllo.NewPluginFactory(
d.cfg.ReportingPluginConfig, psrrc, d.src, d.cfg.RetirementReportCodec, d.cfg.ChannelDefinitionCache, d.ds, logger.Named(lggr, "ReportingPlugin"), llo.EVMOnchainConfigCodec{}, d.reportCodecs,
ReportingPluginFactory: promwrapper.NewReportingPluginFactory(
datastreamsllo.NewPluginFactory(
d.cfg.ReportingPluginConfig,
psrrc,
d.src,
d.cfg.RetirementReportCodec,
d.cfg.ChannelDefinitionCache,
d.ds,
logger.Named(lggr, "ReportingPlugin"),
llo.EVMOnchainConfigCodec{},
d.reportCodecs,
),
d.cfg.ChainID,
"llo",
),
MetricsRegisterer: prometheus.WrapRegistererWith(map[string]string{"job_name": d.cfg.JobName.ValueOrZero()}, prometheus.DefaultRegisterer),
})
Expand Down
1 change: 1 addition & 0 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,7 @@ func (d *Delegate) newServicesLLO(
RetirementReportCodec: datastreamsllo.StandardRetirementReportCodec{},
EAMonitoringEndpoint: d.monitoringEndpointGen.GenMonitoringEndpoint(rid.Network, rid.ChainID, telemetryContractID, synchronization.EnhancedEAMercury),
DonID: pluginCfg.DonID,
ChainID: spec.ChainID,

TraceLogging: d.cfg.OCR2().TraceLogging(),
BinaryNetworkEndpointFactory: d.peerWrapper.Peer2,
Expand Down

0 comments on commit 375b3c5

Please sign in to comment.