|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * observability/otel/otel-configuration-of-otel-intro.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: REFERENCE |
| 6 | +[id="otel-collector-profile-signal_{context}"] |
| 7 | += Profile signal |
| 8 | + |
| 9 | +[role="_abstract"] |
| 10 | +The Profile signal is an emerging telemetry data format for observing code execution and resource consumption. |
| 11 | + |
| 12 | +:FeatureName: The Profile signal |
| 13 | +include::snippets/technology-preview.adoc[leveloffset=+1] |
| 14 | + |
| 15 | +The Profile signal allows you to pinpoint inefficient code down to specific functions. Such profiling allows you to precisely identify performance bottlenecks and resource inefficiencies down to the specific line of code. By correlating such high-fidelity profile data with traces, metrics, and logs, it enables comprehensive performance analysis and targeted code optimization in production environments. |
| 16 | + |
| 17 | +Profiling can target an application or operating system: |
| 18 | + |
| 19 | +* Using profiling to observe an application can help developers validate code performance, prevent regressions, and monitor resource consumption such as memory and CPU usage, and thus identify and improve inefficient code. |
| 20 | +
|
| 21 | +* Using profiling to observe operating systems can provide insights into the infrastructure, system calls, kernel operations, and I/O wait times, and thus help in optimizing infrastructure for efficiency and cost savings. |
| 22 | +
|
| 23 | +.OpenTelemetry Collector custom resource with the enabled Profile signal |
| 24 | +[source,yaml] |
| 25 | +---- |
| 26 | +apiVersion: opentelemetry.io/v1beta1 |
| 27 | +kind: OpenTelemetryCollector |
| 28 | +metadata: |
| 29 | +name: otel-profiles-collector |
| 30 | + namespace: otel-profile |
| 31 | +spec: |
| 32 | + args: |
| 33 | + feature-gates: service.profilesSupport # <1> |
| 34 | + config: |
| 35 | + receivers: |
| 36 | + otlp: # <2> |
| 37 | + protocols: |
| 38 | + grpc: |
| 39 | + endpoint: '0.0.0.0:4317' |
| 40 | + http: |
| 41 | + endpoint: '0.0.0.0:4318' |
| 42 | + exporters: |
| 43 | + otlp/pyroscope: |
| 44 | + endpoint: "pyroscope.pyroscope-monitoring.svc.cluster.local:4317" # <3> |
| 45 | + service: |
| 46 | + pipelines: # <4> |
| 47 | + profiles: |
| 48 | + receivers: [otlp] |
| 49 | + exporters: [otlp/pyroscope] |
| 50 | +# ... |
| 51 | +---- |
| 52 | +<1> Enables profiles by setting the `feature-gates` field as shown here. |
| 53 | +<2> Configures the OTLP Receiver to set up the OpenTelemetry Collector to receive profile data via the OTLP. |
| 54 | +<3> Configures where to export profiles to, such as a storage. |
| 55 | +<4> Defines a profiling pipeline, including a configuration for forwarding the received profile data to an OTLP-compatible profiling back end such as Grafana Pyroscope. |
| 56 | + |
| 57 | +[role="_additional-resources"] |
| 58 | +.Additional resources |
| 59 | +* link:https://opentelemetry.io/docs/specs/otel/profiles/[OpenTelemetry Profiles] |
| 60 | +* link:https://opentelemetry.io/docs/specs/semconv/general/profiles/[Profiles attributes] |
0 commit comments