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

404 not found for JavaScript SDK API reference. link #39011

Closed
maple10001 opened this issue Sep 17, 2019 — with docs.microsoft.com · 6 comments
Closed

404 not found for JavaScript SDK API reference. link #39011

maple10001 opened this issue Sep 17, 2019 — with docs.microsoft.com · 6 comments

Comments

Copy link

404 not found for JavaScript SDK API reference. link: [https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@kobulloc-MSFT
Copy link
Contributor

@maple10001 Thank you for the feedback! We are investigating this and will get back to you shortly.

@kobulloc-MSFT
Copy link
Contributor

@NumberByColors This doesn't appear to exist anymore (I can get as far as https://github.com/Microsoft/ApplicationInsights-JS). Can you confirm if we have a replacement?

@mrbullwinkle
Copy link
Contributor

You can refer to either this page within the docs: https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript or this page on the JS repo https://github.com/microsoft/ApplicationInsights-JS/blob/master/README.md for the same info that link used to contain. I am updating the docs now.

@mrbullwinkle
Copy link
Contributor

The link is now fixed internally. The change will go-live in the public docs between 10-11 AM (UTC-7) later today. I also noticed the JavaScript snippet in the article was slightly out-of-date and that it was using an older version of the snippet that is no longer recommended due to updates that have been made to the SDK. The new version of the snippet is:

   <script type="text/javascript">
   var sdkInstance="appInsightsSDK";window[sdkInstance]="appInsights";var aiName=window[sdkInstance],aisdk=window[aiName]||function(e){function n(e){t[e]=function(){var n=arguments;t.queue.push(function(){t[e].apply(t,n)})}}var t={config:e};t.initialize=!0;var i=document,a=window;setTimeout(function(){var n=i.createElement("script");n.src=e.url||"https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js",i.getElementsByTagName("script")[0].parentNode.appendChild(n)});try{t.cookie=i.cookie}catch(e){}t.queue=[],t.version=2;for(var r=["Event","PageView","Exception","Trace","DependencyData","Metric","PageViewPerformance"];r.length;)n("track"+r.pop());n("startTrackPage"),n("stopTrackPage");var s="Track"+r[0];if(n("start"+s),n("stop"+s),n("setAuthenticatedUserContext"),n("clearAuthenticatedUserContext"),n("flush"),!(!0===e.disableExceptionTracking||e.extensionConfig&&e.extensionConfig.ApplicationInsightsAnalytics&&!0===e.extensionConfig.ApplicationInsightsAnalytics.disableExceptionTracking)){n("_"+(r="onerror"));var o=a[r];a[r]=function(e,n,i,a,s){var c=o&&o(e,n,i,a,s);return!0!==c&&t["_"+r]({message:e,url:n,lineNumber:i,columnNumber:a,error:s}),c},e.autoExceptionInstrumented=!0}return t}(
   {
     instrumentationKey:"INSTRUMENTATION_KEY"
   }
   );window[aiName]=aisdk,aisdk.queue&&0===aisdk.queue.length&&aisdk.trackPageView({});
   </script>
   ```

@mrbullwinkle
Copy link
Contributor

Thanks again for bringing this to our attention and helping to improve the docs!

@mrbullwinkle
Copy link
Contributor

#please-close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants