Why is the name tag not being passed from k6 to Datadog?

For example:

var response = http.get(`http://${tenant}`, {
    tags: { name: `${stepNum} - http://${tenant})` },
  });

These names make it fine to k6 cloud,

but not through the Datadog connector.

export let options = {
  // Connection and metrics information for running on k6 cloud
  ext: {
    loadimpact: {
      projectID: projectID,
      name: "SSO login flow",
      apm: [
        {
          provider: "datadog",
          apiKey: "apiKey",
          appKey: "appKey",
          metrics: ["http_reqs", "http_req_blocked", "http_req_connecting", "http_req_tls_handshaking", "http_req_sending", "http_req_waiting", "http_req_receiving", "http_req_duration"],
          includeDefaultMetrics: true,
          includeTestRunId: true
        },
      ]
    }
  },

The name metric should be included by default, no? https://k6.io/docs/using-k6/tags-and-groups#system-tags

Hi @leathej1 ,
I now noticed that you are actually using the k6 cloud integration with datadog.

I have moved this to the correct SaaS forum and am now pinging @mostafa who should be able to help you :slight_smile:

Oh, sorry about that. Thanks.

1 Like

Hey @leathej1,

The more granular you want to be able to filter your metrics on DataDog, the more records DataDog needs to create on their database, which is achieved by sending tags along with custom metrics (k6.*) to their platform.

AFAIk, we omitted sending tags (hence includeTestRunId: false by default) because tags incur a hefty cost.

So what is the workaround in this case? Do I have to create a trend for every metric/url? Or can I force sending the name tag…?

Creating a custom metric and adding it to metrics key would help, for now. You can’t force sending the name tag.

Really? Because I just added this:

metrics: ["name",

and now it works.
2021-03-11 10_47_52-Window .

Ohh… that only works from k6, not k6 cloud. Ugh.