New Relic K6 integration

@mstoykov
I have generated the NR_API_KEY.
I have the NR_ACCOUNT_ID.

Trying to understand what should be the hostname in the below command? Can you please help ?

I tried with one.newrlic.com. But getting error as no host found.

docker run
-d --restart unless-stopped
–name newrelic-statsd
-h $(hostname)
-e NR_ACCOUNT_ID=
-e NR_API_KEY=""
-p 8125:8125/udp
newrelic/nri-statsd:latest

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: https://k6.io/docs/results-visualization/statsd

Hi both, just joined this forum (I’m from New Relic :wave:) 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 :slightly_smiling_face:

So this works equally fine:

docker run
-d --restart unless-stopped
–name newrelic-statsd
-e NR_ACCOUNT_ID=
-e NR_API_KEY=""
-p 8125:8125/udp
newrelic/nri-statsd:latest


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.

Also cheeky plug for the k6 and New Relic webinar next Tuesday :wink:

2 Likes

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

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

@mostafa and @gspncr - Can you please help

Does no one have information on this ?