DataDog / php-datadogstatsd

A PHP client for DogStatsd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible incompatibility with Datadog agent ( version 6 )

opened this issue · comments

Hi. I'm using this client and it's working fine with Datadog agent ( v5.22 ) but when I upgrade to Datadog v6, the timing metrics doesnt work.

More details:
PHP: 7.0
OS: Ubuntu 16

Thanks in advance!

Hi @ericBidcom and thanks for reporting.
Do you have a snippet of code we can use to reproduce the issue?

Hi @masci . I'm using two simple metrics:

...
   $statsd->increment('request.ok');
   $statsd->timing('request.time', microtime(true) - $start_time);
...

As I said, it works fine with Datadog v5.22 but when I upgrade to v6, it seems that client doesnt send the request.time metric. The dashboard only show the request.ok metric.

Let me know if you need more information
thanks!

This works for me with Agent 6.0.0:

↳ php -a
Interactive shell

php > require './src/DogStatsd.php';
php > $statsd = new DataDog\DogStatsd();
php > $statsd->timing("query.foo.time", 200);
php > $statsd->increment('page.foo.views');

Going to close this since the problem seems to be on the Agent side, maybe some configuration related issue. Can you reach out to support@datadoghq.com for further investigation?

Same thing happened to me when I upgraded. I think there must be a bug somewhere in the code migrating the v5 config over to v6. Found the culprit inside datadog.yaml:

histogram_aggregates: []
histogram_percentiles: []

After changing to the defaults:

histogram_aggregates: ["max", "median", "avg", "count"]
histogram_percentiles: ["0.95"]

Everything started working again.