Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions changelog/fragments/1758791900-edot-profiling-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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: feature

# Change summary; a 80ish characters long description of the change.
summary: add documentation for the profiles support in EDOT

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
#description:

# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component: "elastic-agent"

# PR URL; optional; the PR number 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

# 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
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
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} Set up Universal Profiling
Universal Profiling must be set up before profiles can be ingested and visualized.

To set up Universal Profiling, go to **Observability** in Kibana and then to **Infrastructure** > **Universal Profiling**. If it's not yet configured, select **Set up Universal Profiling** and follow the instructions.

:::{note}
The setup dialog doesn't appear if Universal Profiling is already configured.
:::
::::

::::{step} Full profiles collection
For full profiles collection and reporting, use this Collector configuration:

```yaml
receivers:
profiling:
SamplesPerSecond: 19

service:
pipelines:
profiles:
receivers: [ profiling ]
exporters: [ elasticsearch ]
```
::::

::::{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, deploy the EDOT Collector with a profiling receiver as a DaemonSet. This ensures comprehensive, node-level profiling across the entire complete cluster, providing consistent data collection, resilience, scalability, and simplified management. This approach is recommended for optimal performance and full observability.
1 change: 1 addition & 0 deletions docs/reference/edot-collector/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 16 additions & 0 deletions internal/pkg/otel/samples/linux/profiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
receivers:
profiling:
SamplesPerSecond: 19
exporters:
elasticsearch:
endpoints: [ "${env:ELASTIC_ENDPOINT}" ]
api_key: ${env:ELASTIC_API_KEY}
mapping:
mode: otel

service:
pipelines:
profiles:
receivers: [ profiling ]
exporters: [ elasticsearch ]

25 changes: 25 additions & 0 deletions internal/pkg/otel/samples/linux/profiles_metrics.yml
Original file line number Diff line number Diff line change
@@ -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 ]
Loading