Application Insights Java Agent: ConnectionStringOverrides Feature Fails to Route Telemetry as Expected
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- azure, java
- Área
- observability
Línea de trabajo
Comienza reproduciendo las cinco configuraciones con el Java agent en Tomcat 10.1.33, utilizando las dos rutas de contexto /OsaEcommerceServerBE y /OsaEcommerceServerNL. Traza cómo se interpretan preview.connectionStringOverrides y connectionString de nivel superior. Se considera terminado cuando cada ruta dirige la telemetría a su recurso configurado y el agente se comporta según la documentación cuando falta la connection string de nivel superior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected behavior
I expected requests to be tracked in the respective Application Insights resources based on the httpPathPrefix defined in the configuration. Specifically:
- Requests to
/OsaEcommerceServerBE/should be tracked inTHE_ONE_BE. - Requests to
/OsaEcommerceServerNL/should be tracked inTHE_ONE_NL.
Actual behavior
The behavior observed differs depending on the configuration JSON:
Case 1
Configuration:
{
"role": {
"name": "testrolename",
"instance": "testroleinstance"
},
"sampling": {
"percentage": 100
},
"preview": {
"connectionStringOverrides": [
{
"httpPathPrefix": "/OsaEcommerceServerBE",
"connectionString": "THE_ONE_BE"
},
{
"httpPathPrefix": "/OsaEcommerceServerNL",
"connectionString": "THE_ONE_NL"
}
]
},
"connectionString": "THE_ONE_BE"
}
Observed Behavior:
/OsaEcommerceServerBE/is tracked inTHE_ONE_BE./OsaEcommerceServerNL/is not tracked anywhere.
Case 2
Configuration:
{
"role": {
"name": "testrolename",
"instance": "testroleinstance"
},
"sampling": {
"percentage": 100
},
"preview": {
"connectionStringOverrides": [
{
"httpPathPrefix": "/OsaEcommerceServerNL",
"connectionString": "THE_ONE_BE"
},
{
"httpPathPrefix": "/OsaEcommerceServerNL",
"connectionString": "THE_ONE_NL"
}
]
},
"connectionString": "THE_ONE_BE"
}
Observed Behavior:
- Both
/OsaEcommerceServerBE/and/OsaEcommerceServerNL/are tracked inTHE_ONE_BE.
Case 3
Configuration:
{
"role": {
"name": "testrolename",
"instance": "testroleinstance"
},
"sampling": {
"percentage": 100
},
"preview": {
"connectionStringOverrides": [
{
"httpPathPrefix": "/OsaEcommerceServerBE",
"connectionString": "THE_ONE_BE"
},
{
"httpPathPrefix": "/OsaEcommerceServerBE",
"connectionString": "THE_ONE_NL"
}
]
},
"connectionString": "THE_ONE_BE"
}
Observed Behavior:
/OsaEcommerceServerBE/is tracked inTHE_ONE_BE./OsaEcommerceServerNL/is also tracked inTHE_ONE_BE.
Case 4
Configuration:
{
"role": {
"name": "testrolename",
"instance": "testroleinstance"
},
"sampling": {
"percentage": 100
},
"preview": {
"connectionStringOverrides": [
{
"httpPathPrefix": "/OsaEcommerceServerNL",
"connectionString": "THE_ONE_BE"
},
{
"httpPathPrefix": "/OsaEcommerceServerBE",
"connectionString": "THE_ONE_NL"
}
]
},
"connectionString": "THE_ONE_BE"
}
Observed Behavior:
/OsaEcommerceServerBE/is not tracked anywhere./OsaEcommerceServerNL/is tracked inTHE_ONE_BE.
Case 5
Configuration:
{
"role": {
"name": "testrolename",
"instance": "testroleinstance"
},
"sampling": {
"percentage": 100
},
"preview": {
"connectionStringOverrides": [
{
"httpPathPrefix": "/OsaEcommerceServerNL",
"connectionString": "THE_ONE_BE"
},
{
"httpPathPrefix": "/OsaEcommerceServerBE",
"connectionString": "THE_ONE_NL"
}
]
}
}
Observed Behavior:
- No requests are tracked at all.
Logs
When the connectionString field is not specified in the configuration, the Application Insights Java agent failed to start, citing that no connection string was provided. This indicates that the connectionStringOverrides feature does not work as expected without a main connectionString specified.
To Reproduce
- Set up a Tomcat server with two applications running on distinct context paths (
/OsaEcommerceServerBEand/OsaEcommerceServerNL). - Configure the Application Insights agent using the provided JSON configurations for each case.
- Make requests to
http://localhost:8081/OsaEcommerceServerBE/andhttp://localhost:8081/OsaEcommerceServerNL/. - Observe the Application Insights telemetry data.
System information
- SDK Version: 21
- OS type and version: Windows 10
- Application Server type and version: Apache Tomcat 10.1.33
- Using spring-boot? Yes, version 3.1.5
- Additional relevant libraries: None applicable
- Lenguaje dominante
- Java
- Estrellas
- 327
- Forks
- 222
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 12
Preparar el entorno
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
-
Java 25 native-access warning from bundled Netty requires broad ALL-UNNAMED permissionPosiblemente ocupada @rajkumar-rangaraj la tomó hace 15 días. Abierto
microsoft/ApplicationInsights-Java#4851 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
microsoft/ApplicationInsights-Java#4817 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
microsoft/ApplicationInsights-Java#4770 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
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 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
microsoft/ApplicationInsights-Java#4729 · 129 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/ApplicationInsights-Java
Issues similares
-
type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
objectionary/lints#1520 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
SchweizerischeBundesbahnen/ch.sbb.polarion.extension.pdf-exporter#1109 ·
Los mantenedores suelen responder en 1 día