Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/beholder-metric-views-deny-attributes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#added Add `Telemetry.MetricViewsDenyAttributes` config option to drop specified metric attribute keys from Beholder default views.
3 changes: 2 additions & 1 deletion core/cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
MetricViewsDenyAttributes: cfgTelemetry.MetricViewsDenyAttributes(),
}

if cfgTracing.Enabled() {
Expand Down
3 changes: 3 additions & 0 deletions core/config/docs/core.toml
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,9 @@ LogExportMaxBatchSize = 512 # Default
LogExportInterval = '1s' # Default
# LogMaxQueueSize sets the maximum queue size used by the batcher
LogMaxQueueSize = 2048 # Default
# MetricViewsDenyAttributes lists attribute keys dropped before export (e.g. event_id).
# Empty disables default Beholder metric attribute deny views.
MetricViewsDenyAttributes = ['event_id'] # Default

# ResourceAttributes are global metadata to include with all telemetry.
[Telemetry.ResourceAttributes]
Expand Down
1 change: 1 addition & 0 deletions core/config/telemetry_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type Telemetry interface {
LogExportMaxBatchSize() int
LogExportInterval() time.Duration
LogMaxQueueSize() int
MetricViewsDenyAttributes() []string
PrometheusBridge() PrometheusBridge
}

Expand Down
5 changes: 5 additions & 0 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2996,6 +2996,8 @@ type Telemetry struct {
LogExportInterval *commonconfig.Duration
LogMaxQueueSize *int

MetricViewsDenyAttributes []string

PrometheusBridge PrometheusBridge `toml:",omitempty"`
}

Expand Down Expand Up @@ -3072,6 +3074,9 @@ func (b *Telemetry) setFrom(f *Telemetry) {
if v := f.LogMaxQueueSize; v != nil {
b.LogMaxQueueSize = v
}
if v := f.MetricViewsDenyAttributes; v != nil {
b.MetricViewsDenyAttributes = v
}
b.PrometheusBridge.setFrom(&f.PrometheusBridge)
}

Expand Down
5 changes: 3 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.106
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.20260716194407-93eeb23b3f6b
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260720200433-dee51f29efab
github.com/smartcontractkit/chainlink-common/keystore v1.2.1-0.20260623104656-f39eba3e2bc6
github.com/smartcontractkit/chainlink-data-streams v1.0.0
github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54
Expand Down Expand Up @@ -493,7 +493,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260624154507-ea7ff77a0ddb // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260624154507-ea7ff77a0ddb // indirect
github.com/smartcontractkit/chainlink-ccv v0.1.1-0.20260716164331-d938b371c5d6 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260716165322-7f2edff6e954 // indirect
github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c // indirect
Expand All @@ -508,6 +508,7 @@ require (
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d // indirect
github.com/smartcontractkit/chainlink-protos/data-feeds v0.1.1-0.20260501174546-2e8846986b36 // indirect
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20260512230622-65f10f4cd305 // indirect
github.com/smartcontractkit/chainlink-protos/metering/go v0.0.0-20260710151514-27b5a126dabe // indirect
github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260709145319-7782fb89eb16 // indirect
github.com/smartcontractkit/chainlink-protos/orchestrator v0.11.0 // indirect
github.com/smartcontractkit/chainlink-protos/ring/go v0.0.0-20260331131315-f08a616d8dcd // indirect
Expand Down
10 changes: 6 additions & 4 deletions core/scripts/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions core/services/chainlink/config_telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ func (b *telemetryConfig) LogMaxQueueSize() int {
return *b.s.LogMaxQueueSize
}

func (b *telemetryConfig) MetricViewsDenyAttributes() []string {
return b.s.MetricViewsDenyAttributes
}

func (b *telemetryConfig) PrometheusBridge() config.PrometheusBridge {
return &prometheusBridgeConfig{b.s.PrometheusBridge}
}
Expand Down
21 changes: 21 additions & 0 deletions core/services/chainlink/config_telemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,3 +411,24 @@ func TestTelemetryConfig_LogMaxQueueSize(t *testing.T) {
})
}
}

func TestTelemetryConfig_MetricViewsDenyAttributes(t *testing.T) {
t.Parallel()
tests := []struct {
name string
telemetry toml.Telemetry
expected []string
}{
{"DenylistSet", toml.Telemetry{MetricViewsDenyAttributes: []string{"event_id"}}, []string{"event_id"}},
{"DenylistNil", toml.Telemetry{MetricViewsDenyAttributes: nil}, nil},
{"DenylistEmpty", toml.Telemetry{MetricViewsDenyAttributes: []string{}}, []string{}},
}

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.MetricViewsDenyAttributes())
})
}
}
1 change: 1 addition & 0 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ func TestConfig_Marshal(t *testing.T) {
LogExportMaxBatchSize: new(512),
LogExportInterval: ptrDuration(1 * time.Second),
LogMaxQueueSize: new(2048),
MetricViewsDenyAttributes: []string{"event_id"},

PrometheusBridge: toml.PrometheusBridge{
Enabled: new(true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ LogExportTimeout = '1s'
LogExportMaxBatchSize = 512
LogExportInterval = '1s'
LogMaxQueueSize = 2048
MetricViewsDenyAttributes = ['event_id']

[Telemetry.PrometheusBridge]
Enabled = false
Expand Down
1 change: 1 addition & 0 deletions core/services/chainlink/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ LogExportTimeout = '1s'
LogExportMaxBatchSize = 512
LogExportInterval = '1s'
LogMaxQueueSize = 2048
MetricViewsDenyAttributes = ['event_id']

[Telemetry.ResourceAttributes]
Baz = 'test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ LogExportTimeout = '1s'
LogExportMaxBatchSize = 512
LogExportInterval = '1s'
LogMaxQueueSize = 2048
MetricViewsDenyAttributes = ['event_id']

[Telemetry.PrometheusBridge]
Enabled = false
Expand Down
1 change: 1 addition & 0 deletions core/web/resolver/testdata/config-empty-effective.toml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ LogExportTimeout = '1s'
LogExportMaxBatchSize = 512
LogExportInterval = '1s'
LogMaxQueueSize = 2048
MetricViewsDenyAttributes = ['event_id']

[Telemetry.PrometheusBridge]
Enabled = false
Expand Down
1 change: 1 addition & 0 deletions core/web/resolver/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ LogExportTimeout = '1s'
LogExportMaxBatchSize = 512
LogExportInterval = '1s'
LogMaxQueueSize = 2048
MetricViewsDenyAttributes = ['event_id']

[Telemetry.ResourceAttributes]
Baz = 'test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ LogExportTimeout = '1s'
LogExportMaxBatchSize = 512
LogExportInterval = '1s'
LogMaxQueueSize = 2048
MetricViewsDenyAttributes = ['event_id']

[Telemetry.PrometheusBridge]
Enabled = false
Expand Down
5 changes: 3 additions & 2 deletions deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20260716194407-93eeb23b3f6b
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260720200433-dee51f29efab
github.com/smartcontractkit/chainlink-common/keystore v1.2.1-0.20260623104656-f39eba3e2bc6
github.com/smartcontractkit/chainlink-data-streams v1.0.0
github.com/smartcontractkit/chainlink-deployments-framework v0.111.1-0.20260612191326-e31c0ae4cd54
Expand Down Expand Up @@ -427,7 +427,7 @@ require (
github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect
github.com/smartcontractkit/chainlink-canton v0.0.0-20260615233851-4e78e7c23a58 // indirect
github.com/smartcontractkit/chainlink-ccv v0.1.1-0.20260716164331-d938b371c5d6 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260716165322-7f2edff6e954 // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c // indirect
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260714194015-527495d10a6c // indirect
Expand All @@ -441,6 +441,7 @@ require (
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d // indirect
github.com/smartcontractkit/chainlink-protos/data-feeds v0.1.1-0.20260501174546-2e8846986b36 // indirect
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20260512230622-65f10f4cd305 // indirect
github.com/smartcontractkit/chainlink-protos/metering/go v0.0.0-20260710151514-27b5a126dabe // indirect
github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260709145319-7782fb89eb16 // indirect
github.com/smartcontractkit/chainlink-protos/op-catalog v0.1.0 // indirect
github.com/smartcontractkit/chainlink-protos/ring/go v0.0.0-20260331131315-f08a616d8dcd // indirect
Expand Down
10 changes: 6 additions & 4 deletions deployment/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2405,6 +2405,7 @@ LogExportTimeout = '1s' # Default
LogExportMaxBatchSize = 512 # Default
LogExportInterval = '1s' # Default
LogMaxQueueSize = 2048 # Default
MetricViewsDenyAttributes = ['event_id'] # Default
```
Telemetry holds OTEL settings.
This data includes open telemetry metrics, traces, & logs.
Expand Down Expand Up @@ -2553,6 +2554,13 @@ LogMaxQueueSize = 2048 # Default
```
LogMaxQueueSize sets the maximum queue size used by the batcher

### MetricViewsDenyAttributes
```toml
MetricViewsDenyAttributes = ['event_id'] # Default
```
MetricViewsDenyAttributes lists attribute keys dropped before export (e.g. event_id).
Empty disables default Beholder metric attribute deny views.

## Telemetry.ResourceAttributes
```toml
[Telemetry.ResourceAttributes]
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ 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.1.1-0.20260716164331-d938b371c5d6
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260716194407-93eeb23b3f6b
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260720200433-dee51f29efab
github.com/smartcontractkit/chainlink-common/keystore v1.2.1-0.20260623104656-f39eba3e2bc6
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260626151909-052e55e62e62
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260716165322-7f2edff6e954
github.com/smartcontractkit/chainlink-data-streams v1.0.0
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260716150153-cd1826496e2d
github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501
Expand Down Expand Up @@ -355,6 +355,7 @@ require (
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-discovery v0.0.0-20251211142334-5c3421fe2c8d // indirect
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-rules v0.0.0-20260505131349-78e491b80735 // indirect
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d // indirect
github.com/smartcontractkit/chainlink-protos/metering/go v0.0.0-20260710151514-27b5a126dabe // indirect
github.com/smartcontractkit/chainlink-protos/svr v1.3.0 // indirect
github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20260408092456-3c6369888d4a // indirect
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect
Expand Down
Loading
Loading