Azure Functions Java: Duplicate log entries in Portal Log Stream since agent 3.7.0
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- azure, java
- Domaine
- observability
Piste de recherche
Examinez la modification de dépendance de agent 3.7.0 dans la PR #3962 et comparez OpenTelemetry Instrumentation 2.9.0 avec 2.10.0, en vous concentrant sur la gestion de JUL et le chemin de Portal Log Stream. Reproduisez le problème avec APPLICATIONINSIGHTS_ENABLE_AGENT=true et context.getLogger().info(), puis comparez le comportement avec agent 3.6.2. Le travail est considéré comme terminé lorsque le journal apparaît une seule fois dans les traces App Insights, sans doublon [undefined] dans Portal Log Stream.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Java
- Étoiles
- 327
- Forks
- 223
- Merge moyen
- 1 j 1 h
- PR mergées (30 j)
- 15
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/ApplicationInsights-Java
-
Java 25 native-access warning from bundled Netty requires broad ALL-UNNAMED permissionPeut-être pris @rajkumar-rangaraj l’a pris il y a 26 jours. Ouverte
microsoft/ApplicationInsights-Java#4851 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
microsoft/ApplicationInsights-Java#4770 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Support for tail based sampling?Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
microsoft/ApplicationInsights-Java#4769 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
microsoft/ApplicationInsights-Java#4729 · 140 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
microsoft/ApplicationInsights-Java#4712 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de microsoft/ApplicationInsights-Java
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ShaftHQ/SHAFT_ENGINE#6909 ·
Les mainteneurs répondent en général sous 1 jour
-
Mention parakeet-ffm in READMEOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
mudler/parakeet.cpp#99 ·
Les mainteneurs répondent en général sous 1 jour
-
[BUG] Re-subscribing the Mono returned by listTools/listResources/listResourceTemplates/listPrompts/listRoots duplicates the resultsPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
modelcontextprotocol/java-sdk#1174 · 1 réaction ·
Les mainteneurs répondent en général sous 2 jours
-
建议在文档中补充逻辑删除与唯一索引冲突的处理方案Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
baomidou/mybatis-plus#7185 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
refinedmods/refinedstorage2#1419 ·