Send traces from OTLP python app directly to local Tempo instance

Hello. I’m currently doing a POC for Tempo but completely local at this time. Here’s what I have running locally:

  • Python flask app manually instrumented with OTLP
  • Prometheus:9090
  • Grafana:3000
  • Tempo:3200

According to this page:

most clients can send directly to Tempo

Is there any documentation on how to send directly to Tempo from my OTLP instrumented Python app?

Hi this blog post helps with Python and links to this example repo. Those examples are a bit old but should be helpful. The main thing is to enable the OTLP receivers in Tempo, using http or grpc based on which your application is exporting.

1 Like

Just use standard Python OTLP exporter in your code - OpenTelemetry OTLP Exporters — OpenTelemetry Python documentation

Of course, use proper Grafana cloud Tempo endpoint and auth and that’s it.

I would say that best practise is not sending traces directly from the code to remote trace storage (Tempo in Grafana Cloud). You should use local OTEL collector and that collector should send traces to remote trace storage. That local OTEL collector will provide additional resiliency (retry when export is failing, persistent queues, …), it may improve app latency (because app connects only to local collector).

Thank you. I was trying to get away with not using the OTel collector but that’s silly even in my local. Also I missed this line:

the receives all come from the OpenTelemetry collector

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.