OpenTelemetry

Azure FunctionsでWe were not able to load some functions in the list due to errorsエラーの対処

  • POST
はじめに Azure Functionsを運用していると、突然関数リストが表示されなくなり、「We were not able to load some functions in the list due to errors」というエラーメッセージが表示されることがあります。 本記事では、Application InsightsでOpenTelemetry(OTEL)を使用している場合に発生する、OTEL_SERVICE_NAME環境変数が未定義であることが原因のエラーについて、その原因と対処方法をご紹介します。 エラーの症状 Azure PortalでFunctionsのページを開いたときに、以下のようなエラーメッセージが表示され、関数のリストが読み込めなくなります。 We were not able to load some functions in the list due to errors. Refresh the page to try again. Error while loading Ask questions and use troubleshooting tools to investigate these errors. Diagnose and solve problems この状態では: 関数の一覧が表示されない 個別の関数の詳細も確認できない コード上ではApplication Insightsへのデータ送信は正常に動作している エラーの原因 このエラーは、Application InsightsでOpenTelemetry(OTEL)を使用している場合に、OTEL_SERVICE_NAME環境変数が設定されていないことが原因です。 Azure FunctionsでOpenTelemetryを使用してテレメトリデータを送信する際、サービス名を識別するためにOTEL_SERVICE_NAME環境変数が必要になります。