Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[uiActions] notify feature usage #72019

Closed
Tracked by #71854
Dosant opened this issue Jul 16, 2020 · 6 comments · Fixed by #76294
Closed
Tracked by #71854

[uiActions] notify feature usage #72019

Dosant opened this issue Jul 16, 2020 · 6 comments · Fixed by #76294
Labels
enhancement New value added to drive a business result Feature:UIActions UI actions. These are client side only, not related to the server side actions..

Comments

@Dosant
Copy link
Contributor

Dosant commented Jul 16, 2020

In #68507 we added basic licensing support for dynamic ui actions and drilldowns.
This isn't actually used yet, but will be used for Url drilldown.

We should extend current licensing support in ui actions to notify about feature usage:

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

It should be noted that we're only concerned with when a feature is actually used, not when we perform a licensing check to determine whether or not to show or hide a specific feature.

Part of #71854

@Dosant Dosant added enhancement New value added to drive a business result Feature:UIActions UI actions. These are client side only, not related to the server side actions.. labels Jul 16, 2020
@streamich streamich mentioned this issue Jul 16, 2020
26 tasks
@Dosant Dosant changed the title [uiActions] notify feature usage for gold+ actions [uiActions] notify feature usage Jul 20, 2020
@Dosant
Copy link
Contributor Author

Dosant commented Jul 20, 2020

@elastic/kibana-platform, @kobelb, When creating this issue I didn't realise this is a server side only api.

URL Drilldown will be based on uiActions and is purely client side. We are working on it in current release.

Please advice if we should we skip this notifyUsage until api improvements? Or what other options do we have?

@pgayvallet
Copy link
Contributor

When implementing the feature usage API, the only consumers we had at this point were supposed to be server-side, which is why we did not add a similar API on the client.

@kobelb what should we do here?

@kobelb
Copy link
Contributor

kobelb commented Jul 20, 2020

Unfortunately, I think we'll have to add a client-side API to enable situations like these... @pgayvallet do you mind creating an issue to do so?

When we first implemented these APIs, I was expecting us to have server-side enforcement of all licensed features because relying solely on the client-side enforcement seemed easy to evade by directly hitting Kibana APIs. However, for situations like URL Drilldowns, I can envision an architecture where there isn't the case and it'd be convoluted to try and force this constraint.

@pgayvallet
Copy link
Contributor

Created #72572. I guess we ideally want this to be done during 7.10?

@Dosant
Copy link
Contributor Author

Dosant commented Jul 21, 2020

We will work on URL drilldown during 7.10 and plan it gets into that train

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:UIActions UI actions. These are client side only, not related to the server side actions..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants