From 6b09280aaf8a9e868f6ac96148aaa0fb6e6556d4 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Wed, 1 Oct 2025 16:46:15 -0600 Subject: [PATCH 1/2] [AutoOps] Provide Sample Configuration to Debug Data This provides a separate OTel configuration to allow users to better understand what data they are shipping with the AutoOps ES module. --- .../1759359160-autoops-debug-output.yaml | 45 +++++++++++++++++ .../otel/samples/darwin/autoops_es_debug.yml | 48 +++++++++++++++++++ .../otel/samples/linux/autoops_es_debug.yml | 48 +++++++++++++++++++ .../otel/samples/windows/autoops_es_debug.yml | 48 +++++++++++++++++++ 4 files changed, 189 insertions(+) create mode 100644 changelog/fragments/1759359160-autoops-debug-output.yaml create mode 100644 internal/pkg/otel/samples/darwin/autoops_es_debug.yml create mode 100644 internal/pkg/otel/samples/linux/autoops_es_debug.yml create mode 100644 internal/pkg/otel/samples/windows/autoops_es_debug.yml diff --git a/changelog/fragments/1759359160-autoops-debug-output.yaml b/changelog/fragments/1759359160-autoops-debug-output.yaml new file mode 100644 index 00000000000..31bf4d7a6f7 --- /dev/null +++ b/changelog/fragments/1759359160-autoops-debug-output.yaml @@ -0,0 +1,45 @@ +# REQUIRED +# Kind can be one of: +# - breaking-change: a change to previously-documented behavior +# - deprecation: functionality that is being removed in a later release +# - bug-fix: fixes a problem in a previous version +# - enhancement: extends functionality but does not break or fix existing behavior +# - feature: new functionality +# - known-issue: problems that we are aware of in a given version +# - security: impacts on the security of a product or a user’s deployment. +# - upgrade: important information for someone upgrading from a prior version +# - other: does not fit into any of the other categories +kind: enhancement + +# REQUIRED for all kinds +# Change summary; a 80ish characters long description of the change. +summary: Add debug exporter to AutoOps OTel config sample + +# REQUIRED for breaking-change, deprecation, known-issue +# Long description; in case the summary is not enough to describe the change +# this field accommodate a description without length limits. +# description: + +# REQUIRED for breaking-change, deprecation, known-issue +# impact: + +# REQUIRED for breaking-change, deprecation, known-issue +# action: + +# REQUIRED for all kinds +# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc. +component: elastic-agent + +# AUTOMATED +# OPTIONAL to manually add other PR URLs +# PR URL: A link the PR that added the changeset. +# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added. +# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number. +# Please provide it if you are adding a fragment for a different PR. +# pr: https://github.com/owner/repo/1234 + +# AUTOMATED +# OPTIONAL to manually add other issue URLs +# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of). +# If not present is automatically filled by the tooling with the issue linked to the PR number. +# issue: https://github.com/owner/repo/1234 diff --git a/internal/pkg/otel/samples/darwin/autoops_es_debug.yml b/internal/pkg/otel/samples/darwin/autoops_es_debug.yml new file mode 100644 index 00000000000..d022a62967c --- /dev/null +++ b/internal/pkg/otel/samples/darwin/autoops_es_debug.yml @@ -0,0 +1,48 @@ +receivers: + metricbeatreceiver: + metricbeat: + modules: + # Metrics + - module: autoops_es + hosts: ${env:AUTOOPS_ES_URL} + period: 10s + metricsets: + - cat_shards + - cluster_health + - cluster_settings + - license + - node_stats + - tasks_management + # Templates + - module: autoops_es + hosts: ${env:AUTOOPS_ES_URL} + period: 24h + metricsets: + - cat_template + - component_template + - index_template + processors: + - add_fields: + target: autoops_es + fields: + temp_resource_id: ${env:AUTOOPS_TEMP_RESOURCE_ID} + token: ${env:AUTOOPS_TOKEN} + output: + otelconsumer: + telemetry_types: ["logs"] + +exporters: + # Exporter to print the first 5 logs/metrics and then every 1000th + debug: + verbosity: detailed + sampling_initial: 5 + sampling_thereafter: 1000 + +service: + pipelines: + logs: + receivers: [metricbeatreceiver] + exporters: [debug] + telemetry: + logs: + encoding: json diff --git a/internal/pkg/otel/samples/linux/autoops_es_debug.yml b/internal/pkg/otel/samples/linux/autoops_es_debug.yml new file mode 100644 index 00000000000..d022a62967c --- /dev/null +++ b/internal/pkg/otel/samples/linux/autoops_es_debug.yml @@ -0,0 +1,48 @@ +receivers: + metricbeatreceiver: + metricbeat: + modules: + # Metrics + - module: autoops_es + hosts: ${env:AUTOOPS_ES_URL} + period: 10s + metricsets: + - cat_shards + - cluster_health + - cluster_settings + - license + - node_stats + - tasks_management + # Templates + - module: autoops_es + hosts: ${env:AUTOOPS_ES_URL} + period: 24h + metricsets: + - cat_template + - component_template + - index_template + processors: + - add_fields: + target: autoops_es + fields: + temp_resource_id: ${env:AUTOOPS_TEMP_RESOURCE_ID} + token: ${env:AUTOOPS_TOKEN} + output: + otelconsumer: + telemetry_types: ["logs"] + +exporters: + # Exporter to print the first 5 logs/metrics and then every 1000th + debug: + verbosity: detailed + sampling_initial: 5 + sampling_thereafter: 1000 + +service: + pipelines: + logs: + receivers: [metricbeatreceiver] + exporters: [debug] + telemetry: + logs: + encoding: json diff --git a/internal/pkg/otel/samples/windows/autoops_es_debug.yml b/internal/pkg/otel/samples/windows/autoops_es_debug.yml new file mode 100644 index 00000000000..d022a62967c --- /dev/null +++ b/internal/pkg/otel/samples/windows/autoops_es_debug.yml @@ -0,0 +1,48 @@ +receivers: + metricbeatreceiver: + metricbeat: + modules: + # Metrics + - module: autoops_es + hosts: ${env:AUTOOPS_ES_URL} + period: 10s + metricsets: + - cat_shards + - cluster_health + - cluster_settings + - license + - node_stats + - tasks_management + # Templates + - module: autoops_es + hosts: ${env:AUTOOPS_ES_URL} + period: 24h + metricsets: + - cat_template + - component_template + - index_template + processors: + - add_fields: + target: autoops_es + fields: + temp_resource_id: ${env:AUTOOPS_TEMP_RESOURCE_ID} + token: ${env:AUTOOPS_TOKEN} + output: + otelconsumer: + telemetry_types: ["logs"] + +exporters: + # Exporter to print the first 5 logs/metrics and then every 1000th + debug: + verbosity: detailed + sampling_initial: 5 + sampling_thereafter: 1000 + +service: + pipelines: + logs: + receivers: [metricbeatreceiver] + exporters: [debug] + telemetry: + logs: + encoding: json From 07bfd35d18e59f9c1c0822c474c6c4bfaf72888f Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Wed, 1 Oct 2025 17:02:41 -0600 Subject: [PATCH 2/2] Update CODEOWNERS so OpEx owns the AutoOps config --- .github/CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 47d8f8b7a43..f82d6faf1f3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -23,6 +23,6 @@ /internal/pkg/otel/samples @elastic/ingest-otel-data @elastic/ingest-docs /internal/pkg/otel/core-components.yaml @elastic/ingest-otel-leads /internal/pkg/composable/providers/kubernetes @elastic/elastic-agent-control-plane -/internal/pkg/otel/samples/darwin/autoops_es.yml @elastic/opex -/internal/pkg/otel/samples/linux/autoops_es.yml @elastic/opex -/internal/pkg/otel/samples/windows/autoops_es.yml @elastic/opex +/internal/pkg/otel/samples/darwin/autoops_es*.yml @elastic/opex +/internal/pkg/otel/samples/linux/autoops_es*.yml @elastic/opex +/internal/pkg/otel/samples/windows/autoops_es*.yml @elastic/opex