Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Issue when Connection string configured at runtime

Aperta
#2,952 7 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@heyams ci sta già lavorando.

Dal 9/3/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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?

Lingua principale
Java
Stelle
327
Fork
222
Merge medio
22h 34m
PR unite (30g)
14

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/ApplicationInsights-Java

Tutte le issue di microsoft/ApplicationInsights-Java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.