@@ -41,7 +41,7 @@ type Config struct {
4141 MetricRetryConfig * RetryConfig
4242 MetricViews []metric.View
4343 // MetricCardinalityLimit sets the SDK per-instrument attribute-set limit (0 = disabled).
44- // DefaultConfig uses 100000 as a production safety valve for high-cardinality workloads.
44+ // DefaultConfig uses DefaultMetricCardinalityLimit as a production safety valve for high-cardinality workloads.
4545 MetricCardinalityLimit int
4646 // MetricCompressor sets the gRPC compressor for metrics. Valid values: "gzip" (default), "none".
4747 MetricCompressor string
@@ -111,6 +111,9 @@ var defaultRetryConfig = RetryConfig{
111111const (
112112 defaultPackageName = "beholder"
113113 defaultMaxConcurrentSends = 10
114+
115+ // DefaultMetricCardinalityLimit is the production safety valve for high-cardinality workloads.
116+ DefaultMetricCardinalityLimit = 100000
114117)
115118
116119var defaultOtelAttributes = []attribute.KeyValue {
@@ -142,7 +145,7 @@ func DefaultConfig() Config {
142145 // Metric
143146 MetricReaderInterval : 1 * time .Second ,
144147 MetricCompressor : "gzip" ,
145- MetricCardinalityLimit : 100000 ,
148+ MetricCardinalityLimit : DefaultMetricCardinalityLimit ,
146149 // OTel metric exporter retry config
147150 MetricRetryConfig : defaultRetryConfig .Copy (),
148151 // Log
0 commit comments