I am not familiar with NewRelic or even StatsD, but why do you need to give a hostname to the docker container at all? It should bind to localhost by default, right? And this is what the k6 StatsD output also expects by default: StatsD
Hi both, just joined this forum (I’m from New Relic ) and catching up on topics.
Indeed you don’t have to include the hostname. The New Relic - k6 integration works fine without that argument. We do recommend it though.
The reason that we include the hostname argument in the results visualisation guide, was to make it easier for users in New Relic to see where the results are being sent in from (which client is running it) which might be easier to determine and more user friendly than a docker container ID. One typical example might be somebody leaving the New Relic output enabled on a local client that is sending data to NR but they may not want to be - so to easier get to the source of who might be running this
So see above the difference in New Relic is the source of the telemetry, which like I mention might be friendlier with a machines name rather than a container ID.
@pawansinha4u - hopefully running the same command without the hostname arg works for you - please reach out if you’re still facing issues.
Hey @gspncr - Thanks for everything.
I am able to integrate k6 and NR.
I have got a question on the metrics thrown to NR. I am not able to find which metrics to be considered for the response time. Below are the metrics listed for 1 transaction, transaction name is 00_getProduct. however. apply-pnv. - this is a namespace name using this variable K6_STATSD_NAMESPACE.I am not able to find "http_req_duration to check on response time.
i just see below metrics for any transactions. please help @mstoykov@gspncr
Thanks @imiric - This is the transaction name - 00_getProduct. (this is what I call a transaction)
This is the way i am giving - group(‘00_getProduct’, getProduct.getProductF).
getProductF - this is the function used to call http operation(not to worry about this).
So, all the stats come like below after execution: So the question is which one is exactly I should refer to get the response times?
I think those are the group_duration values, while http_req_duration is a metric emitted per request.
If you’re only making a single request within that group, then you could lookup the standalone metric as I showed in my screenshot or by tagging the request. Otherwise, to get the response times for the entire group you’d have to define a custom metric and aggregate all response.timings.duration values in your script. See the documentation.
It has only one http request in the group, as you said you have given a screenshot, where is it ? @imiric. Also, the script has multiple group like this
group(‘00_getProduct’, getProduct.getProductF)
group(‘01_getJWT’, getToken.getJWT)
now it comes like below : for both the groups, i have just given for 1 group. so can you now tell me which one to consider for the response time ?
apply-pnv.00_getProduct.count.percentiles
apply-pnv.00_getProduct.mean
apply-pnv.00_getProduct.mean.percentiles
apply-pnv.00_getProduct.median
apply-pnv.00_getProduct.per_second
apply-pnv.00_getProduct.sum_squares
apply-pnv.00_getProduct.sum_squares.percentiles
apply-pnv.00_getProduct.sum.percentiles
apply-pnv.00_getProduct.upper.percentiles