Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

albert-heijn-technology/backstage-plugin-analytics-module-azure-insights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This project is no longer maintained, feel free to fork the project.

Analytics Module: Azure Application Insights

This plugin provides an opinionated implementation of the Backstage Analytics API for Azure Application Insights. Once installed and configured, analytics events will be sent to Azure as your users navigate and use your Backstage instance.

This plugin contains no other functionality.

Installation

  1. Install the plugin package in your Backstage app:

    # From your Backstage root directory
    yarn add --cwd packages/app @albert-heijn-technology/backstage-plugin-analytics-module-azure-insights
  2. Wire up the API implementation to your App:

    // packages/app/src/apis.ts
    import {
      analyticsApiRef,
      configApiRef,
      identityApiRef,
    } from '@backstage/core-plugin-api';
    import { AzureInsights } from '@albert-heijn-technology/backstage-plugin-analytics-module-azure-insights';
    
    export const apis: AnyApiFactory[] = [
      // Instantiate and register the Azure Insights API Implementation.
      createApiFactory({
        api: analyticsApiRef,
        deps: { configApi: configApiRef, identityApi: identityApiRef },
        factory: ({ configApi, identityApi }) =>
          AzureInsights.fromConfig(configApi, identityApi),
      }),
    ];
  3. Configure the plugin in your app-config.yaml:

    The following is the minimum configuration required to start sending analytics events to Azure. All that's needed is your connectionString

    # app-config.yaml
    app:
      analytics:
        azure:
          connectionString: 'InstrumentationKey=abc123'

Azure config

In order to configure azure, you can add the following azureSnippet to the apiFactory. For all supported configuration see the SDK docs.

  const azureSnippet = {
    config: {
      disableFetchTracking: true,
      disableAjaxTracking: true,
      disableExceptionTracking: true,
    }
  }

  createApiFactory({
    api: analyticsApiRef,
    deps: { configApi: configApiRef, identityApi: identityApiRef },
    factory: ({ configApi, identityApi }) =>
      AzureInsights.fromConfig(configApi, identityApi, azureSnippet),
  }),

About

Backstage Analytics API for Azure Application Insights

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •