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

[receiver/statsdreceiver] add support for distribution type metrics #26107

Conversation

anuprout
Copy link
Contributor

@anuprout anuprout commented Aug 25, 2023

Description:

Add support for statsd distribution type metrics .

Link to tracking Issue: 24768

Testing:
test config:

receivers:
  statsd:  
    endpoint: "localhost:8125"
    aggregation_interval: 10s
    enable_metric_type: true
    is_monotonic_counter: true
    timer_histogram_mapping:
      - statsd_type: "distribution"
        observer_type: "histogram"
        histogram: 
          max_size: 50        
 
exporters:
  logging:
    verbosity: detailed
  
service:
  pipelines:
    metrics:
      receivers: [statsd]
      processors: []
      exporters: [logging]
       

test data:

test.statsdreceiver.dist:1|d|#tag1:Val1
test.statsdreceiver.dist:2|d|#tag1:Val1
test.statsdreceiver.dist:3|d|#tag1:Val1

output:

ResourceMetrics #0
Resource SchemaURL:
ScopeMetrics #0
ScopeMetrics SchemaURL:
InstrumentationScope otelcol/statsdreceiver 0.83.0-dev
Metric #0
Descriptor:
     -> Name: test.statsdreceiver.dist
     -> Description:
     -> Unit:
     -> DataType: ExponentialHistogram
     -> AggregationTemporality: Delta
ExponentialHistogramDataPoints #0
Data point attributes:
     -> metric_type: Str(distribution)
     -> tag1: Str(Val1)
StartTimestamp: 2023-08-25 15:49:29.595594 +0000 UTC
Timestamp: 2023-08-25 15:49:39.596418 +0000 UTC
Count: 3
Sum: 6.000000
Min: 1.000000
Max: 3.000000
Bucket (0.957603, 1.000000], Count: 1
Bucket (1.000000, 1.044274], Count: 0
Bucket (1.044274, 1.090508], Count: 0
Bucket (1.090508, 1.138789], Count: 0
Bucket (1.138789, 1.189207], Count: 0
Bucket (1.189207, 1.241858], Count: 0
Bucket (1.241858, 1.296840], Count: 0
Bucket (1.296840, 1.354256], Count: 0
Bucket (1.354256, 1.414214], Count: 0
Bucket (1.414214, 1.476826], Count: 0
Bucket (1.476826, 1.542211], Count: 0
Bucket (1.542211, 1.610490], Count: 0
Bucket (1.610490, 1.681793], Count: 0
Bucket (1.681793, 1.756252], Count: 0
Bucket (1.756252, 1.834008], Count: 0
Bucket (1.834008, 1.915207], Count: 0
Bucket (1.915207, 2.000000], Count: 1
Bucket (2.000000, 2.088548], Count: 0
Bucket (2.088548, 2.181015], Count: 0
Bucket (2.181015, 2.277577], Count: 0
Bucket (2.277577, 2.378414], Count: 0
Bucket (2.378414, 2.483716], Count: 0
Bucket (2.483716, 2.593679], Count: 0
Bucket (2.593679, 2.708511], Count: 0
Bucket (2.708511, 2.828427], Count: 0
Bucket (2.828427, 2.953652], Count: 0
Bucket (2.953652, 3.084422], Count: 1
	{"kind": "exporter", "data_type": "metrics", "name": "logging"}

Documentation:

@anuprout anuprout requested a review from a team August 25, 2023 15:27
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 25, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the receiver/statsd statsd related issues label Aug 25, 2023
Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for this, and sorry for the delay.

@evan-bradley evan-bradley merged commit 9424ae3 into open-telemetry:main Sep 7, 2023
@github-actions github-actions bot added this to the next release milestone Sep 7, 2023
@@ -38,7 +38,7 @@ The Following settings are optional:
- `timer_histogram_mapping:`(default value is below): Specify what OTLP type to convert received timing/histogram data to.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this field name is now misleading since it's a mapping for timers, histograms, and distributions. At least, the description should be updated

Specify what OTLP type to convert received timing/histogram/distribution data to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
receiver/statsd statsd related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants