Azure Functions Java: Duplicate log entries in Portal Log Stream since agent 3.7.0
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- azure, java
- Área
- observability
Línea de trabajo
Revisa el cambio de dependencia de agent 3.7.0 en el PR #3962 y compara OpenTelemetry Instrumentation 2.9.0 con 2.10.0, centrándote en el manejo de JUL y la ruta de Portal Log Stream. Reprodúcelo con APPLICATIONINSIGHTS_ENABLE_AGENT=true y context.getLogger().info(), y luego compara el comportamiento con agent 3.6.2. Se considera completado cuando el registro aparece una vez en las trazas de App Insights, sin un duplicado [undefined] en Portal Log Stream.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 327
- Forks
- 222
- Merge medio
- 22 h 34 min
- PR fusionados (30 d)
- 14
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/ApplicationInsights-Java
-
microsoft/ApplicationInsights-Java#4851 · 1 asignado ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
microsoft/ApplicationInsights-Java#4817 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
microsoft/ApplicationInsights-Java#4770 · 2 comentarios ·
-
Support for tail based sampling? Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
microsoft/ApplicationInsights-Java#4769 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
microsoft/ApplicationInsights-Java#4729 · 121 comentarios ·
Todos los issues de microsoft/ApplicationInsights-Java
Issues similares
-
certification
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Abiertobug ecr
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Needs: Triage Type: Feature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
github/copilot-sdk#2760 ·