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

datadog sink: thread 'vector-worker' panicked at 'min should be present for non-empty sketch' #18353

Closed
bencord0 opened this issue Aug 23, 2023 · 0 comments · Fixed by #18530
Closed
Assignees
Labels
sink: datadog_metrics Anything `datadog_metrics` sink related type: bug A code related bug.

Comments

@bencord0
Copy link
Contributor

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

The latest released version (currently 0.32.1, but this might go back to releases up-to two months ago) can crash on some inputs when using the datadog_metrics sink.

thread 'vector-worker' panicked at 'min should be present for non-empty sketch', src/sinks/datadog/metrics/encoder.rs:407:10

This indicates a problem in encoder.rs that was introduced in this commit.

Configuration

sinks:                                                                                                                                                          
  # https://vector.dev/docs/reference/configuration/sinks/datadog_metrics/    

  datadog_metrics:          
    type: datadog_metrics
    default_api_key: "${DD_API_KEY}"
    site: "${DD_SITE}"                                                          
    endpoint: "${DD_ENDPOINT}"
    inputs:                          
      - send_to_datadog.enabled

    buffer:
      max_events: 100000                                                        
      when_full: drop_newest                                                    
                                                                                
    request:
      # value chosen from observing production instances
      # increase pods count to scale
      # disables adaptive concurrency
      concurrency: 200  
                                        
    batch:  
      # if we don't limit this,                                                 
      # it appears that Datdog will just close the connection on too large payloads
      # Datadog payload limits are 5242880 bytes raw, 512000 compressed,
      # but vector calculates sizes before serialization and compression
      # https://docs.datadoghq.com/api/latest/metrics/#submit-metrics
      max_events: ${SETTINGS_BATCH_MAX_EVENTS}


### Version

vector 0.32.1 (x86_64-unknown-linux-gnu 9965884 2023-08-21 14:52:38.330227446)

### Debug Output

```text
thread 'vector-worker' panicked at 'min should be present for non-empty sketch', src/sinks/datadog/metrics/encoder.rs:407:10


### Example Data

N/A

I've been trying to `vector tap` for examples of payloads without `min`, but so far all of the distribution metrics that I've seen in our clusters contain that field. I'll update this issue if I find an example.

### Additional Context

You can see a fuller example of our vector config at https://github.com/seankhliao/testrepo0298
But, at a high level, we're using multiple sources.
- otelcol with prometheus
- otelcol with otlp
- otelcol with statsd
- datadog agent (monitoring kubernetes)
- datadog agent (monitoring postgres)

We see this crash most frequently with metrics that use our otelcol prometheus source.

I've also managed to reproduce this on 0.31.0 and 0.32.0, and don't observe crashes on versions before the commit mentioned above (e.g. 0.29.1)

### References

_No response_
@bencord0 bencord0 added the type: bug A code related bug. label Aug 23, 2023
@jszwedko jszwedko added the sink: datadog_metrics Anything `datadog_metrics` sink related label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sink: datadog_metrics Anything `datadog_metrics` sink related type: bug A code related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants