Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Azure Functions Java: Duplicate log entries in Portal Log Stream since agent 3.7.0

オープン
#4,698 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
azure, java
領域
observability

調査の方向性

PR #3962 における agent 3.7.0 の依存関係の変更を確認し、OpenTelemetry Instrumentation 2.9.0 と 2.10.0 を比較します。JUL の処理と Portal Log Stream のパスに重点を置いてください。APPLICATIONINSIGHTS_ENABLE_AGENT=true と context.getLogger().info() を使用して再現し、その後 agent 3.6.2 での動作と比較します。完了の条件は、Portal Log Stream に [undefined] の重複がなく、ログが App Insights のトレースに 1 回だけ表示されることです。

索引モデルが issue の本文から書いたものです。

説明

Description

When APPLICATIONINSIGHTS_ENABLE_AGENT=true (the default), calls to context.getLogger().info() produce duplicate entries in the Azure Portal Log Stream:

  • [Information] from the host RPC log pipeline
  • [undefined] from the AI agent's JUL auto-instrumentation

The duplication only appears in the Portal Log Stream. In the App Insights traces table, the user log message appears once (from the agent only). The entries stored in App Insights are identical in structure between the working and broken agent versions.

Image Image

Regression

Introduced in agent 3.7.0, which upgraded OpenTelemetry Java Instrumentation from 2.9.0 to 2.10.0 (PR #3962). No AI agent code changes were made between 3.6.2 and 3.7.0 regarding JUL handling. The behavioral change comes from the upstream OTel dependency bump.

With 3.6.2, the agent captures JUL logs and sends them to App Insights without producing a duplicate in the log stream. Starting with 3.7.0, the same capture also produces an [undefined] entry in the log stream.

Agent OTel Instrumentation User log in AI traces Duplicate in Log Stream
3.6.2 2.9.0 Yes No
3.7.0+ 2.10.0+ Yes Yes

Affects all Java versions (8, 11, 17, 21, 25) on Linux Dedicated.

Workarounds

Workaround Tradeoff
APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_ENABLED=false Eliminates duplication but user logs from context.getLogger() no longer appear in App Insights traces
APPLICATIONINSIGHTS_ENABLE_AGENT=false Eliminates duplication but disables all AI agent functionality
Downgrade to agent 3.6.2 via languageWorkers__java__arguments Not viable for managed identity users (azure-functions-java-worker#820)

No workaround fully restores the 3.6.2 behavior (user logs in AI traces without log stream duplication).

Expected behavior

The agent should capture JUL logs for App Insights without producing a duplicate [undefined] entry in the log stream, as it did in 3.6.2.

主要言語
Java
スター
327
フォーク
222
平均マージ
22時間 34分
マージ済み PR(30日)
14

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/ApplicationInsights-Java のほかの issue

microsoft/ApplicationInsights-Java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。