Skip to content

Commit

Permalink
Rename log threshold function for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort committed Jul 9, 2021
1 parent c19939b commit d53e701
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { formatReason } from './rule_data_formatters';
import { validateExpression } from './validation';

export function getLogThresholdAlertType(): ObservabilityRuleTypeModel<PartialAlertParams> {
export function createLogThresholdAlertType(): ObservabilityRuleTypeModel<PartialAlertParams> {
return {
id: LOG_DOCUMENT_COUNT_ALERT_TYPE_ID,
description: i18n.translate('xpack.infra.logs.alertFlyout.alertDescription', {
Expand Down
6 changes: 4 additions & 2 deletions x-pack/plugins/infra/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { from } from 'rxjs';
import { map } from 'rxjs/operators';
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public';
import { createInventoryMetricAlertType } from './alerting/inventory';
import { getLogThresholdAlertType } from './alerting/log_threshold';
import { createLogThresholdAlertType } from './alerting/log_threshold';
import { createMetricThresholdAlertType } from './alerting/metric_threshold';
import { LOG_STREAM_EMBEDDABLE } from './components/log_stream/log_stream_embeddable';
import { LogStreamEmbeddableFactoryDefinition } from './components/log_stream/log_stream_embeddable_factory';
Expand All @@ -35,7 +35,9 @@ export class Plugin implements InfraClientPluginClass {
}

pluginsSetup.triggersActionsUi.alertTypeRegistry.register(createInventoryMetricAlertType());
pluginsSetup.observability.observabilityRuleTypeRegistry.register(getLogThresholdAlertType());
pluginsSetup.observability.observabilityRuleTypeRegistry.register(
createLogThresholdAlertType()
);
pluginsSetup.triggersActionsUi.alertTypeRegistry.register(createMetricThresholdAlertType());

pluginsSetup.observability.dashboard.register({
Expand Down

0 comments on commit d53e701

Please sign in to comment.