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

How to use this library with sveltekit? #788

Open
jonathanblancor opened this issue Jun 30, 2021 · 1 comment
Open

How to use this library with sveltekit? #788

jonathanblancor opened this issue Jun 30, 2021 · 1 comment

Comments

@jonathanblancor
Copy link

I used to have the following setup in a rollup.config.js file inside a polka().use() method. I am migrating from that project to a Sveltekit project. I would like to know if there's any idea of where I would place this code in a Sveltekit project:

// rollup.config.js
import polka from 'polka';
import * as appInsights from 'applicationinsights';

appInsights.setup("MY-KEY") 
    .setAutoDependencyCorrelation(true)
    .setAutoCollectRequests(true)
    .setAutoCollectExceptions(true)
    .setAutoCollectConsole(true)
    .setDistributedTracingMode(appInsights.DistributedTracingModes.AI)
    .setSendLiveMetrics(true)

appInsights.defaultClient.context.tags[appInsights.defaultClient.context.keys.cloudRole] = "MY-TAG";

polka().use(
    //Initiate AppInsights to start gathering and sending requests log to AppInsights portal
    appInsights.start()
);
@hectorhdzg
Copy link
Member

@jonathanblancor I'm not familiar with sveltekit framework, did you got this working?, is there a specific issue with our SDK you are having?

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

2 participants