Opentelemetry exporter trying to connect via https

256 views
Skip to first unread message

Natalio Gatti

unread,
Mar 21, 2024, 11:21:03 AM3/21/24
to KrakenD Community
Hello, I am trying to configure krakend to export metrics and monitoring to a datadog agent.
The datadog agent is working and is currently receiving information from other applications. Datadog agent is configured to receive HTTP (not HTTPS) requests, so I configured krakend opentelemetry with:
"telemetry/opentelemetry": {
"service_name": "datadog-krakend",
"metric_reporting_period": 1,
"@comment": "Report 10% of traces",
"trace_sample_rate": 0.1,
"exporters": {
"otlp": [
{
"name": "datadog_agent",
"host": "10.0.126.27",
"port": 8126,
"use_http": true
}
]
}

but then I see the following error on krakend logs:
ERROR [SERVICE OpenTelemetry] failed to upload metrics: Post "https://10.0.126.27:8126/v1/metrics": http: server gave HTTP response to HTTPS client

It seems krakend is trying to connect via HTTPS instead of plain HTTP.  Is there any parameter I can config to force krakend to use plain HTTP?

Thanks,

Natalio.

Albert Lombarte

unread,
Apr 12, 2024, 3:39:34 AM4/12/24
to KrakenD Community, nat...@tmm.ventures
Hi Natalio,

Set "use_http": false to communicate via gRPC with the Datadog agent

Let me know if that works for you

El dia dijous, 21 de març del 2024 a les 16:21:03 UTC+1, nat...@tmm.ventures va escriure:

Natalio Gatti

unread,
Apr 12, 2024, 7:34:28 AM4/12/24
to KrakenD Community
Hi Albert,  thanks for your response. My datadog agent wasn't configured to attend for grpc, that's why I wanted to use HTTP. 
I reconfigured the agent to support both http (for my previous confs) and grpc (for krakend) and everything is working correctly.
Anyway I think there should be an option to allow krakend to use HTTP instead of HTTPS.

Regards,
Natalio.
Reply all
Reply to author
Forward
0 new messages