Django API“请求计数”现在显示在Azure App Insights>Performance with opencensus中

2024-05-29 10:31:25 发布

您现在位置:Python中文网/ 问答频道 /正文

遇到一个问题,我的Django python API应用程序没有使用opencensus将所有指标记录到Azure应用程序洞察

request count

但例如,我们得到了CPU/内存日志记录: cpu

我会期待性能>;请求计数与此类似(在不同的应用程序框架上): working app request count

performance counters部分看起来相当直截了当

我的代码如下所示:

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)


Tags: djangokey内存api应用程序记录cpuazure

热门问题