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

[APM] Track usage of Gold+ features #77630

Merged
merged 3 commits into from
Sep 18, 2020

Conversation

cauemarcondes
Copy link
Contributor

closes #72054

@cauemarcondes cauemarcondes added release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Sep 16, 2020
@cauemarcondes cauemarcondes marked this pull request as ready for review September 17, 2020 11:57
@cauemarcondes cauemarcondes requested a review from a team as a code owner September 17, 2020 11:57
Comment on lines 61 to 62
export const APM_SERVICE_MAPS_FEATURE_NAME = 'APM service maps';
export const APM_SERVICE_MAPS_LICENSE_TYPE = 'platinum';
Copy link
Member

@sorenlouv sorenlouv Sep 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Since a feature name and a feature license belongs together I think we should group them like:

Suggested change
export const APM_SERVICE_MAPS_FEATURE_NAME = 'APM service maps';
export const APM_SERVICE_MAPS_LICENSE_TYPE = 'platinum';
export const APM_SERVICE_MAPS_FEATURE = {
name: 'APM service maps',
license: 'platinum'
}

@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Sep 17, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

Comment on lines +66 to +105
interface Feature {
name: string;
license: LicenseType;
}
type FeatureName = 'serviceMaps' | 'ml' | 'customLinks';
export const features: Record<FeatureName, Feature> = {
serviceMaps: {
name: 'APM service maps',
license: 'platinum',
},
ml: {
name: 'APM machine learning',
license: 'platinum',
},
customLinks: {
name: 'APM custom links',
license: 'gold',
},
};

export function registerFeaturesUsage({
licensingPlugin,
}: {
licensingPlugin: LicensingPluginSetup;
}) {
Object.values(features).forEach(({ name, license }) => {
licensingPlugin.featureUsage.register(name, license);
});
}

export function notifyFeatureUsage({
licensingPlugin,
featureName,
}: {
licensingPlugin: LicensingRequestHandlerContext;
featureName: FeatureName;
}) {
const feature = features[featureName];
licensingPlugin.featureUsage.notifyUsage(feature.name);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sqren what do you think of this? too much?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
apm 1262 +1 1261

async chunks size

id value diff baseline
apm 5.0MB +72.0B 5.0MB

distributable file count

id value diff baseline
default 45910 +1 45909

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sorenlouv
Copy link
Member

Feel free to merge 👍

@cauemarcondes cauemarcondes merged commit e7b0e28 into elastic:master Sep 18, 2020
@cauemarcondes cauemarcondes deleted the apm-gold-features branch September 18, 2020 08:14
cauemarcondes added a commit to cauemarcondes/kibana that referenced this pull request Sep 18, 2020
* adding license check

* fixing api test

* refactoring
cauemarcondes added a commit that referenced this pull request Sep 18, 2020
* adding license check

* fixing api test

* refactoring
gmmorris added a commit to gmmorris/kibana that referenced this pull request Sep 22, 2020
* master: (92 commits)
  [ILM] Data tiers for 7.10 (elastic#76126)
  [ML] Transforms: Fixes styling of preview grid pagination in summary step (elastic#77789)
  [Drilldowns] Beta badge support. Mark URL Drilldown as Beta (elastic#75654)
  Re-enable session lifespan, idle timeout api integration tests and use unique names for the security test reports. (elastic#77746)
  [Alerting] renames code in alerting RBAC exemption to make it easier to maintain (elastic#77598)
  [Alerting & Actions] Overwrite SOs when updating instead of partially updating (elastic#73688)
  fixed react warning in Suspense in alert flyout (elastic#77777)
  [APM] Track usage of Gold+ features (elastic#77630)
  Visualize: Bad request when working with histogram aggregation (elastic#77684)
  remove legacy ES plugin (elastic#77703)
  [Lens] change name of custom query to filters (elastic#77725)
  skip flaky suite (elastic#76239)
  remove visual aspects of baseline job (elastic#77815)
  skip flaky suite (elastic#77835)
  Fixes typo in data recognizer text (elastic#77691)
  management/update trusted_apps jest snapshot
  [build] Use Elastic hosted UBI minimal base image (elastic#77776)
  [APM] Add transaction error rate alert (elastic#76933)
  [Security Solution] [Detections] Remove file validation on import route (elastic#77770)
  [Enterprise Search][tech debt] Add Kea logic paths for easier debugging/defaults (elastic#77698)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Track usage of Gold+ features
4 participants