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

[BUG] IAppInsights is incomplete #19

Open
chriskuech opened this issue Aug 20, 2022 · 2 comments
Open

[BUG] IAppInsights is incomplete #19

chriskuech opened this issue Aug 20, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@chriskuech
Copy link

Description/Screenshot

App Insights does not expose the full interface--

image

Steps to Reproduce

  • OS/Browser: N/A
  • React Version: N/A
  • SDK Version [e.g. 22]: 2.8.6
  • How you initialized the SDK: N/A

Expected behavior
IAppInsights has parity with the core module's interface, or (preferably) reexports the core type directly.

Additional context
I probably wont be able to leverage this library subsequently.

@chriskuech chriskuech changed the title [BUG] IAppInsights [BUG] IAppInsights is incomplete Aug 20, 2022
@Karlie-777
Copy link
Contributor

Karlie-777 commented Aug 23, 2022

Hi @chriskuech,
So setAuthenticatedUserContext only exists in IApplicationInsights which is not currently directly accessible from plugin instance. So is it possible that from your telemetry service,

const reactPlugin = new ReactPlugin();
const appInsights = new ApplicationInsights({
  config: {
    instrumentationKey: "",
    extensions: [reactPlugin],
.....
  }
});
appInsights.loadAppInsights();

let user = appInsights.context.user;

and then export / create context around user and then setAuthenticatedUserContext can be used?

@chriskuech
Copy link
Author

@Karlie-777 , I ended up doing this but it circumvents the need for applicationinsights-react-js entirely for us, so now we only reference appInsights directly or through our custom context.

@Karlie-777 Karlie-777 added enhancement New feature or request and removed investigation required labels Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants