New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initializing two Application Insights Clients #1166
Comments
Hi Team, any insight here would be much appreciated. |
Hi @hectorhdzg, any advice here? |
@eric-gonzalez-tfs sorry for the delay, yes this a topic we had been discussing last few weeks, because of OpenTelemetry architecture having multiple clients independent on each other is not achievable anymore, this can be done in a different way depending on your scenario, you basically call useAzureMonitor method to initialize all OpenTelemetry components, then you can create a custom Span Processor sending to Azure Monitor as well using different sampling ratio, I can provide some code sample if it works. |
@hectorhdzg Thank you for the response - that would be great. |
You can do something like this
|
I am using
applicationinsights@3.0.0-beta.6
.The project I'm working on requires certain data to ALWAYS be sent, and others to be sent on a sampling ratio.
When I try to initialize a second client with a 100% sampling ratio and most autocollection config off, I get a duplicate registration error.
What is the best way to create a second client that sends 100% of the data without initializing anything else under the hood?
The text was updated successfully, but these errors were encountered: