Skip to content
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

Enable support for reusing plugins in multiple instances of AppInsights #1132

Closed
MSNev opened this issue Dec 6, 2019 · 3 comments
Closed
Assignees

Comments

@MSNev
Copy link
Collaborator

MSNev commented Dec 6, 2019

Support to enable reusing the same plugin in different instances of AppInsights, owned by the same application (but using different Instrumentation keys) is required so that they can reuse a single Plugin instance for all instances.

Currently, while each AppInsights instance allows passing in extension plugins, internally this actually calls "initialize()" on each plugin for every instance, even if it's already been initialized.

Support for this requires 2 changes

  • Add an optional isInitialized() method on the plugin interface so that a plugin is only initialized once
  • Add an extra parameter to the processTelemetry() method so that singleton (shared) style plugins can access the current AppInsights instance/config without the need to save this during the initialize() call.
@MSNev MSNev self-assigned this Dec 6, 2019
@MSNev
Copy link
Collaborator Author

MSNev commented Jan 13, 2020

Code is committed, will close the issue after we publish and official build (non-beta) with this change

@MSNev
Copy link
Collaborator Author

MSNev commented Feb 4, 2020

Version 2.4.3 is now published to CDN and NPM and addresses this enhancement

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant