Skip to content

[APM] Track usage of Gold+ features #72054

@sorenlouv

Description

@sorenlouv

On Cloud we want to register which Gold+ features are being used. We already do this for the Service Map:

Register:

plugins.licensing.featureUsage.register(
APM_SERVICE_MAPS_FEATURE_NAME,
APM_SERVICE_MAPS_LICENSE_TYPE
);

Notify:

context.licensing.featureUsage.notifyUsage(APM_SERVICE_MAPS_FEATURE_NAME);

There are two steps required: featureUsage.register to register the feature (happens during setup lifecycle), and featureUsage.notifyUsage which should be called whenever the feature is actively used.

public async setup(core: CoreSetup, { licensing }: PluginSetupDependencies) {
    licensing.featureUsage.register('Foo feature', 'gold');
  }

  public async start(core: CoreSetup, { licensing }: PluginStartDependencies) {
    // elsewhere where license checking is done prior to a feature being consumed
      if (check.isValid) {
        licensing.featureUsage.notifyUsage('Foo feature');
      }    
    }
  }

Gold+ features in APM which are tracked:

  • Service Maps
  • Machine learning (notify when a new job is added)
  • Custom Links (notify when a new link is added)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions