-
Notifications
You must be signed in to change notification settings - Fork 224
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 to OpenTelemetry Collector #1842
Comments
Hi @JCzz! Would you be able to share the output you're seeing after you run that command? cc'ing @olegbespalov if you might be able to help as well. 🙇 |
Sure, happy to help and based on the need we could certainly improve our documentation! @JCzz could you please provide more context about your set-up, like you have up & running Alloy? Or do you want to know how to set up alloy, and how to configure k6 to send metrics to it? Maybe helpful could be that at the One thing, just to be clear, the current k6's open telemetry output is only about metrics, so it can't integrate with Tempo. |
Hi there Thanks for replying, I am on vacation until friday, but then I will get back with more. But basically I just need to collect and show metrics, traces and logs in Grafann - from custom instrumentation and k6 metrics from tests. It would really help with an example using OpenTelemetry Collector og Alloy. Thanks |
Sure, there is exactly example of using k6 with allow, the only thing to modify from there is output name, instead of
Which starts to export metrics using some default configuration, where it uses localhost:4317. And Alloy, in example, configured to forward metrics to the Prometheus. Once you return and check, please let me know if that helps, or I could provide more context. |
Very good Alloy example in: Is there anyway I can use Mimir instead of Prometheus for storing Metrics - maybe it is just to add Mimir instead of Prometheus in Docker Compose? |
Sure! Grafana Alloy supports forwarding to many metrics BE including Mimir.
We keep Prometheus there for simplicity, and just for showcasing. If you look into Alloy to Mimir I'd recommend checking out alloy's examples. Please note that all examples still just examples to showcase the working integrations and configuration for production set up could be different, depending on your case. |
I have tried running the following with the beneath changed configurations to https://github.com/grafana/xk6-output-opentelemetry/tree/main examples:
But I just get "Failed to call resource"... in Grafana? docker-compose
Alloy config
Grafana Data source
|
Hi @JCzz let me to double-check 🤔
Do you get this error in Grafana or k6? |
Thanks @olegbespalov The error shows up in Grafana... note that I am using Mimir directly from Alloy - using Prometheus remote write. I have tried both "push" and "remote write". The config above is currently set to "push", but should be "write" if possible. Hope that is a valid way using the Prometheus included in Alloy. As I understand both Opentelemetry Collector and Prometheus is wrapped in Alloy? |
Anyone that have this working: k6 >> Alloy >> Mimir >> Grafana |
Hi @JCzz Sorry, I'm pretty sure that is a configuration error somewhere, but I didn't have an opportunity to look at it, and unfortunately won't have time to look at it next week. Try to have a look to the example alloy's examples https://github.com/grafana/alloy/tree/main/example, they should have a working Hope that helps. |
@JCzz you could also try posting in the Grafana Labs community forum: https://community.grafana.com/c/grafana-k6/70, I think that gets a little more visibility, and maybe someone else from the community has the same configuration setup that you're looking for. |
Hi
Can you document how to use k6 with OpenTelemetry Collector(or Alloy), I am having a hard time to run example like:
K6_OTEL_GRPC_EXPORTER_INSECURE=true K6_OTEL_GRPC_EXPORTER_ENDPOINT=htp://localhost:4317 K6_OTEL_METRIC_PREFIX=k6_ k6 run --out experimental-opentelemetry ./demo.js
or with http: K6_OTEL_HTTP_EXPORTER_ENDPOINT
And using Mimir & Tempo would be very cool.
Thanks in advance
The text was updated successfully, but these errors were encountered: