grafana / k6

A modern load testing tool, using Go and JavaScript - https://k6.io
GNU Affero General Public License v3.0
26.13k stars 1.27k forks source link

otel-exporter appends :443 after url #4060

Closed HugoVG closed 1 week ago

HugoVG commented 1 week ago

Brief summary

I've been wanting to send the results of my k6 load test to my otel collector but it seems k6 keeps appending :443 after my URL's (external)

k6 version

0.53

OS

Docker

Docker version and image (if applicable)

grafana/k6:latest

Steps to reproduce the problem

Expected behaviour

it doesn't append the :443 and resolves like the other services to the specified otel endpoint

Actual behaviour

¡Keep in mind the IP has been modified to 00.000 at the end, this is running within my local network, the collector is running collection for LGTM and works perfectly fine even from within the other services inside the docker!

Command: k6 run -o experimental-opentelemetry ~/LoadTest.js Environment:

2024-11-14 13:51:04 2024-11-14 13:51:04 /\ Grafana /‾‾/
2024-11-14 13:51:04 /\ / \ |\ / /
2024-11-14 13:51:04 / \/ \ | |/ / / ‾‾\ 2024-11-14 13:51:04 / \ | ( | (‾) | 2024-11-14 13:51:04 / ____
\ ||_\ ____/ 2024-11-14 13:51:04 2024-11-14 13:51:04 execution: local 2024-11-14 13:51:04 script: ~/LoadTest.js 2024-11-14 13:51:04 output: opentelemetry (grpc (insecure), http://10.10.00.000:4317/)

console.log(`${__ENV.K6_OTEL_GRPC_EXPORTER_ENDPOINT}`); result:

2024-11-14 13:51:04 time="2024-11-14T12:51:04Z" level=info msg="http://10.10.00.000:4317/" source=console

at the end of the run: 2024-11-14 13:51:14 time="2024-11-14T12:51:14Z" level=info msg="2024/11/14 12:51:14 failed to upload metrics: failed to exit idle mode: invalid target address http://10.10.00.000:4317/, error info: address http://10.10.00.000:4317/:443: too many colons in address" ^it adds :443 which breaks the call

agilob commented 1 week ago

Remove https:// from K6_OTEL_GRPC_EXPORTER_ENDPOINT

HugoVG commented 1 week ago

I'll try that thank you

HugoVG commented 1 week ago

That did seem to work!