diff --git a/docs/reference/edot-collector/config/configure-logs-collection.md b/docs/reference/edot-collector/config/configure-logs-collection.md index e3f0a8a20ac..5a8d9f507db 100644 --- a/docs/reference/edot-collector/config/configure-logs-collection.md +++ b/docs/reference/edot-collector/config/configure-logs-collection.md @@ -1,5 +1,5 @@ --- -navigation_title: Configure Logs Collection +navigation_title: Logs collection description: Learn how to configure and customize logs collection through the Elastic Distribution of OpenTelemetry Collector. applies_to: stack: diff --git a/docs/reference/edot-collector/config/configure-metrics-collection.md b/docs/reference/edot-collector/config/configure-metrics-collection.md index 654d213ff34..5b1e1dc4463 100644 --- a/docs/reference/edot-collector/config/configure-metrics-collection.md +++ b/docs/reference/edot-collector/config/configure-metrics-collection.md @@ -1,5 +1,5 @@ --- -navigation_title: Configure Metrics Collection +navigation_title: Metrics collection description: Learn how to configure and customize metrics collection through the Elastic Distribution of OpenTelemetry Collector. applies_to: stack: diff --git a/docs/reference/edot-collector/config/configure-profiles-collection.md b/docs/reference/edot-collector/config/configure-profiles-collection.md new file mode 100644 index 00000000000..4dbd3c0d3bc --- /dev/null +++ b/docs/reference/edot-collector/config/configure-profiles-collection.md @@ -0,0 +1,70 @@ +--- +navigation_title: Profiles collection +description: Learn how to configure and customize profiles collection through the Elastic Distribution of OpenTelemetry Collector. +applies_to: + stack: preview 9.2 + serverless: + observability: + product: + edot_collector: preview +products: + - id: observability + - id: edot-collector +--- + +# Configure profiles collection + +The {{edot}} (EDOT) Collector includes a profiling receiver, which offers an eBPF-based, system-wide profiler. + +To activate and configure profiling and send profiles to {{ecloud}} or {{es}}, follow these instructions. + +:::{important} +OpenTelemetry profiling is still under active development. Refer to [The State of Profiling](https://opentelemetry.io/blog/2024/state-profiling/) blog post for more information. +::: + +## Turn on profiling + +Follow these steps to turn on profiles collection through the EDOT Collector. + +:::::{stepper} +::::{step} Activate profiling in the Collector +To activate profiling in the EDOT Collector, start it using the additional argument `--feature-gates=service.profilesSupport`. + +For example: + +```sh +sudo ./otelcol --config otel.yml --feature-gates=service.profilesSupport +``` +:::: +::::: + +## Generate metrics from profiles + +You can configure the components to generate and report metrics exclusively from profile information. This method contributes to a reduction in ingest traffic and storage costs. + +The following example generates profiling metrics by frame, frame type, and classification: + +```yaml +connectors: + profilingmetrics: + by_frame: true + by_frametype: true + by_classification: true + +receivers: + profiling: + SamplesPerSecond: 19 + +service: + pipelines: + profiles: + receivers: [ profiling ] + exporters: [ profilingmetrics ] + metrics: + receivers: [ profilingmetrics ] + exporters: [ elasticsearch ] +``` + +## Kubernetes deployments + +In Kubernetes, we suggest deploying the EDOT Collector with a profiling receiver as a DaemonSet. This ensures comprehensive, node-level profiling across the entire cluster, providing consistent data collection, resilience, scalability, and simplified management. This approach is recommended for optimal performance and full observability. diff --git a/docs/reference/edot-collector/toc.yml b/docs/reference/edot-collector/toc.yml index dffce135c8e..3e15ba449de 100644 --- a/docs/reference/edot-collector/toc.yml +++ b/docs/reference/edot-collector/toc.yml @@ -10,6 +10,7 @@ toc: - file: config/configure-metrics-collection.md - file: config/tail-based-sampling.md - file: config/authentication-methods.md + - file: config/configure-profiles-collection.md - file: config/proxy.md - file: components.md children: diff --git a/internal/pkg/otel/samples/linux/profiles_metrics.yml b/internal/pkg/otel/samples/linux/profiles_metrics.yml new file mode 100644 index 00000000000..be01ec3bda6 --- /dev/null +++ b/internal/pkg/otel/samples/linux/profiles_metrics.yml @@ -0,0 +1,25 @@ +receivers: + profiling: + SamplesPerSecond: 19 + +connectors: + profilingmetrics: + by_frametype: true + by_frame: true + by_classification: true + +exporters: + elasticsearch: + endpoints: [ "${env:ELASTIC_ENDPOINT}" ] + api_key: ${env:ELASTIC_API_KEY} + mapping: + mode: otel + +service: + pipelines: + profiles: + receivers: [ profiling ] + exporters: [ profilingmetrics ] + metrics: + receivers: [ profilingmetrics ] + exporters: [ elasticsearch ]