Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the stream_unique metric attribute at Detailed level #119

Merged
merged 2 commits into from
Dec 12, 2023
Merged
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: 3 additions & 2 deletions pkg/otel/arrow_record/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ type Consumer struct {
memoryCounter metric.Int64UpDownCounter

// uniqueAttr is set to an 8-byte hex digit string with
// 32-bits of randomness, applied to all metric events.
// 32-bits of randomness, applied to all metric events
// when MetricsLevel is > Detailed (i.e., above detailed).
uniqueAttr attribute.KeyValue
}

Expand Down Expand Up @@ -191,7 +192,7 @@ func (c *Consumer) metricOpts(kvs ...attribute.KeyValue) []metric.AddOption {
if c.metricsLevel < configtelemetry.LevelNormal {
return nil
}
if c.metricsLevel == configtelemetry.LevelDetailed {
if c.metricsLevel > configtelemetry.LevelDetailed {
kvs = append(kvs, c.uniqueAttr)
}
return []metric.AddOption{
Expand Down