Neolithic Programming Machine

    @aaronpowell/apollo-server-plugin-appinsights
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    Azure AppInsights plugin for Apollo Server

    This package provides integration with Application Insights (part of Azure Monitor) for metrics gathering within Apollo Server.

    Usage

    Install the package to your project

    npm install -d @aaronpowell/apollo-server-plugin-appinsights

    Create a resource in Azure, if required, and copy the Instrumentation Key.

    Configure the plugin on your Apollo instance:

    import appInsightsPlugin from "@aaronpowell/apollo-server-plugin-appinsights";
    const server = new ApolloServer({
      typeDefs,
      resolvers,
      plugins: [appInsightsPlugin(process.env.APP_INSIGHTS || "")],
    });

    Note: if you want to use your own TelemetryClient for AppInsights, you can pass that into the appInsightsPlugin, rather than the instrumentation key.

    Install

    npm i @aaronpowell/apollo-server-plugin-appinsights

    DownloadsWeekly Downloads

    16

    Version

    0.2.0

    License

    https://github.com/aaronpowell/apollo-graphql-appinsights/blob/main/LICENSE

    Unpacked Size

    35.1 kB

    Total Files

    11

    Last publish

    Collaborators

    • aaronpowell