Skip to content

Commit f62a76a

Browse files
mergify[bot]theletterfalexandra5000
authored
Add elasticapm connector docs (#11214) (#11309)
* Add elasticapm connector docs * Fix inaccurate bit * Tech edits * Tech edit part 2 * Update docs/reference/edot-collector/components/elasticapmconnector.md --------- (cherry picked from commit b81e3fe) Co-authored-by: Fabrizio Ferri-Benedetti <algernon@fastmail.com> Co-authored-by: Aleksandra Spilkowska <96738481+alexandra5000@users.noreply.github.com>
1 parent f17ce0d commit f62a76a

File tree

6 files changed

+157
-8
lines changed

6 files changed

+157
-8
lines changed

docs/reference/edot-collector/component-docs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ components:
3434
doc_path: "/reference/edot-collector/components/elasticapmprocessor.md"
3535
title: "Elastic APM processor"
3636

37+
# Connectors
38+
elasticapmconnector:
39+
doc_path: "/reference/edot-collector/components/elasticapmconnector.md"
40+
title: "Elastic APM connector"
41+
3742
# Add more components as documentation is created
38-
# elasticapmconnector:
39-
# doc_path: "/reference/edot-collector/components/elasticapmconnector"
40-
# title: "Elastic APM connector"

docs/reference/edot-collector/components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ These components are included in EDOT Collector version 9.2.0.
8383
| [tailsamplingprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor) | [OTel Contrib Repo](https://github.com/open-telemetry/opentelemetry-collector-contrib) | [Extended] | v0.137.0 |
8484
| [transformprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor) | [OTel Contrib Repo](https://github.com/open-telemetry/opentelemetry-collector-contrib) | [Core] | v0.137.0 |
8585
|***Connectors***||||
86-
| [elasticapmconnector](https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/elasticapmconnector) | [Elastic Repo](https://github.com/elastic/opentelemetry-collector-components) | [Core] | v0.8.0 |
86+
| [elasticapmconnector](/reference/edot-collector/components/elasticapmconnector.md) | [Elastic Repo](https://github.com/elastic/opentelemetry-collector-components) | [Core] | v0.8.0 |
8787
| [forwardconnector](https://github.com/open-telemetry/opentelemetry-collector/tree/main/connector/forwardconnector) | [OTel Core Repo](https://github.com/open-telemetry/opentelemetry-collector) | [Extended] | v0.137.0 |
8888
| [profilingmetricsconnector](https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/profilingmetricsconnector) | [Elastic Repo](https://github.com/elastic/opentelemetry-collector-components) | [Extended] | v0.1.0 |
8989
| [routingconnector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector) | [OTel Contrib Repo](https://github.com/open-telemetry/opentelemetry-collector-contrib) | [Core] | v0.137.0 |
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
navigation_title: Elastic {{product.apm}} connector
3+
description: The Elastic {{product.apm}} connector is an OpenTelemetry Collector component that generates pre-aggregated APM metrics from trace data.
4+
applies_to:
5+
stack:
6+
serverless:
7+
observability:
8+
product:
9+
edot_collector:
10+
products:
11+
- id: elastic-agent
12+
- id: observability
13+
- id: edot-collector
14+
---
15+
16+
# Elastic {{product.apm}} connector
17+
18+
The Elastic {{product.apm}} connector generates pre-aggregated metrics from OpenTelemetry trace data. These metrics enable key {{product.apm}} features like service maps, transaction histograms, and service-level indicators with fast query performance. Instead of calculating metrics on the fly from potentially millions of transactions, the {{product.apm}} UIs can query pre-computed metric documents for quick data visualization.
19+
20+
The connector works together with the [Elastic {{product.apm}} processor](elasticapmprocessor.md), which enriches OpenTelemetry traces with Elastic-specific attributes to ensure optimal compatibility with Elastic {{product.apm}} UIs.
21+
22+
## Default usage in EDOT
23+
24+
The `elasticapm` connector is included by default in EDOT Collector deployments that ingest trace data directly into {{es}}. It's not needed when using the [{{motlp}}](opentelemetry://reference/motlp.md), as the metric aggregation happens server-side.
25+
26+
### Standalone deployments
27+
28+
In standalone deployments, the Elastic {{product.apm}} connector is used in both agent and gateway modes:
29+
30+
* **Agent mode**: The connector is part of the default [application and traces collection pipeline](../config/default-config-standalone.md#application-and-traces-collection-pipeline). It receives trace data from the pipeline, generates metrics, and forwards them to {{es}}.
31+
32+
* **Gateway mode**: The connector is part of the [Gateway mode pipeline](../config/default-config-standalone.md#gateway-mode), where it generates metrics from traces received from other collectors running in agent mode before ingesting them into {{es}}.
33+
34+
35+
### Kubernetes deployment
36+
37+
In Kubernetes, the Elastic {{product.apm}} connector runs in the [Gateway collectors pipeline](../config/default-config-k8s.md#gateway-collectors-pipeline) when using direct ingestion to {{es}}. The Gateway receives traces from DaemonSet collectors, generates {{product.apm}} metrics, and writes both metrics and traces to {{es}}.
38+
39+
For more details about the Kubernetes configuration, refer to [Default configuration (Kubernetes)](../config/default-config-k8s.md).
40+
41+
## Example configuration
42+
43+
The Elastic {{product.apm}} connector typically requires minimal configuration. Usually, an empty configuration block is sufficient:
44+
45+
```yaml
46+
connectors:
47+
elasticapm: {}
48+
```
49+
50+
When combined with the `elasticapm` processor in a complete pipeline:
51+
52+
```yaml
53+
receivers:
54+
otlp:
55+
protocols:
56+
grpc:
57+
endpoint: 0.0.0.0:4317
58+
http:
59+
endpoint: 0.0.0.0:4318
60+
61+
connectors:
62+
elasticapm: {}
63+
64+
processors:
65+
batch:
66+
send_batch_size: 1000
67+
timeout: 1s
68+
elasticapm: {}
69+
70+
exporters:
71+
elasticsearch/otel:
72+
endpoints:
73+
- ${ELASTIC_ENDPOINT}
74+
api_key: ${ELASTIC_API_KEY}
75+
mapping:
76+
mode: otel
77+
78+
service:
79+
pipelines:
80+
traces:
81+
receivers: [otlp]
82+
processors: [batch, elasticapm]
83+
exporters: [elasticapm, elasticsearch/otel]
84+
85+
metrics/aggregated-otel-metrics:
86+
receivers: [elasticapm]
87+
processors: []
88+
exporters: [elasticsearch/otel]
89+
```
90+
91+
In this configuration, the `elasticapm` connector appears as both an exporter in the traces pipeline to generate {{product.apm}} metrics and as a receiver in the metrics pipeline to forward those metrics to {{es}}.
92+
93+
## Generated metrics
94+
95+
The Elastic {{product.apm}} connector generates the following types of aggregated metrics from trace data:
96+
97+
| Metric Type | Description |
98+
|------------|-------------|
99+
| Transaction metrics | Aggregated statistics about service transactions, including throughput, latency distributions, and success rates. These metrics power service overview pages and transaction group views. |
100+
| Service destination metrics | Metrics that track dependencies between services, showing how services communicate with databases, message queues, and other external systems. These metrics are used to build service maps. |
101+
| Span metrics | Detailed metrics about individual span operations, including database queries, HTTP calls, and other operations. These provide granular performance insights for specific operations. |
102+
| Service summary metrics | High-level service health metrics including error rates, throughput, and overall latency. These metrics enable quick health checks and alerting. |
103+
104+
All metrics are generated with appropriate aggregation periods and follow Elastic's metric schema for seamless integration with {{product.apm}} UIs.
105+
106+
## Aggregation intervals
107+
108+
The connector aggregates metrics over multiple time intervals to provide different granularities for analysis. By default, metrics are aggregated at three intervals: 1 minute, 10 minutes, and 60 minutes.
109+
110+
## Best practices
111+
112+
Follow these recommendations when using the Elastic {{product.apm}} connector:
113+
114+
* **Always pair with the elasticapm processor**: The connector and processor work together to provide the full Elastic {{product.apm}} experience. The processor enriches traces while the connector generates {{product.apm}} metrics. Include both in your pipeline configuration for complete functionality.
115+
116+
* **Place the connector as an exporter in the traces pipeline**: Configure the Elastic {{product.apm}} connector as an exporter in your traces pipeline, alongside your final data destination. This ensures the connector receives processed trace data and can generate accurate metrics.
117+
118+
* **Create a separate metrics pipeline for connector output**: Set up a dedicated metrics pipeline with the connector as the receiver. This isolates metric handling and makes it easier to apply metric-specific processing if needed.
119+
120+
* **Use only for direct {{es}} ingestion**: If you're using the {{motlp}}, you don't need the Elastic {{product.apm}} connector, because the endpoint handles metric aggregation automatically. Using both can cause conflicts or duplicate metrics.
121+
122+
* **Keep the connector updated**: The Elastic {{product.apm}} connector evolves with new Elastic {{product.apm}} features. Keep your EDOT Collector version current to benefit from the latest enhancements and compatibility improvements.
123+
124+
* **Monitor connector performance**: The connector aggregates metrics in memory before flushing. For high-throughput environments, monitor memory usage and adjust the aggregation interval or deployment resources as needed.
125+
126+
## Limitations
127+
128+
Be aware of these constraints and behaviors when using the Elastic {{product.apm}} connector:
129+
130+
* **Required for Elastic {{product.apm}} metrics**: Without the Elastic {{product.apm}} connector, you'll only have raw trace data in {{es}}. Service maps, transaction histograms, and other metric-driven {{product.apm}} features might require the pre-aggregated metrics that this connector generates.
131+
132+
* **Not available in contrib OTel Collector**: The Elastic {{product.apm}} connector is an Elastic-specific component not included in the standard OpenTelemetry Collector or Collector Contrib distributions. To use it, you must either use EDOT Collector or [build a custom collector](../custom-collector.md) that includes Elastic's components.
133+
134+
* **Memory usage scales with cardinality**: The connector maintains in-memory aggregations for unique combinations of service names, transaction names, and other dimensions. High-cardinality data (many unique values) increases memory requirements. Monitor memory usage in high-cardinality environments.
135+
136+
* **Minimal configuration options**: Unlike some connectors, the Elastic {{product.apm}} connector operates with mostly fixed behavior and offers few configuration parameters. While this simplifies setup, it also means you have limited ability to customize the aggregation logic.
137+
138+
139+
## Resources
140+
141+
* [Contrib component: elasticapmconnector](https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/elasticapmconnector)
142+
* [Elastic {{product.apm}} processor](elasticapmprocessor.md)
143+
* [Default configuration (Standalone)](../config/default-config-standalone.md#application-and-traces-collection-pipeline)
144+
* [Default configuration (Kubernetes)](../config/default-config-k8s.md)
145+
* [Build a custom collector with Elastic components](../custom-collector.md)
146+

docs/reference/edot-collector/components/elasticapmprocessor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ products:
1717

1818
The Elastic {{product.apm}} processor enriches OpenTelemetry trace data with Elastic-specific attributes and metadata, ensuring optimal compatibility with Elastic {{product.apm}} UIs and functionality. It bridges the gap between OpenTelemetry's trace format and Elastic's expectations, enabling features like service maps, transaction groups, and enhanced trace visualization.
1919

20-
The processor works together with the [Elastic {{product.apm}} connector](https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/elasticapmconnector), which generates pre-aggregated {{product.apm}} metrics from trace data.
20+
The processor works together with the [Elastic {{product.apm}} connector](elasticapmconnector.md), which generates pre-aggregated {{product.apm}} metrics from trace data.
2121

2222
## Default usage in EDOT
2323

@@ -138,7 +138,7 @@ Be aware of these constraints and behaviors when using the Elastic APM processor
138138
## Resources
139139

140140
* [Contrib component: elasticapmprocessor](https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/elasticapmprocessor)
141-
* [Elastic {{product.apm}} connector](https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/elasticapmconnector)
141+
* [Elastic {{product.apm}} connector](elasticapmconnector.md)
142142
* [Default configuration (Standalone)](../config/default-config-standalone.md#application-and-traces-collection-pipeline)
143143
* [Default configuration (Kubernetes)](../config/default-config-k8s.md)
144144
* [Build a custom collector with Elastic components](../custom-collector.md)

docs/reference/edot-collector/config/default-config-standalone.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Data is exported directly to {{es}} using the [`elasticsearch`] exporter in `OTe
8383

8484
The application pipeline in the EDOT Collector receives data from OTel SDKs through the [`OTLP`] receiver. While logs and metrics are exported verbatim into {{es}}, traces require two additional components.
8585

86-
{applies_to}`edot_collector: ga 9.2` The [`elasticapm` processor](../components/elasticapmprocessor.md) enriches trace data with additional attributes that improve the user experience in the {{product.observability}} UIs. In addition, the [`elasticapm` connector](https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/elasticapmconnector) generates pre-aggregated APM metrics from tracing data.
86+
{applies_to}`edot_collector: ga 9.2` The [`elasticapm` processor](../components/elasticapmprocessor.md) enriches trace data with additional attributes that improve the user experience in the {{product.observability}} UIs. In addition, the [`elasticapm` connector](../components/elasticapmconnector.md) generates pre-aggregated APM metrics from tracing data.
8787

8888
Application-related OTel data is ingested into {{es}} in OTel-native format using the [`elasticsearch`] exporter.
8989

@@ -372,7 +372,7 @@ The server expects incoming HTTP requests to include an API key with sufficient
372372
[`elasticinframetrics`]: https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/elasticinframetricsprocessor
373373
[`elastictrace`]: https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/elastictraceprocessor
374374
[`elasticapm` processor]: https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/elasticapmprocessor
375-
[`elasticapm` connector]: https://github.com/elastic/opentelemetry-collector-components/tree/main/connector/elasticapmconnector
375+
[`elasticapm` connector]: ../components/elasticapmconnector.md
376376
[`resource`]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor
377377
[`resourcedetection`]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor
378378
[`OTLP`]: https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver

docs/reference/edot-collector/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ toc:
1818
- file: components/elasticapmintakereceiver.md
1919
- file: components/k8sclusterreceiver.md
2020
- file: components/elasticapmprocessor.md
21+
- file: components/elasticapmconnector.md
2122
- file: components/filelogreceiver.md
2223
- file: components/k8sobjectsreceiver.md
2324
- file: components/hostmetricsreceiver.md

0 commit comments

Comments
 (0)