[Security Solution] move tier into source.metadata (#163670)

This commit is contained in:
Joey F. Poon 2023-08-14 07:34:51 -07:00 committed by GitHub
parent aaefcdf566
commit bc241affd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -113,13 +113,15 @@ export class EndpointMeteringService {
creation_timestamp: timestampStr,
usage: {
type: 'security_solution_endpoint',
sub_type: this.tier,
period_seconds: SAMPLE_PERIOD_SECONDS,
quantity: 1,
},
source: {
id: taskId,
instance_group_id: projectId,
metadata: {
tier: this.tier,
},
},
};
}

View file

@ -19,6 +19,8 @@ import type { CloudSetup } from '@kbn/cloud-plugin/server';
import type { SecuritySolutionEssPluginSetup } from '@kbn/security-solution-ess/server';
import type { MlPluginSetup } from '@kbn/ml-plugin/server';
import type { ProductTier } from '../common/product';
import type { ServerlessSecurityConfig } from './config';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
@ -63,6 +65,11 @@ export interface UsageMetrics {
export interface UsageSource {
id: string;
instance_group_id: string;
metadata?: UsageSourceMetadata;
}
export interface UsageSourceMetadata {
tier?: ProductTier;
}
export interface SecurityUsageReportingTaskSetupContract {