Comments (5)
I would recommend to go with fewer TelemetryClient
instances to limit the impact. I cannot talk about why it was implemented in this particular way, we may need to involve the original code owners here.
.NET SDK usage typically involves a limited set of Telemetry Client instances, but it does not save user context in there, thus no appeal for "new"-ing up new instance every time. I would expect that Java SDK also should not save such a context per client instance.
BTW, .NET used to have a leak in Telemetry Clients and Channels as well.
from applicationinsights-java.
I don't see anything like this in .Net client:
/// <summary>
/// Initializes a new instance of the <see cref="TelemetryClient" /> class. Send telemetry with the specified <paramref name="configuration"/>.
/// </summary>
/// <exception cref="ArgumentNullException">The <paramref name="configuration"/> is null.</exception>
/// <exception cref="ArgumentException">The <paramref name="configuration"/> does not contain a telemetry channel.</exception>
public TelemetryClient(TelemetryConfiguration configuration)
{
if (configuration == null)
{
CoreEventSource.Log.TelemetryClientConstructorWithNoTelemetryConfiguration();
configuration = TelemetryConfiguration.Active;
}
this.configuration = configuration;
if (this.configuration.TelemetryChannel == null)
{
throw new ArgumentException("The specified configuration does not have a telemetry channel.", "configuration");
}
}
from applicationinsights-java.
@Mart-Bogdan were you able to diminish the number of TelemetryClient instances as recommended by @Dmitry-Matveev? Did this help?
from applicationinsights-java.
@beckylino hellom thanks, yes we've managed this workaround.
from applicationinsights-java.
@Mart-Bogdan closing this issue as you had got a working workaround.
from applicationinsights-java.
Related Issues (20)
- Workflow failed: OWASP dependency check (daily) (#542)
- Workflow failed: OWASP dependency check (daily) (#547)
- Sampling based on dependency result HOT 2
- OpenTelemetry support for MQTT pub/sub with Application Insights Java agent HOT 1
- Ignore newline and carriage return in the connection string file
- Sampling override based on request processing time? HOT 7
- Support for OTEL Synchronous Gauge HOT 3
- ignore InProc sampling dependencies
- Sampling override with http.response.status_code doesn't work HOT 6
- MySql dependency tree not available with applicationinsights-agent-3.5.1 HOT 5
- Question: How to turn off instrumentation of just Azure Service Bus
- Workflow failed: OWASP dependency check (daily) (#585)
- Custom Availability telemetry not working HOT 2
- Azure ServiceBus dependency tree not available with applicationinsights-agent-3.5.2 HOT 2
- Can't load log handler "com.microsoft.applicationinsights.TelemetryClient" - AI 3.5.2 in Java HOT 2
- SFTP dependency tree not available with applicationinsights-agent-3.5.2 HOT 5
- APPLICATIONINSIGHTS_CONNECTION_STRING does not work in 3.5.x, works in 3.4.x HOT 14
- Connection String with `ApplicationId` crashes SDK 3.4.19 HOT 1
- MsSql dependency tree not available with applicationinsights-agent-3.5.2 HOT 3
- Not all exceptions are populated with exception type and message HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-java.