@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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    117
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    117
  • 0.1.1
    1
  • 0.1.0
    2

Package Sidebar

Install

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

Weekly Downloads

83

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