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

K6_DATADOG_TAG_BLACKLIST not functional #1602

Closed
guongle-ssense opened this issue Aug 21, 2020 · 3 comments · Fixed by #1604
Closed

K6_DATADOG_TAG_BLACKLIST not functional #1602

guongle-ssense opened this issue Aug 21, 2020 · 3 comments · Fixed by #1604
Labels
Milestone

Comments

@guongle-ssense
Copy link

Environment

  • k6 version: 0.27.1
  • OS and version: macOS Catalina
  • Docker version and image, if applicable: 2.3.4.0 (469980)

Expected Behavior

I am unsure how K6_DATADOG_TAG_BLACKLIST suppose to behave, but from several of the PRs I've checked within the repo, it is supposed to remove metrics that I would like the process to not send. However, I am getting an error regardless of what I do.

Actual Behavior

ERRO[0002] envconfig.Process: assigning K6_DATADOG_TAG_BLACKLIST to TagBlacklist: converting 'name,url,endpoint' to type stats.TagSet. details: invalid map item: "name"

Steps to Reproduce the Problem

  1. export K6_DATADOG_TAG_BLACKLIST="name,url,endpoint"
K6_DATADOG_ADDR="dogstatsd:8125" k6 run -e HOST='jsonplaceholder.typicode.com' -e ENV= -e TEST_BUILD=3 --vus 1 --duration 10s --summary-trend-stats "min,avg,med,max,p(25),p(75),p(95),p(99)" --out datadog scripts/benchmark/browsing.js
ERRO[0002] envconfig.Process: assigning K6_DATADOG_TAG_BLACKLIST to TagBlacklist: converting 'endpoint' to type stats.TagSet. details: invalid map item: "endpoint"
make: *** [Makefile:65: dd-benchmark] Error 255

if I do this export K6_DATADOG_TAG_BLACKLIST="" which is the default, all is well, however since Datadog charges per uniqueness, I would like to reduce certain metrics such as:

  • tls_version
  • name / URL (they are basically the same metrics)
  • http

etc.

mstoykov added a commit that referenced this issue Aug 24, 2020
Also sort the keys before marshalling them with SystemTagSet for
consistant output.

fixes #1602
mstoykov added a commit that referenced this issue Aug 24, 2020
Also, sort the keys before marshaling them with SystemTagSet for
consistent output.

fixes #1602
@mstoykov
Copy link
Contributor

Thanks for reporting this @guongle-ssense

Apparently nobody tested that it hasn't been broken around #1148 but with #1604 it seems to work ;)

@na-- na-- added this to the v0.28.0 milestone Aug 24, 2020
mstoykov added a commit that referenced this issue Sep 2, 2020
Also, sort the keys before marshaling them with SystemTagSet for
consistent output.

fixes #1602

Co-authored-by: Ivan Mirić <[email protected]>
@guongle-ssense
Copy link
Author

@mstoykov
Question:

I have upgraded the k6 to v0.28.0 since the release stated the bug fix is there

however when i run

K6_DATADOG_TAG_BLACKLIST="name,url,tls,tls_version,proto,method,image,instance-type,k8s.io/role/node,k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io,k8s.io/cluster-autoscaler/node-template/taint/dedicated:benchmark,k8s.io/cluster-autoscaler/qa.k8s.ssense.com,kernel,kops.k8s.io/instancegroup,kube_node_role,kubernetescluster,pillar,region,security-group,service,team,host,none" K6_DATADOG_ADDR="dogstatsd:8125" k6 run --summary-trend-stats "min,avg,med,max,p(25),p(75),p(95),p(99)" --out datadog scripts/myscript.js

When i go to the Datadog Metrics Explorer I still see all the TAG being there.
as Extra, I have also put them inside the ENV (confirmed via printenv)

Am i using it wrong or am i understanding the blacklist operation incorrectly?

@mstoykov
Copy link
Contributor

Hi @guongle-ssense,

Can you screenshot what you see as I can't find something like that?
Also is this possible that these tags are leftover from your previous tests? Maybe you need to delete them (somehow, not a ... experienced datadog users :( )

From what I can find what you are doing should work, and also we released v0.29.0 last week, so you might be interested in upgrading to that as well (no datadog changes there, unfortunately)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants