Skip to content

Licensed feature usage - alerts and actions #64849

@kobelb

Description

@kobelb

In an effort to track the usage of of licensed features, a licensed feature usage API has been added to the licensing plugin. The immediate concern is integrating the Kibana specific features, which don't have an Elasticsearch counterpart, with the new licensed feature usage API. The current implementation of the licensed feature usage API requires that a separate method call is made from the server whenever a licensed feature is used. While we intend to improve this experience long-term, it's what we have for the immediate future.

The licensed feature usage API requires that features and their corresponding license level are registered during the setup lifecycle event, prior to the method invocation denoting their usage in the start lifecycle:

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');
      return;
    }    
  }
}

It's my understanding that actions are the only part of Alerting that enforce a minimum required license, and the alert types are extensible in nature. If that is correct, we should call FeatureUsageServiceSetup::register whenever an action type is registered, and then call FeatureUsageServiceSetup::notifyUsage whenever the license checking is performed prior to the action executing.

Metadata

Metadata

Assignees

Labels

Team:ResponseOpsPlatform ResponseOps team (formerly the Cases and Alerting teams) t//

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions