Connect to Dynatrace using the OTLP gRPC protocol

At present I am trying to connect to Dynatrace using my Open Telemetry Collector. I need to use the OTLP gRPC protocol for my POC. The configuration I have used is as below:

`exporters:
  otlp:
    endpoint: https://{environmentid}.live.dynatrace.com/api/v2/otlp:4317
    wait_for_ready: false
    sending_queue:
      enabled: false
    tls:
      insecure: false
      insecure_skip_verify: true`

However I see the the below error when i run my collector using the config above

{"level":"warn","ts":1676323322.198344,"msg":"[core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {\n  \"Addr\": \"rcv415883.live.dynatrace.com/api/v2/otlp:4317\",\n  \"ServerName\": \"rcv41584.live.dynatrace.com/api/v2/otlp:4317\",\n  \"Attributes\": null,\n  \"BalancerAttributes\": null,\n  \"Type\": 0,\n  \"Metadata\": null\n}. Err: connection error: desc = \"transport: Error while dialing dial tcp: lookup rcv41584.live.dynatrace.com/api/v2/otlp: no such host\"","grpc_log":true}
1 Like

Your endpoint is not a valid URL. Remove the part :4317 as Dynatrace does not listen on a such port and in the URL the port goes after the hostname - if applicable.

Hi.

I changed endpoint as below

exporters:
      otlp:
        endpoint: https://{environmentid}.live.dynatrace.com:4317
        wait_for_ready: false
        sending_queue:
          enabled: false
        tls:
          insecure: false
          insecure_skip_verify: true

and I get error from otel collector as below:

"level":"info","ts":1676381087.568085,"msg":"Started watching file from end. To read preexisting logs, configure the argument 'start_at' to 'beginning'","kind":"receiver","name":"filelog","pipeline":"logs","component":"fileconsumer","path":"/data/output-logs"}
{"level":"warn","ts":1676381107.066672,"msg":"[core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {\n  \"Addr\": \"rcv415883.live.dynatrace.com:4317\",\n  \"ServerName\": \"rcv415883.live.dynatrace.com:4317\",\n  \"Attributes\": null,\n  \"BalancerAttributes\": null,\n  \"Type\": 0,\n  \"Metadata\": null\n}. Err: connection error: desc = \"transport: Error while dialing dial tcp 34.199.215.244:4317: i/o timeout\"","grpc_log":true}

and when I removed the port from endpoint such as below:

exporters:
      otlp:
        endpoint: https://{environmentid}.live.dynatrace.com

Then I get error as below

{"level":"info","ts":1676381289.5264444,"msg":"Starting stanza receiver","kind":"receiver","name":"filelog","pipeline":"logs"}
{"level":"warn","ts":1676381289.5262246,"msg":"[core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {\n  \"Addr\": \"rcv415883.live.dynatrace.com\",\n  \"ServerName\": \"rcv41584.live.dynatrace.com\",\n  \"Attributes\": null,\n  \"BalancerAttributes\": null,\n  \"Type\": 0,\n  \"Metadata\": null\n}. Err: connection error: desc = \"transport: Error while dialing dial tcp: address rcv41584.live.dynatrace.com: missing port in address\"","grpc_log":true}

Ok, if it requires the port, so try

https://{environmentid}.live.dynatrace.com:443/api/v2/otlp

When I tried the endpoint as you suggested, i.e.

https://{environmentid}.live.dynatrace.com:443/api/v2/otlp

I get below error:

{"level":"warn","ts":1676392138.4155657,"msg":"[core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {\n  \"Addr\": \"rcv415883.live.dynatrace.com:443/api/v2/otlp\",\n  \"ServerName\": \"rcv415883.live.dynatrace.com:443/api/v2/otlp\",\n  \"Attributes\": null,\n  \"BalancerAttributes\": null,\n  \"Type\": 0,\n  \"Metadata\": null\n}. Err: connection error: desc = \"transport: Error while dialing dial tcp: address tcp/443/api/v2/otlp: unknown port\"","grpc_log":true}

I am afraid, gRPC is currently not yet supported.

Only export format OTLP/HTTP binary Protobuf from OpenTelemetry is supported

2 Likes

Is gRPC supported in Dynatrace now?

I used the URL :

https:// {environmentid}.live.dynatrace.com/api/v2/otlp/v1/traces and created an access token to ingest OTLP 
Authorization: ‘Api-Token dt0c01.4*************.f**********************’

I could not see any traces in DynaTrace.

Hello here :slightly_smiling_face: 
Any news about gRPC compatibility ?

1 Like

Isn’t this it:

Transform OTLP gRPC - Dynatrace Docs

1 Like