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

Issue when Connection string configured at runtime

Abierto
#2,952 7 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 2 días

@heyams ya está trabajando en esto.

Desde el 9/3/2023.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Needs: Attention :wave:

Hey guys, i have an application in java 11, application insights jar 3.4.8 and pom core-version 3.4.10 and trying this configuration:

image

The idea is to turn on/off the application insights logging in runtime.
When i tested it and set the key false means that i will set an empty key ConnectionString.configure("");
and logs will not sent to application insights. That worked fine.
When i change de key set to true with my real connection string, now my requests will send to application insights. That worked aswell.

image

Ok. But now when i back the configuration false and reconfigure de connection String to an empty string, the logs keep sending to application insights and i get the warning that connection is already set:

image

Everytime i do a request i create a new telemetry client like this and tried to flush but still cant override the previous connection string configuration:

image

Looks like i can only change de connection if i rebuild the application every request to changes take effect.
Is there another way to implement this idea? Turn on/off the aplication insights injestion while in runtime application?

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

Preparar el entorno

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.