Skip to content

Commit

Permalink
[APM][ECO] Update logs error % to logs error rate in service inventory (
Browse files Browse the repository at this point in the history
elastic#191959)

## Summary

closes elastic#191253

- Update the metrics filter for the log error rate in service builtin
definition
- Update column from Log error rate % to log Error rate
- Update the formula and the tooltip 
### Before



https://github.com/user-attachments/assets/87e22dc8-1a67-49ac-ad21-cecf0a1fbb14

### After 

https://github.com/user-attachments/assets/3d5eafdb-a829-46f0-a5f0-36b62969ceaf
  • Loading branch information
kpatticha authored Sep 4, 2024
1 parent d21d398 commit e9eb03a
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function LogErrorRateChart({ height }: { height: number }) {
formula={getMetricsFormula(ChartMetricType.LOG_ERROR_RATE)}
description={
<FormattedMessage
defaultMessage="% of logs where error detected for given {serviceName}."
defaultMessage="Rate of error logs per minute observed for given {serviceName}."
id="xpack.apm.multiSignal.servicesTable.logErrorRate.tooltip.description"
values={{
serviceName: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ export function getServiceColumns({
name: (
<ColumnHeader
label={i18n.translate('xpack.apm.multiSignal.servicesTable.logErrorRate', {
defaultMessage: 'Log error %',
defaultMessage: 'Log error rate (per min.)',
})}
formula={getMetricsFormula(ChartMetricType.LOG_ERROR_RATE)}
toolTip={
<FormattedMessage
defaultMessage="% of logs where error detected for given {serviceName}."
defaultMessage="Rate of error logs per minute observed for given {serviceName}."
id="xpack.apm.multiSignal.servicesTable.logErrorRate.tooltip.description"
values={{
serviceName: (
Expand Down Expand Up @@ -270,7 +270,7 @@ export function getServiceColumns({
isLoading={timeseriesDataLoading}
color={currentPeriodColor}
series={timeseriesData?.currentPeriod?.[serviceName]?.logErrorRate}
valueLabel={asPercent(metrics.logErrorRate, 1)}
valueLabel={asDecimalOrInteger(metrics.logErrorRate)}
hideSeries={!showWhenSmallOrGreaterThanLarge}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export enum ChartMetricType {

const metricsFormulasMap: Record<ChartMetricType, string> = {
[ChartMetricType.LOG_RATE]: `count(kql='log.level: *') / [PERIOD_IN_MINUTES]`,
[ChartMetricType.LOG_ERROR_RATE]: `count(kql='log.level: "error" OR log.level: "ERROR"') / count(kql='log.level: *')`,
[ChartMetricType.LOG_ERROR_RATE]: `count(kql='log.level: "error" OR log.level: "ERROR" OR error.log.level: "error"') / [PERIOD_IN_MINUTES]`,
};

export function getMetricsFormula(chartMetricType: ChartMetricType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const serviceTransactionFilter = (additionalFilters: string[] = []) => {

export const builtInServicesFromLogsEntityDefinition: EntityDefinition =
entityDefinitionSchema.parse({
version: '1.0.0',
version: '1.0.1',
id: `${BUILT_IN_ID_PREFIX}services_from_ecs_data`,
name: 'Services from ECS data',
description:
Expand Down Expand Up @@ -104,17 +104,12 @@ export const builtInServicesFromLogsEntityDefinition: EntityDefinition =
},
{
name: 'logErrorRate',
equation: 'A / B',
equation: 'A',
metrics: [
{
name: 'A',
aggregation: 'doc_count',
filter: 'log.level: "error" OR error.log.level: "error"',
},
{
name: 'B',
aggregation: 'doc_count',
filter: 'log.level: * OR error.log.level: *',
filter: 'log.level: "error" OR log.level: "ERROR" OR error.log.level: "error"',
},
],
},
Expand Down
28 changes: 14 additions & 14 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -9473,7 +9473,16 @@
"visualizationUiComponents.filterQueryInput.clickToEdit": "Cliquer pour modifier",
"visualizationUiComponents.filterQueryInput.emptyFilterQuery": "(vide)",
"visualizationUiComponents.filterQueryInput.label": "Filtrer par",
"visualizationUiComponents.iconSelect.alertIconLabel": "Alerte",
"visualizationUiComponents.iconSelect.asteriskIconLabel": "Astérisque",
"visualizationUiComponents.iconSelect.bellIconLabel": "Cloche",
"visualizationUiComponents.iconSelect.boltIconLabel": "Éclair",
"visualizationUiComponents.iconSelect.bugIconLabel": "Bug",
"visualizationUiComponents.iconSelect.commentIconLabel": "Commentaire",
"visualizationUiComponents.iconSelect.flagIconLabel": "Drapeau",
"visualizationUiComponents.iconSelect.label": "Décoration de l’icône",
"visualizationUiComponents.iconSelect.noIconLabel": "Aucun",
"visualizationUiComponents.iconSelect.tagIconLabel": "Balise",
"visualizationUiComponents.lineMarker.textVisibility": "Décoration du texte",
"visualizationUiComponents.nameInput.columnLabel": "Nom",
"visualizationUiComponents.queryInput.queryPlaceholderKql": "{example}",
Expand Down Expand Up @@ -11089,8 +11098,8 @@
"xpack.apm.serviceIcons.service": "Service",
"xpack.apm.serviceIcons.serviceDetails.cloud.architecture": "Architecture",
"xpack.apm.serviceIcons.serviceDetails.cloud.availabilityZoneLabel": "{zones, plural, =0 {Zone de disponibilité} one {Zone de disponibilité} other {Zones de disponibilité}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.functionNameLabel": "{functionNames, plural, =0 {Nom de fonction} one {Nom de fonction} other {Noms de fonction}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.faasTriggerTypeLabel": "{triggerTypes, plural, =0 {Type de déclencheur} one {Type de déclencheur} other {Types de déclencheurs}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.functionNameLabel": "{functionNames, plural, =0 {Nom de fonction} one {Nom de fonction} other {Noms de fonction}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.machineTypesLabel": "{machineTypes, plural, =0{Type de machine} one {Type de machine} other {Types de machines}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.projectIdLabel": "ID de projet",
"xpack.apm.serviceIcons.serviceDetails.cloud.providerLabel": "Fournisseur cloud",
Expand Down Expand Up @@ -26028,15 +26037,6 @@
"xpack.lens.xyChart.horizontalAxisLabel": "Axe horizontal",
"xpack.lens.xyChart.horizontalLeftAxisLabel": "Axe supérieur horizontal",
"xpack.lens.xyChart.horizontalRightAxisLabel": "Axe inférieur horizontal",
"visualizationUiComponents.iconSelect.alertIconLabel": "Alerte",
"visualizationUiComponents.iconSelect.asteriskIconLabel": "Astérisque",
"visualizationUiComponents.iconSelect.bellIconLabel": "Cloche",
"visualizationUiComponents.iconSelect.boltIconLabel": "Éclair",
"visualizationUiComponents.iconSelect.bugIconLabel": "Bug",
"visualizationUiComponents.iconSelect.commentIconLabel": "Commentaire",
"visualizationUiComponents.iconSelect.flagIconLabel": "Drapeau",
"visualizationUiComponents.iconSelect.noIconLabel": "Aucun",
"visualizationUiComponents.iconSelect.tagIconLabel": "Balise",
"xpack.lens.xyChart.layerAnnotation": "Annotation",
"xpack.lens.xyChart.layerAnnotationsIgnoreTitle": "Calques ignorant les filtres globaux",
"xpack.lens.xyChart.layerAnnotationsLabel": "Annotations",
Expand Down Expand Up @@ -26951,8 +26951,8 @@
"xpack.maps.source.esSearch.descendingLabel": "décroissant",
"xpack.maps.source.esSearch.extentFilterLabel": "Filtre dynamique pour les données de la zone de carte visible",
"xpack.maps.source.esSearch.fieldNotFoundMsg": "Impossible de trouver \"{fieldName}\" dans le modèle d'indexation \"{indexPatternName}\".",
"xpack.maps.source.esSearch.geoFieldLabel": "Champ géospatial",
"xpack.maps.source.esSearch.geofieldLabel": "Champ géospatial",
"xpack.maps.source.esSearch.geoFieldLabel": "Champ géospatial",
"xpack.maps.source.esSearch.geoFieldTypeLabel": "Type de champ géospatial",
"xpack.maps.source.esSearch.indexOverOneLengthEditError": "Votre vue de données pointe vers plusieurs index. Un seul index est autorisé par vue de données.",
"xpack.maps.source.esSearch.indexZeroLengthEditError": "Votre vue de données ne pointe vers aucun index.",
Expand Down Expand Up @@ -36409,8 +36409,8 @@
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.maxAlertsFieldLessThanWarning": "Kibana ne permet qu'un maximum de {maxNumber} {maxNumber, plural, =1 {alerte} other {alertes}} par exécution de règle.",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError": "Nom obligatoire.",
"xpack.securitySolution.detectionEngine.createRule.stepAboutrule.noteHelpText": "Ajouter un guide d'investigation sur les règles...",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.setupHelpText": "Fournissez des instructions sur les conditions préalables à la règle, telles que les intégrations requises, les étapes de configuration et tout ce qui est nécessaire au bon fonctionnement de la règle.",
"xpack.securitySolution.detectionEngine.createRule.stepAboutrule.setupHelpText": "Ajouter le guide de configuration de règle...",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.setupHelpText": "Fournissez des instructions sur les conditions préalables à la règle, telles que les intégrations requises, les étapes de configuration et tout ce qui est nécessaire au bon fonctionnement de la règle.",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.setupLabel": "Guide de configuration",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.tagFieldEmptyError": "Une balise ne doit pas être vide",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.threatIndicatorPathFieldEmptyError": "Le remplacement du préfixe d'indicateur ne peut pas être vide.",
Expand Down Expand Up @@ -42010,8 +42010,8 @@
"xpack.slo.sloEmbeddable.config.sloSelector.placeholder": "Sélectionner un SLO",
"xpack.slo.sloEmbeddable.displayName": "Aperçu du SLO",
"xpack.slo.sloEmbeddable.overview.sloNotFoundText": "Le SLO a été supprimé. Vous pouvez supprimer sans risque le widget du tableau de bord.",
"xpack.slo.sLOGridItem.targetFlexItemLabel": "Cible {target}",
"xpack.slo.sloGridItem.targetFlexItemLabel": "Cible {target}",
"xpack.slo.sLOGridItem.targetFlexItemLabel": "Cible {target}",
"xpack.slo.sloGroupConfiguration.customFiltersLabel": "Personnaliser le filtre",
"xpack.slo.sloGroupConfiguration.customFiltersOptional": "Facultatif",
"xpack.slo.sloGroupConfiguration.customFilterText": "Personnaliser le filtre",
Expand Down Expand Up @@ -43457,8 +43457,8 @@
"xpack.stackConnectors.components.casesWebhookxpack.stackConnectors.components.casesWebhook.connectorTypeTitle": "Webhook - Données de gestion des cas",
"xpack.stackConnectors.components.d3security.bodyCodeEditorAriaLabel": "Éditeur de code",
"xpack.stackConnectors.components.d3security.bodyFieldLabel": "Corps",
"xpack.stackConnectors.components.d3Security.connectorTypeTitle": "D3 Security",
"xpack.stackConnectors.components.d3security.connectorTypeTitle": "Données D3",
"xpack.stackConnectors.components.d3Security.connectorTypeTitle": "D3 Security",
"xpack.stackConnectors.components.d3security.eventTypeFieldLabel": "Type d'événement",
"xpack.stackConnectors.components.d3security.invalidActionText": "Nom d'action non valide.",
"xpack.stackConnectors.components.d3security.requiredActionText": "L'action est requise.",
Expand Down
28 changes: 14 additions & 14 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -9468,7 +9468,16 @@
"visualizationUiComponents.filterQueryInput.clickToEdit": "クリックして編集",
"visualizationUiComponents.filterQueryInput.emptyFilterQuery": "(空)",
"visualizationUiComponents.filterQueryInput.label": "フィルタリング条件",
"visualizationUiComponents.iconSelect.alertIconLabel": "アラート",
"visualizationUiComponents.iconSelect.asteriskIconLabel": "アスタリスク",
"visualizationUiComponents.iconSelect.bellIconLabel": "ベル",
"visualizationUiComponents.iconSelect.boltIconLabel": "ボルト",
"visualizationUiComponents.iconSelect.bugIconLabel": "バグ",
"visualizationUiComponents.iconSelect.commentIconLabel": "コメント",
"visualizationUiComponents.iconSelect.flagIconLabel": "旗",
"visualizationUiComponents.iconSelect.label": "アイコン装飾",
"visualizationUiComponents.iconSelect.noIconLabel": "なし",
"visualizationUiComponents.iconSelect.tagIconLabel": "タグ",
"visualizationUiComponents.lineMarker.textVisibility": "テキスト装飾",
"visualizationUiComponents.nameInput.columnLabel": "名前",
"visualizationUiComponents.queryInput.queryPlaceholderKql": "{example}",
Expand Down Expand Up @@ -11079,8 +11088,8 @@
"xpack.apm.serviceIcons.service": "サービス",
"xpack.apm.serviceIcons.serviceDetails.cloud.architecture": "アーキテクチャー",
"xpack.apm.serviceIcons.serviceDetails.cloud.availabilityZoneLabel": "{zones, plural, other {可用性ゾーン}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.functionNameLabel": "{functionNames, plural, other {関数名}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.faasTriggerTypeLabel": "{triggerTypes, plural, other {トリガータイプ}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.functionNameLabel": "{functionNames, plural, other {関数名}} ",
"xpack.apm.serviceIcons.serviceDetails.cloud.machineTypesLabel": "{machineTypes, plural, other {コンピュータータイプ} }\n ",
"xpack.apm.serviceIcons.serviceDetails.cloud.projectIdLabel": "プロジェクト ID",
"xpack.apm.serviceIcons.serviceDetails.cloud.providerLabel": "クラウドプロバイダー",
Expand Down Expand Up @@ -26017,15 +26026,6 @@
"xpack.lens.xyChart.horizontalAxisLabel": "横軸",
"xpack.lens.xyChart.horizontalLeftAxisLabel": "横上軸",
"xpack.lens.xyChart.horizontalRightAxisLabel": "横下軸",
"visualizationUiComponents.iconSelect.alertIconLabel": "アラート",
"visualizationUiComponents.iconSelect.asteriskIconLabel": "アスタリスク",
"visualizationUiComponents.iconSelect.bellIconLabel": "ベル",
"visualizationUiComponents.iconSelect.boltIconLabel": "ボルト",
"visualizationUiComponents.iconSelect.bugIconLabel": "バグ",
"visualizationUiComponents.iconSelect.commentIconLabel": "コメント",
"visualizationUiComponents.iconSelect.flagIconLabel": "旗",
"visualizationUiComponents.iconSelect.noIconLabel": "なし",
"visualizationUiComponents.iconSelect.tagIconLabel": "タグ",
"xpack.lens.xyChart.layerAnnotation": "注釈",
"xpack.lens.xyChart.layerAnnotationsIgnoreTitle": "グローバルフィルターを無視するレイヤー",
"xpack.lens.xyChart.layerAnnotationsLabel": "注釈",
Expand Down Expand Up @@ -26940,8 +26940,8 @@
"xpack.maps.source.esSearch.descendingLabel": "降順",
"xpack.maps.source.esSearch.extentFilterLabel": "マップの表示範囲でデータを動的にフィルタリング",
"xpack.maps.source.esSearch.fieldNotFoundMsg": "インデックスパターン''{indexPatternName}''に''{fieldName}''が見つかりません。",
"xpack.maps.source.esSearch.geoFieldLabel": "地理空間フィールド",
"xpack.maps.source.esSearch.geofieldLabel": "地理空間フィールド",
"xpack.maps.source.esSearch.geoFieldLabel": "地理空間フィールド",
"xpack.maps.source.esSearch.geoFieldTypeLabel": "地理空間フィールドタイプ",
"xpack.maps.source.esSearch.indexOverOneLengthEditError": "データビューは複数のインデックスを参照しています。データビューごとに1つのインデックスのみが許可されています。",
"xpack.maps.source.esSearch.indexZeroLengthEditError": "データビューはどのインデックスも参照していません。",
Expand Down Expand Up @@ -36393,8 +36393,8 @@
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.maxAlertsFieldLessThanWarning": "Kibanaで許可される最大数は、1回の実行につき、{maxNumber} {maxNumber, plural, other {アラート}}です。",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.nameFieldRequiredError": "名前が必要です。",
"xpack.securitySolution.detectionEngine.createRule.stepAboutrule.noteHelpText": "ルール調査ガイドを追加...",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.setupHelpText": "必要な統合、構成ステップ、ルールが正常に動作するために必要な他のすべての項目といった、ルール前提条件に関する指示を入力します。",
"xpack.securitySolution.detectionEngine.createRule.stepAboutrule.setupHelpText": "ルールセットアップガイドを追加...",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.setupHelpText": "必要な統合、構成ステップ、ルールが正常に動作するために必要な他のすべての項目といった、ルール前提条件に関する指示を入力します。",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.setupLabel": "セットアップガイド",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.tagFieldEmptyError": "タグを空にすることはできません",
"xpack.securitySolution.detectionEngine.createRule.stepAboutRule.threatIndicatorPathFieldEmptyError": "インジケータープレフィックスの無効化を空にすることはできません",
Expand Down Expand Up @@ -41994,8 +41994,8 @@
"xpack.slo.sloEmbeddable.config.sloSelector.placeholder": "SLOを選択",
"xpack.slo.sloEmbeddable.displayName": "SLO概要",
"xpack.slo.sloEmbeddable.overview.sloNotFoundText": "SLOが削除されました。ウィジェットをダッシュボードから安全に削除できます。",
"xpack.slo.sLOGridItem.targetFlexItemLabel": "目標{target}",
"xpack.slo.sloGridItem.targetFlexItemLabel": "目標{target}",
"xpack.slo.sLOGridItem.targetFlexItemLabel": "目標{target}",
"xpack.slo.sloGroupConfiguration.customFiltersLabel": "カスタムフィルター",
"xpack.slo.sloGroupConfiguration.customFiltersOptional": "オプション",
"xpack.slo.sloGroupConfiguration.customFilterText": "カスタムフィルター",
Expand Down Expand Up @@ -43437,8 +43437,8 @@
"xpack.stackConnectors.components.casesWebhookxpack.stackConnectors.components.casesWebhook.connectorTypeTitle": "Webフック - ケース管理データ",
"xpack.stackConnectors.components.d3security.bodyCodeEditorAriaLabel": "コードエディター",
"xpack.stackConnectors.components.d3security.bodyFieldLabel": "本文",
"xpack.stackConnectors.components.d3Security.connectorTypeTitle": "D3セキュリティ",
"xpack.stackConnectors.components.d3security.connectorTypeTitle": "D3データ",
"xpack.stackConnectors.components.d3Security.connectorTypeTitle": "D3セキュリティ",
"xpack.stackConnectors.components.d3security.eventTypeFieldLabel": "イベントタイプ",
"xpack.stackConnectors.components.d3security.invalidActionText": "無効なアクション名です。",
"xpack.stackConnectors.components.d3security.requiredActionText": "アクションが必要です。",
Expand Down
Loading

0 comments on commit e9eb03a

Please sign in to comment.