Hello,
I have a project in k6 where I execute some scenarios, send the metrics and tags to Datadog and look at them through a dashboard.
The problem is that the metrics I want doesn’t exist, we got individual metrics of every check, but no global metrics that could englobe them all to show them easily in the dashboard. The possible solution would be to do dashboard with all the metrics of the checks, but that mean adding them by hand, have to maintain them by hand and we have a lot of checks through the scenario.
The way to fix all this with Datadog is to use a custom metrics with the DogStatsD client ( DogStatsD ). I did my configuration of the client like that :
use_dogstatsd: true
dogstatsd_port: 8125dogstatsd_mapper_profiles:
- name: my_custom_metric_test
prefix: custom_metric.
mappings:
- match: ‘k6.check.*’
match_type: wildcard
name: custom_metric.check
And then, I should initialize the client in the k6 project, but I dont really know where I should do so, and how, because the Datadog’s page talk about ways to do it in Python, Ruby, Go, Java, PHP, NET but not in Javascript.
So if anyone already have this type of configuration and manage to make his custom metric appear on Datadog, I would appreciate any tips !
Thanks in advance,
Arthis