census-instrumentation / opencensus-java

A stats collection and distributed tracing framework
https://opencensus.io
Apache License 2.0
673 stars 202 forks source link

Support for client-side percentiles #1628

Open ghost opened 5 years ago

ghost commented 5 years ago

Please answer these questions before submitting a bug report.

What version of OpenCensus are you using?

0.18

What JVM are you using (java -version)?

1.8

I see the Summary class being used to convert DropWizard metrics to opencensus. However I dont see it being created on creation/update of View/Measurement. We are looking to use opencensus-java, and one of the requirements is to export client-side percentiles(p95,p99 etc) as our sidecar/backend doesnt calculate them itself.

I see a discussion here where datadog decided to export the aggregated values such min, max, avg as gauges. We are looking to do the same but we also need to send percentiles(p95,p75) etc..is there a way to associate/create a Summary with a View so that we can obtain percentiles from Metric while exporting?

I also see a discussion in the specification repo https://github.com/census-instrumentation/opencensus-specs/issues/55

Was this implemented?

bogdandrutu commented 5 years ago

Hi @akhil-karanth

Do you mind sharing with us what backend do you use?

In general we do not want to produce Summary for multiple reasons:

  1. You cannot calculate rates, the values that you export have to already be "rated".
  2. You cannot calculate other percentiles that you did not include in the view definition.

We would prefer to work with the backend of your choice to add support for Histograms if possible.

ghost commented 5 years ago

@bogdandrutu

We use datadog and send metrics via the datadog agent(dogstatsd) currently we use codahale metrics & send min,max, p50, p75, p95, p99 & m1_rate as gauges to datadog via dogstatsd for a particular metric. We want to retain this moving forward as well.

You cannot calculate other percentiles that you did not include in the view definition. ->Is there are a way to specify we want p95, p99 in the view definition?