Azure Functions Java: Duplicate log entries in Portal Log Stream since agent 3.7.0
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- azure, java
- Lĩnh vực
- observability
Hướng nghiên cứu
Xem xét thay đổi dependency của agent 3.7.0 trong PR #3962 và so sánh OpenTelemetry Instrumentation 2.9.0 với 2.10.0, tập trung vào việc xử lý JUL và đường dẫn Portal Log Stream. Tái hiện bằng APPLICATIONINSIGHTS_ENABLE_AGENT=true và context.getLogger().info(), sau đó so sánh hành vi với agent 3.6.2. Được xem là hoàn tất khi log xuất hiện một lần trong các trace của App Insights mà không có bản sao [undefined] trong Portal Log Stream.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
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.
- Ngôn ngữ chính
- Java
- Star
- 327
- Fork
- 222
- Merge trung bình
- 22 giờ 34 phút
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/ApplicationInsights-Java
-
microsoft/ApplicationInsights-Java#4851 · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/ApplicationInsights-Java#4817 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoft/ApplicationInsights-Java#4770 · 2 bình luận ·
-
Support for tail based sampling? Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
microsoft/ApplicationInsights-Java#4769 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/ApplicationInsights-Java#4729 · 121 bình luận ·
Tất cả issue của microsoft/ApplicationInsights-Java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
FasterXML/jackson-databind#6229 ·