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

    0.2.0 • Public • Published

    Azure AppInsights for Apollo Server Logging

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

    Usage

    Install the package to your project

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

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

    Configure the logger on your Apollo instance:

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

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

    Install

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

    DownloadsWeekly Downloads

    15

    Version

    0.2.0

    License

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

    Unpacked Size

    18.5 kB

    Total Files

    11

    Last publish

    Collaborators

    • aaronpowell