Issue when Connection string configured at runtime
@heyams đang làm issue này rồi.
Từ ngày 9/3/2023.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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:

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.

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:

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:

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?
- Ngôn ngữ chính
- Java
- Star
- 327
- Fork
- 222
- Merge trung bình
- 22 giờ 34 phút
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/ApplicationInsights-Java
-
microsoft/ApplicationInsights-Java#4851 · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/ApplicationInsights-Java#4817 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoft/ApplicationInsights-Java#4770 · 2 bình luận ·
-
Support for tail based sampling? Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
microsoft/ApplicationInsights-Java#4769 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/ApplicationInsights-Java#4729 · 123 bình luận ·
Tất cả issue của microsoft/ApplicationInsights-Java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
HL7/fhir-ig-publisher#1375 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Flaky: a relaunched catch-up replay can still report catching up right after its marker is written Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
johanhaleby/occurrent#1134 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
objectionary/jeo-maven-plugin#1811 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100