How do I instrument and configure a django app with OTel?

I created a sample django app that accepts to endpoint.

My goal is to instrument it with OTel so that it will report the following metrics for each endpoint:

  • Error rate
  • Latency

(And hopefully to do so without explicitly set each endpoint with specific code.)

I tried OpenTelemetry WSGI Instrumentation but I couldn't find how to configure it to export metrics to the OTel collector.

Is the WSGI instrumentation suppose to accompany the OTEL instrumentation? Do I need to instrument my code with both to be able to configure it?

In short, my question is how do I configure the OTel instrumentation to export the above metrics to the OTel collector or Prometheus endpoint?

Back to Top