-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[exporter/azuremonitor] support sending to multiple azuremonitor exporter #36700
base: main
Are you sure you want to change the base?
Conversation
++ @pcwiese to help to review, thx! |
@@ -63,7 +70,8 @@ func (f *factory) createTracesExporter( | |||
return nil, errUnexpectedConfigurationType | |||
} | |||
|
|||
tc, errInstrumentationKeyOrConnectionString := f.getTransportChannel(exporterConfig, set.Logger) | |||
f.initLogger(set.Logger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you cannot assume the same Logger is passed in for all. You might need to change this logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the careful review! Yes, it's better to use different logger, but the appinsights
SDK only has one global diagnostics writer. If adding each logger to listener, there'll be dup messages. I don't know any elegant way to solve this issue at this point. any suggestion?
// The one and only diagnostics writer.
var diagnosticsWriter = &diagnosticsMessageWriter{}
It feels like the factory should not handle any of the channel business. The component can be reused with the sharedcomponent lib, which feels more adequate. |
Currently in |
Hi @atoulme , I've done below changes and validated locally and it can ingest into multiple appinsights successfully. pls let me know if any comments, thanks for your careful review!
|
Looks the failed checks are not caused by my change? |
36276b6
to
5ce5ef0
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
gently ping, anyone can help reviewing this PR? thanks! |
…redcomponent to cache exporter by component id
++ @pcwiese , could you help to review this enhancement PR? thanks! |
I've validated using 2 Azure appinsights, and the new change is compatible with old ones. |
Description
currently, azuremonitor exporter doesn't support sending to multiple application insights. This PR will add this feature.
Link to tracking issue
Fixes #34188
Testing
Documentation
No additional configs.