Skip to content

Commit 769837a

Browse files
ro-texakuzni2
andauthored
DS-1378 LLO Outcome Telemetry Sampling (#20469)
* bumps ds lib * cs * fix integration * Implement telemetry sampling. * Add a pruning loop. Start adding tests. * Add more tests. * lint * Fix lint * Implement sample telemetry configuraiton. * Clean --------- Co-authored-by: Alex Kuznicki <alexmkuz@gmail.com>
1 parent 8f17c1b commit 769837a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+507
-31
lines changed

.changeset/brown-ghosts-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink": patch
3+
---
4+
5+
#added OCR2 config option SampleTelemetry which enables telemetry sampling.

.changeset/polite-cobras-make.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink": patch
3+
---
4+
5+
#internal #added Sampling of LLO telemetry.

.changeset/tiny-moons-bathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink": patch
3+
---
4+
5+
#updated bumped chainlink-data-streams version

config_docs_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ var (
1919
func TestConfigDocs(t *testing.T) {
2020
config, err := docs.GenerateConfig()
2121
assert.NoError(t, err, "invalid config docs")
22-
assert.Equal(t, configMD, config, "docs/CONFIG.md is out of date. Run '"+
23-
"' to regenerate.")
22+
assert.Equal(t, configMD, config, "docs/CONFIG.md is out of date. Run 'make config-docs' to regenerate.")
2423

2524
secrets, err := docs.GenerateSecrets()
2625
assert.NoError(t, err, "invalid secrets docs")

core/config/docs/core.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ DefaultTransactionQueueDepth = 1 # Default
403403
SimulateTransactions = false # Default
404404
# TraceLogging enables trace level logging.
405405
TraceLogging = false # Default
406+
# SampleTelemetry enables telemetry sampling.
407+
SampleTelemetry = false # Default
406408
# KeyValueStoreRootDir is the root directory for the key-value store used by OCR3.1.
407409
# This directory must be writable by the Chainlink node process and should support long-term persistence.
408410
KeyValueStoreRootDir = '~/.chainlink-data' # Default

core/config/ocr2_config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type OCR2 interface {
1717
KeyBundleID() (string, error)
1818
// OCR2 config, cannot override in jobs
1919
TraceLogging() bool
20+
SampleTelemetry() bool
2021
CaptureEATelemetry() bool
2122
DefaultTransactionQueueDepth() uint32
2223
SimulateTransactions() bool

core/config/toml/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,7 @@ type OCR2 struct {
13491349
DefaultTransactionQueueDepth *uint32
13501350
SimulateTransactions *bool
13511351
TraceLogging *bool
1352+
SampleTelemetry *bool
13521353
KeyValueStoreRootDir *string
13531354
}
13541355

@@ -1395,6 +1396,9 @@ func (o *OCR2) setFrom(f *OCR2) {
13951396
if v := f.TraceLogging; v != nil {
13961397
o.TraceLogging = v
13971398
}
1399+
if v := f.SampleTelemetry; v != nil {
1400+
o.SampleTelemetry = v
1401+
}
13981402
if v := f.KeyValueStoreRootDir; v != nil {
13991403
o.KeyValueStoreRootDir = v
14001404
}

core/scripts/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ require (
4848
github.com/smartcontractkit/chainlink-automation v0.8.1
4949
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749
5050
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251125103916-0b41e73b80c4
51-
github.com/smartcontractkit/chainlink-data-streams v0.1.6
51+
github.com/smartcontractkit/chainlink-data-streams v0.1.7-0.20251123170926-313d8827bd6f
5252
github.com/smartcontractkit/chainlink-deployments-framework v0.70.0
5353
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251201175512-af04e919ebfb
5454
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251022075638-49d961001d1b

core/scripts/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,8 +1640,8 @@ github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9
16401640
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY=
16411641
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=
16421642
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7/go.mod h1:yaDOAZF6MNB+NGYpxGCUc+owIdKrjvFW0JODdTcQ3V0=
1643-
github.com/smartcontractkit/chainlink-data-streams v0.1.6 h1:B3cwmJrVYoJVAjPOyQWTNaGD+V30HI1vFHhC2dQpWDo=
1644-
github.com/smartcontractkit/chainlink-data-streams v0.1.6/go.mod h1:e9jETTzrVO8iu9Zp5gDuTCmBVhSJwUOk6K4Q/VFrJ6o=
1643+
github.com/smartcontractkit/chainlink-data-streams v0.1.7-0.20251123170926-313d8827bd6f h1:SB1/gArhpTaItvde2ub6J5njc84ucw7/GLhAYCUpb3s=
1644+
github.com/smartcontractkit/chainlink-data-streams v0.1.7-0.20251123170926-313d8827bd6f/go.mod h1:GPsn6PKJvPe1UfRYyVxsDzOWq6NILzBstiiLq/w+kG0=
16451645
github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 h1:wo2KL2viGZK/LhHLM8F88sRyhZF9wwWh+YDzW8hS00g=
16461646
github.com/smartcontractkit/chainlink-deployments-framework v0.70.0/go.mod h1:Cp7PuO7HUDugp7bWGP/TcDAvvvkFLdKOVrSm0zXlnhg=
16471647
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251201175512-af04e919ebfb h1:/oWqkc0mU63UNydxUiRZTv+ZYRzGF+9WHrpbuxDTBtY=

core/services/chainlink/config_ocr2.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ func (o *ocr2Config) TraceLogging() bool {
5353
return *o.c.TraceLogging
5454
}
5555

56+
func (o *ocr2Config) SampleTelemetry() bool {
57+
return *o.c.SampleTelemetry
58+
}
59+
5660
func (o *ocr2Config) CaptureEATelemetry() bool {
5761
return *o.c.CaptureEATelemetry
5862
}

0 commit comments

Comments
 (0)