Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#4,698 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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.

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.

Lenguaje dominante
Java
Estrellas
327
Forks
222
Merge medio
22 h 34 min
PR fusionados (30 d)
14

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/ApplicationInsights-Java

Todos los issues de microsoft/ApplicationInsights-Java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.