pythondjangoazureazure-application-insightsopencensus

Django API "request count" now showing in Azure App Insights > Performance with opencensus


running into an issue where my Django python API application is not logging all metrics to Azure App Insights using opencensus.

request count

But for example, we are getting CPU/memory logging: cpu

I would expect the performance > request count to look similar to this (on a different application framework): working app request count

The performance counters section looks pretty straight forward.

My code looks like this:

from opencensus.ext.azure import metrics_exporter

def main():
  INSTRUMENTATION_KEY = os.getenv("INSTRUMENTATION_KEY", "xxx")

  exporter = metrics_exporter.new_metrics_exporter(connection_string='InstrumentationKey='+INSTRUMENTATION_KEY)


Solution

  • I think you need to make sure if your app's requests have been captured and you may refer to this section, Incoming requests, outgoing requests <=> Tracing

    Hence, according to the tutorial you provided, I'm new to python, but I assume that you may consider this section?