Code Monkey home page Code Monkey logo

Comments (3)

markwolff avatar markwolff commented on May 18, 2024

Hey @shortstevenn this is probably a fault of the README. This repo is meant to be only a dependency of the main repo (https://github.com/Microsoft/ApplicationInsights-JS/tree/master/AISKU#getting-started), and not directly used by itself. Perhaps it should just link there or copy the other readme altogether. Please try the Getting Started guide and open an issue in the main repo if you face the same problems!

npm i --save @microsoft/applicationinsights-web

import { ApplicationInsights } from '@microsoft/applicationinsights-web'
const appInsights = new ApplicationInsights({ config: {
  instrumentationKey: 'YOUR_INSTRUMENTATION_KEY_GOES_HERE',
  /* ...Other Configuration Options... */
}});
appInsights.loadAppInsights();

from applicationinsights-core-js.

somanysteves avatar somanysteves commented on May 18, 2024

@markwolff thanks. I saw that one (and the nodejs one too lol) but it's web specific so react-native gives all that "document is not defined" fun. Your library was core js so I was hopeful I could shim it in without the web dependencies. It seems like I'm close - I think I just need to write my own channel to the ai http posting api.

from applicationinsights-core-js.

markwolff avatar markwolff commented on May 18, 2024

@shortstevenn Actually we have something exactly for this scenario (specifically webworkers). You can use our "basic sku" which does not have any dependencies on the DOM. It comes with a channel builtin & ready to go. You will need to write a shim for all of the "tracks" you want to do, which it seems like you've already done. You just call track with your telemetry items and it sends it through the channel for you. Let me know how it works out for you.

https://github.com/Microsoft/ApplicationInsights-JS/tree/master/AISKU#application-insights-web-basic

from applicationinsights-core-js.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.