diff --git a/core/cmd/shell.go b/core/cmd/shell.go index 4494588bdbd..344f6946cf1 100644 --- a/core/cmd/shell.go +++ b/core/cmd/shell.go @@ -165,7 +165,8 @@ func newBeholderClient( LogMaxQueueSize: cfgTelemetry.LogMaxQueueSize(), // Due to OpenTelemetry semantics, histogram bucket boundaries must be set // when the Beholder client is constructed. - MetricViews: metricViews(), + MetricViews: metricViews(), + MetricCardinalityLimit: cfgTelemetry.MetricCardinalityLimit(), } if cfgTracing.Enabled() { diff --git a/core/config/docs/core.toml b/core/config/docs/core.toml index 8a285a216e6..fba47f14634 100644 --- a/core/config/docs/core.toml +++ b/core/config/docs/core.toml @@ -907,6 +907,8 @@ LogExportMaxBatchSize = 512 # Default LogExportInterval = '1s' # Default # LogMaxQueueSize sets the maximum queue size used by the batcher LogMaxQueueSize = 2048 # Default +# MetricCardinalityLimit sets the OTel SDK per-instrument attribute-set limit (0 disables). +MetricCardinalityLimit = 100000 # Default # ResourceAttributes are global metadata to include with all telemetry. [Telemetry.ResourceAttributes] diff --git a/core/config/telemetry_config.go b/core/config/telemetry_config.go index 1036eac775e..fa53d24c066 100644 --- a/core/config/telemetry_config.go +++ b/core/config/telemetry_config.go @@ -28,6 +28,7 @@ type Telemetry interface { LogExportMaxBatchSize() int LogExportInterval() time.Duration LogMaxQueueSize() int + MetricCardinalityLimit() int PrometheusBridge() PrometheusBridge } diff --git a/core/config/toml/types.go b/core/config/toml/types.go index 6b3bb050f1e..5a6fd7a78eb 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -2995,6 +2995,8 @@ type Telemetry struct { LogExportInterval *commonconfig.Duration LogMaxQueueSize *int + MetricCardinalityLimit *int + PrometheusBridge PrometheusBridge `toml:",omitempty"` } @@ -3062,6 +3064,9 @@ func (b *Telemetry) setFrom(f *Telemetry) { if v := f.LogMaxQueueSize; v != nil { b.LogMaxQueueSize = v } + if v := f.MetricCardinalityLimit; v != nil { + b.MetricCardinalityLimit = v + } b.PrometheusBridge.setFrom(&f.PrometheusBridge) } diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 1f4eb79cd32..0e4bfbdbfa0 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -47,7 +47,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.104 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260624154507-ea7ff77a0ddb - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 github.com/smartcontractkit/chainlink-common/keystore v1.2.0 github.com/smartcontractkit/chainlink-data-streams v0.1.15-0.20260522094612-5f9f748bd87a github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 8804348258d..e6168a01cd0 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1579,8 +1579,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 h1:uMn1w/n95p+pSxK6hYNqji/sDaab8D0Cxuph9qUkM2g= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094/go.mod h1:3XQmy2zQHrmufebP7dM+x595+gghxzyIKxK9wv91Rh8= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 h1:SDqCKcTuyoM7cxSkdweeM3EHJw/decQ0T1RUO94W4oI= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 h1:3vGBBXcbbgXk629VZdHZQscHevo5djv9z+q/q7hMzZs= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= github.com/smartcontractkit/chainlink-common/keystore v1.2.0 h1:1BH/b14CkGjArfzznlioQpIJiynECWVT48JUP9E277U= github.com/smartcontractkit/chainlink-common/keystore v1.2.0/go.mod h1:9R/74vN+bJ5PbkOyM/pUy/AeAZaRwYb/k4XPeXcbDio= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 h1:o7vfwNQjQbMKQ9YsZFQOxvU7RMXD/wKnZsX5N9sDS3w= diff --git a/core/services/chainlink/config_telemetry.go b/core/services/chainlink/config_telemetry.go index df61e0d3269..425c0d699aa 100644 --- a/core/services/chainlink/config_telemetry.go +++ b/core/services/chainlink/config_telemetry.go @@ -182,6 +182,10 @@ func (b *telemetryConfig) LogMaxQueueSize() int { return *b.s.LogMaxQueueSize } +func (b *telemetryConfig) MetricCardinalityLimit() int { + return *b.s.MetricCardinalityLimit +} + func (b *telemetryConfig) PrometheusBridge() config.PrometheusBridge { return &prometheusBridgeConfig{b.s.PrometheusBridge} } diff --git a/core/services/chainlink/config_telemetry_test.go b/core/services/chainlink/config_telemetry_test.go index 5baf19de43c..a6955146e08 100644 --- a/core/services/chainlink/config_telemetry_test.go +++ b/core/services/chainlink/config_telemetry_test.go @@ -8,6 +8,7 @@ import ( "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink/v2/core/config/docs" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/static" ) @@ -397,3 +398,30 @@ func TestTelemetryConfig_LogMaxQueueSize(t *testing.T) { }) } } + +func TestTelemetryConfig_MetricCardinalityLimit(t *testing.T) { + t.Parallel() + tests := []struct { + name string + telemetry toml.Telemetry + expected int + }{ + {"MetricCardinalityLimitSet", toml.Telemetry{MetricCardinalityLimit: new(500)}, 500}, + {"MetricCardinalityLimitZero", toml.Telemetry{MetricCardinalityLimit: new(0)}, 0}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + tc := telemetryConfig{s: tt.telemetry} + assert.Equal(t, tt.expected, tc.MetricCardinalityLimit()) + }) + } + + t.Run("MetricCardinalityLimitDefaultFromCore", func(t *testing.T) { + t.Parallel() + defaults := docs.CoreDefaults() + tc := telemetryConfig{s: defaults.Telemetry} + assert.Equal(t, 100000, tc.MetricCardinalityLimit()) + }) +} diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 27a27e70cc7..ecfae09c6c8 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -572,6 +572,7 @@ func TestConfig_Marshal(t *testing.T) { LogExportMaxBatchSize: ptr[int](512), LogExportInterval: ptrDuration(1 * time.Second), LogMaxQueueSize: ptrInt(2048), + MetricCardinalityLimit: new(100000), PrometheusBridge: toml.PrometheusBridge{ Enabled: ptr(true), diff --git a/core/services/chainlink/testdata/config-empty-effective.toml b/core/services/chainlink/testdata/config-empty-effective.toml index 6aeec786180..cee4a78fdc1 100644 --- a/core/services/chainlink/testdata/config-empty-effective.toml +++ b/core/services/chainlink/testdata/config-empty-effective.toml @@ -359,6 +359,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index a2b99dafcbd..26f3dadfc6b 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -394,6 +394,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.ResourceAttributes] Baz = 'test' diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index ec7cb65fbe0..04f00e18414 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -359,6 +359,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/core/web/resolver/testdata/config-empty-effective.toml b/core/web/resolver/testdata/config-empty-effective.toml index 6aeec786180..cee4a78fdc1 100644 --- a/core/web/resolver/testdata/config-empty-effective.toml +++ b/core/web/resolver/testdata/config-empty-effective.toml @@ -359,6 +359,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index dc1cc00ae4d..9750548bc30 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -373,6 +373,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.ResourceAttributes] Baz = 'test' diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index a98ec27c405..4d1af3d261b 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -359,6 +359,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/deployment/go.mod b/deployment/go.mod index 1fc4b57b6a6..73d2c86c8b7 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -47,7 +47,7 @@ require ( github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260624154507-ea7ff77a0ddb github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260624154507-ea7ff77a0ddb - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 github.com/smartcontractkit/chainlink-common/keystore v1.2.0 github.com/smartcontractkit/chainlink-data-streams v0.1.15-0.20260522094612-5f9f748bd87a github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54 diff --git a/deployment/go.sum b/deployment/go.sum index 4a1613e5948..a810f64f63f 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1384,8 +1384,8 @@ github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 h github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094/go.mod h1:3XQmy2zQHrmufebP7dM+x595+gghxzyIKxK9wv91Rh8= github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260616151800-9a3a31c4e194 h1:QxZkbKtQyPtVLYP4eMwc+VbXY7M5ve1deSiLZ2pOA+Y= github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260616151800-9a3a31c4e194/go.mod h1:bNMFRxwWdgVFdSsFZRmsUUPoBUncU3RM765K99svIKM= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 h1:SDqCKcTuyoM7cxSkdweeM3EHJw/decQ0T1RUO94W4oI= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 h1:3vGBBXcbbgXk629VZdHZQscHevo5djv9z+q/q7hMzZs= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= github.com/smartcontractkit/chainlink-common/keystore v1.2.0 h1:1BH/b14CkGjArfzznlioQpIJiynECWVT48JUP9E277U= github.com/smartcontractkit/chainlink-common/keystore v1.2.0/go.mod h1:9R/74vN+bJ5PbkOyM/pUy/AeAZaRwYb/k4XPeXcbDio= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 h1:o7vfwNQjQbMKQ9YsZFQOxvU7RMXD/wKnZsX5N9sDS3w= diff --git a/docs/CONFIG.md b/docs/CONFIG.md index af944ec92e5..297bbe63153 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -2402,6 +2402,7 @@ LogExportTimeout = '1s' # Default LogExportMaxBatchSize = 512 # Default LogExportInterval = '1s' # Default LogMaxQueueSize = 2048 # Default +MetricCardinalityLimit = 100000 # Default ``` Telemetry holds OTEL settings. This data includes open telemetry metrics, traces, & logs. @@ -2531,6 +2532,12 @@ LogMaxQueueSize = 2048 # Default ``` LogMaxQueueSize sets the maximum queue size used by the batcher +### MetricCardinalityLimit +```toml +MetricCardinalityLimit = 100000 # Default +``` +MetricCardinalityLimit sets the OTel SDK per-instrument attribute-set limit (0 disables). + ## Telemetry.ResourceAttributes ```toml [Telemetry.ResourceAttributes] diff --git a/go.mod b/go.mod index 400910078f5..064c04f4c97 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 github.com/smartcontractkit/chainlink-common/keystore v1.2.0 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 github.com/smartcontractkit/chainlink-data-streams v0.1.15-0.20260522094612-5f9f748bd87a diff --git a/go.sum b/go.sum index 4652063940e..2df3fb4fbc7 100644 --- a/go.sum +++ b/go.sum @@ -1161,8 +1161,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 h1:uMn1w/n95p+pSxK6hYNqji/sDaab8D0Cxuph9qUkM2g= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094/go.mod h1:3XQmy2zQHrmufebP7dM+x595+gghxzyIKxK9wv91Rh8= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 h1:SDqCKcTuyoM7cxSkdweeM3EHJw/decQ0T1RUO94W4oI= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 h1:3vGBBXcbbgXk629VZdHZQscHevo5djv9z+q/q7hMzZs= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= github.com/smartcontractkit/chainlink-common/keystore v1.2.0 h1:1BH/b14CkGjArfzznlioQpIJiynECWVT48JUP9E277U= github.com/smartcontractkit/chainlink-common/keystore v1.2.0/go.mod h1:9R/74vN+bJ5PbkOyM/pUy/AeAZaRwYb/k4XPeXcbDio= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 h1:o7vfwNQjQbMKQ9YsZFQOxvU7RMXD/wKnZsX5N9sDS3w= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 4fdd2a8dbef..ede67de7876 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -33,7 +33,7 @@ require ( github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260624154507-ea7ff77a0ddb github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260624154507-ea7ff77a0ddb github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 github.com/smartcontractkit/chainlink-common/keystore v1.2.0 github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260623170329-4577ef4ba0ae diff --git a/integration-tests/go.sum b/integration-tests/go.sum index b760108ee1d..6eb88953045 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1371,8 +1371,8 @@ github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 h github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094/go.mod h1:3XQmy2zQHrmufebP7dM+x595+gghxzyIKxK9wv91Rh8= github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260616151800-9a3a31c4e194 h1:QxZkbKtQyPtVLYP4eMwc+VbXY7M5ve1deSiLZ2pOA+Y= github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260616151800-9a3a31c4e194/go.mod h1:bNMFRxwWdgVFdSsFZRmsUUPoBUncU3RM765K99svIKM= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 h1:SDqCKcTuyoM7cxSkdweeM3EHJw/decQ0T1RUO94W4oI= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 h1:3vGBBXcbbgXk629VZdHZQscHevo5djv9z+q/q7hMzZs= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= github.com/smartcontractkit/chainlink-common/keystore v1.2.0 h1:1BH/b14CkGjArfzznlioQpIJiynECWVT48JUP9E277U= github.com/smartcontractkit/chainlink-common/keystore v1.2.0/go.mod h1:9R/74vN+bJ5PbkOyM/pUy/AeAZaRwYb/k4XPeXcbDio= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 h1:o7vfwNQjQbMKQ9YsZFQOxvU7RMXD/wKnZsX5N9sDS3w= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index e0d1344f023..4edf57bb79b 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -24,7 +24,7 @@ require ( github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260624154507-ea7ff77a0ddb github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260624154507-ea7ff77a0ddb github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260623170329-4577ef4ba0ae github.com/smartcontractkit/chainlink-testing-framework/framework v0.16.6-0.20260630120514-36abe27604df diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 8b1a34a2801..630cf1b2e86 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1631,8 +1631,8 @@ github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 h github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094/go.mod h1:3XQmy2zQHrmufebP7dM+x595+gghxzyIKxK9wv91Rh8= github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260616151800-9a3a31c4e194 h1:QxZkbKtQyPtVLYP4eMwc+VbXY7M5ve1deSiLZ2pOA+Y= github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260616151800-9a3a31c4e194/go.mod h1:bNMFRxwWdgVFdSsFZRmsUUPoBUncU3RM765K99svIKM= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 h1:SDqCKcTuyoM7cxSkdweeM3EHJw/decQ0T1RUO94W4oI= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 h1:3vGBBXcbbgXk629VZdHZQscHevo5djv9z+q/q7hMzZs= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= github.com/smartcontractkit/chainlink-common/keystore v1.2.0 h1:1BH/b14CkGjArfzznlioQpIJiynECWVT48JUP9E277U= github.com/smartcontractkit/chainlink-common/keystore v1.2.0/go.mod h1:9R/74vN+bJ5PbkOyM/pUy/AeAZaRwYb/k4XPeXcbDio= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 h1:o7vfwNQjQbMKQ9YsZFQOxvU7RMXD/wKnZsX5N9sDS3w= diff --git a/plugins/loop_registry.go b/plugins/loop_registry.go index 3968018cdbc..b3b55afa6aa 100644 --- a/plugins/loop_registry.go +++ b/plugins/loop_registry.go @@ -163,6 +163,8 @@ func (m *LoopRegistry) Register(id string) (*RegisteredLoop, error) { envCfg.TelemetryLogExportMaxBatchSize = m.cfgTelemetry.LogExportMaxBatchSize() envCfg.TelemetryLogExportInterval = m.cfgTelemetry.LogExportInterval() envCfg.TelemetryLogMaxQueueSize = m.cfgTelemetry.LogMaxQueueSize() + limit := m.cfgTelemetry.MetricCardinalityLimit() + envCfg.TelemetryMetricCardinalityLimit = &limit envCfg.TelemetryPrometheusBridgeEnabled = m.cfgTelemetry.PrometheusBridge().Enabled() envCfg.TelemetryPrometheusBridgePrefixes = m.cfgTelemetry.PrometheusBridge().Prefixes() } diff --git a/plugins/loop_registry_test.go b/plugins/loop_registry_test.go index d762dd85c57..d820af06950 100644 --- a/plugins/loop_registry_test.go +++ b/plugins/loop_registry_test.go @@ -88,6 +88,8 @@ func (m mockCfgTelemetry) LogExportMaxBatchSize() int { return 512 } func (m mockCfgTelemetry) LogExportInterval() time.Duration { return 5 * time.Second } func (m mockCfgTelemetry) LogMaxQueueSize() int { return 2048 } +func (m mockCfgTelemetry) MetricCardinalityLimit() int { return 100000 } + func (m mockCfgTelemetry) PrometheusBridge() config.PrometheusBridge { return mockPrometheusBridge{} } @@ -250,6 +252,8 @@ func TestLoopRegistry_Register(t *testing.T) { require.Equal(t, 512, envCfg.TelemetryLogExportMaxBatchSize) require.Equal(t, 5*time.Second, envCfg.TelemetryLogExportInterval) require.Equal(t, 2048, envCfg.TelemetryLogMaxQueueSize) + require.NotNil(t, envCfg.TelemetryMetricCardinalityLimit) + require.Equal(t, 100000, *envCfg.TelemetryMetricCardinalityLimit) require.Equal(t, "example.com/chip-ingress", envCfg.ChipIngressEndpoint) require.False(t, envCfg.ChipIngressBatchEmitterEnabled) diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index 1a5126431ce..df1c2aaa352 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -37,7 +37,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.104 github.com/smartcontractkit/chainlink-aptos v0.0.0-20260708114855-e953eeb028a7 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260624154507-ea7ff77a0ddb - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 github.com/smartcontractkit/chainlink-common/keystore v1.2.0 github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260623170329-4577ef4ba0ae diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index b68d3285841..9da5ec255b5 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1544,8 +1544,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 h1:uMn1w/n95p+pSxK6hYNqji/sDaab8D0Cxuph9qUkM2g= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094/go.mod h1:3XQmy2zQHrmufebP7dM+x595+gghxzyIKxK9wv91Rh8= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 h1:SDqCKcTuyoM7cxSkdweeM3EHJw/decQ0T1RUO94W4oI= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 h1:3vGBBXcbbgXk629VZdHZQscHevo5djv9z+q/q7hMzZs= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= github.com/smartcontractkit/chainlink-common/keystore v1.2.0 h1:1BH/b14CkGjArfzznlioQpIJiynECWVT48JUP9E277U= github.com/smartcontractkit/chainlink-common/keystore v1.2.0/go.mod h1:9R/74vN+bJ5PbkOyM/pUy/AeAZaRwYb/k4XPeXcbDio= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 h1:o7vfwNQjQbMKQ9YsZFQOxvU7RMXD/wKnZsX5N9sDS3w= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index fad10458b2a..9edc2ce898e 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -62,7 +62,7 @@ require ( github.com/rs/zerolog v1.35.1 github.com/smartcontractkit/chain-selectors v1.0.104 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260624154507-ea7ff77a0ddb - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 github.com/smartcontractkit/chainlink-common/keystore v1.2.0 github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54 github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index b0df643c90f..ff7530e2e4d 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1749,8 +1749,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094 h1:uMn1w/n95p+pSxK6hYNqji/sDaab8D0Cxuph9qUkM2g= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260706093831-dad26b360094/go.mod h1:3XQmy2zQHrmufebP7dM+x595+gghxzyIKxK9wv91Rh8= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4 h1:SDqCKcTuyoM7cxSkdweeM3EHJw/decQ0T1RUO94W4oI= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260710200719-3bdfe6bc75e4/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40 h1:3vGBBXcbbgXk629VZdHZQscHevo5djv9z+q/q7hMzZs= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260713191744-8fc8c4e5fe40/go.mod h1:snfVBRRQTpC2x5O3bQHZe9SvJX5yv/SbG8oHkJTKLtE= github.com/smartcontractkit/chainlink-common/keystore v1.2.0 h1:1BH/b14CkGjArfzznlioQpIJiynECWVT48JUP9E277U= github.com/smartcontractkit/chainlink-common/keystore v1.2.0/go.mod h1:9R/74vN+bJ5PbkOyM/pUy/AeAZaRwYb/k4XPeXcbDio= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 h1:o7vfwNQjQbMKQ9YsZFQOxvU7RMXD/wKnZsX5N9sDS3w= diff --git a/testdata/scripts/config/merge_raw_configs.txtar b/testdata/scripts/config/merge_raw_configs.txtar index 57977a1f485..447e6a72216 100644 --- a/testdata/scripts/config/merge_raw_configs.txtar +++ b/testdata/scripts/config/merge_raw_configs.txtar @@ -506,6 +506,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/default.txtar b/testdata/scripts/node/validate/default.txtar index c0a1abab84b..4d4144983b4 100644 --- a/testdata/scripts/node/validate/default.txtar +++ b/testdata/scripts/node/validate/default.txtar @@ -371,6 +371,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/defaults-override.txtar b/testdata/scripts/node/validate/defaults-override.txtar index 86086a4fca2..6615252e51a 100644 --- a/testdata/scripts/node/validate/defaults-override.txtar +++ b/testdata/scripts/node/validate/defaults-override.txtar @@ -432,6 +432,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar index 36c2900e57f..bca0de7fa5d 100644 --- a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar @@ -415,6 +415,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar b/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar index 9fb002e0af8..cf870f30538 100644 --- a/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar @@ -415,6 +415,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/disk-based-logging.txtar b/testdata/scripts/node/validate/disk-based-logging.txtar index dfdb9b48384..8c342584e6f 100644 --- a/testdata/scripts/node/validate/disk-based-logging.txtar +++ b/testdata/scripts/node/validate/disk-based-logging.txtar @@ -415,6 +415,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/fallback-override.txtar b/testdata/scripts/node/validate/fallback-override.txtar index c2320cbce92..6a14d112024 100644 --- a/testdata/scripts/node/validate/fallback-override.txtar +++ b/testdata/scripts/node/validate/fallback-override.txtar @@ -517,6 +517,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/invalid-ocr-p2p.txtar b/testdata/scripts/node/validate/invalid-ocr-p2p.txtar index 5e7eaaa1bad..fa0aa114f03 100644 --- a/testdata/scripts/node/validate/invalid-ocr-p2p.txtar +++ b/testdata/scripts/node/validate/invalid-ocr-p2p.txtar @@ -400,6 +400,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/invalid.txtar b/testdata/scripts/node/validate/invalid.txtar index aae5e8883ca..bbbce30cac6 100644 --- a/testdata/scripts/node/validate/invalid.txtar +++ b/testdata/scripts/node/validate/invalid.txtar @@ -411,6 +411,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/valid.txtar b/testdata/scripts/node/validate/valid.txtar index 9b0595833cb..9b69df58690 100644 --- a/testdata/scripts/node/validate/valid.txtar +++ b/testdata/scripts/node/validate/valid.txtar @@ -412,6 +412,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false diff --git a/testdata/scripts/node/validate/warnings.txtar b/testdata/scripts/node/validate/warnings.txtar index 6e000e852ba..ac115e8a5d8 100644 --- a/testdata/scripts/node/validate/warnings.txtar +++ b/testdata/scripts/node/validate/warnings.txtar @@ -394,6 +394,7 @@ LogExportTimeout = '1s' LogExportMaxBatchSize = 512 LogExportInterval = '1s' LogMaxQueueSize = 2048 +MetricCardinalityLimit = 100000 [Telemetry.PrometheusBridge] Enabled = false