Closed leathej1 closed 1 year ago
This sounds like a good idea to me, but I think the option should rather be to have an include list of which tags to send to the APM provider. Something like includeTags: ['name', 'url', ...]
. As some APM providers charge by the number of series, and they see each tag added to a metric as a new series, it will need to made very clear in the docs that any tag added could potentially increase the number of metrics exponentially (as seen by some APM providers).
@mostafa do you know of any additional complexities or limiting factors regarding the inclusion of tags in metrics data sent to APM providers from the cloud?
@robingustafsson I see no other complexity than the cost. Besides, we kinda have the feature under the hood, because I thought we might need it in the future, but there's no plumbing to connect the user-defined tags to the metrics other than the testRunId
.
@leathej1 As confirmed by @sniku, we'll have this feature in our current development cycle along with issue/feature #5.
FWIW, I have read the Custom Metrics Billing page, and reviewed my Metrics summary. Trends are being counted against my metrics, but my name
tags are not.
Hey @leathej1 ,
sorry for the long delay in replying to this feature request. We have discovered that implementing this seemingly simple feature isn't trivial. :sweat_smile:
To output data with tags to DataDog (or another APM provider), we have to create separate series for each tag name and value combination. If we assume that your test has 100 URLs (or names), adding a name
tag for the http_req_duration
metric means that data needs to be sliced into 100 separate series, re-aggregated, and submitted in a different way than we currently do it.
k6 CLI doesn't do any output aggregation, so tagging is much simpler to implement there. k6 cloud stores data in 1s HDR buckets, rather than raw data points, so implementation tagging is more difficult.
We want tagging to be simple and consistent across the APM providers we support, so it will take more time to implement than we originally anticipated. Our implementation must be efficient not to overwhelm both the k6 cloud and the APM provider.
During this development cycle (8 weeks) we are going to refactor the way metrics are stored in k6 cloud, which will make DataDog tagging easier to implement, potentially in the next cycle.
We need APM tagging ourselves in our internal use of k6 within the company, so you can rest assured that we will implement it, but I can't at the moment give you a definitive timeline.
Any updates over the past 6 months?
Sounds like this is implemented with keepTags - am I correct?
When running a k6 test locally with
--out datadog
, I am able to send metrics with the tag name. From this, I can then create a chart in Datadog that plots response times for each response when I querymax:k6.http_req_duration.max{*} by {name}
.However, this is disabled in k6 cloud. Therefore, to send granular data... I cannot use k6 cloud. I learned this after convincing my organization to purchase an enterprise agreement, so I am now on the spot.
I cannot reasonably create a trend object for every url that I am testing, because this is an Okta SSO flow that requires dozens of steps that I need to measure. The additional declarations and invocations would add a lot of bloat.
Suggestion: In the same way that you have to specify
includeDefaultMetrics
andincludeTestRunId
, allow a directiveincludeNameTag
to enable this functionality without sending all tags.