I want to send metrics of a kafka app to signoz ot...
# support
s
I want to send metrics of a kafka app to signoz otel collector in a different eks cluster, I have made the otel collector publically available using virtual-service & pvt-gateway ,but the otelagent jar throws error
OTLP endpoint must be a valid URL
How to implement this??
n
Can you share the value of otlp endpoint you are passing ?
s
n
it will look something like this https://signoz-collector-qa.fcinternal.in:4317 cc @Prashant Shahi
s
tried it, same error
n
Can you share the entire command that you are using to run your jar?
s
Copy code
export EXTRA_ARGS='-Dotel.exporter.otlp.endpoint="<https://signoz-collector-qa.fcinternal.in:4317>" -Dotel.resource.attributes=service.name=kafka-test -javaagent:/opentelemetry-javaagent.jar'
exec $base_dir/kafka-run-class $EXTRA_ARGS kafka.Kafka "$@"
n
Interesting, can you try using env vars like this and check if the same error occurs ?
Copy code
OTEL_EXPORTER_OTLP_ENDPOINT="<http://localhost:4317>" OTEL_RESOURCE_ATTRIBUTES=service.name=petclinick java -javaagent:"~/opentelemetry-javaagent-1.jar" -jar target/*.jar
s
but that won't send metrics to signoz collector
???
n
Sorry didn’t get you.
s
will this send metrics to otel-collector in eks cluster ?
n
Yes it will.
We have an example application here https://github.com/SigNoz/spring-petclinic
s
ok
should i use these envs also to start the service??
n
If you are running the otel agent with your service then you will need to add these env vars
s
does it matter that i am trying to export metrics of a kafka app?
n
No in that case it doesn’t matter to add them to your services.
s
i mean i am adding it to the kafka start command
n
So you just want your Kafka server metrics. While I haven’t personally tried this out, you can check out this demo doc by Otel https://opentelemetry.io/docs/demo/services/kafka/ You can also check out this kafka metrics receiver https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/kafkametricsreceiver/README.md @Srikanth Chekuri any more ideas on monitoring the Kafka server?
s
It’s unclear if they are interested in the Kafka server or language client instrumentation; it seems they want to collect the client metrics. None of that is relevant to the original error. Can you share the full run command?
s
we want instrumentation of the kafka server??
s
Is that a question or confirmation?
s
sorry,confirmation
s
If you are interested in the telemetry of the Kafka server, you need to use the collector https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kafkametricsreceiver. Let us know if that helps or you need more clarification.