Skip to content

Commit 2f1ba0e

Browse files
theletterfjackshirazixrmxalexandra5000
authored
Add central management (#310)
* Add main page * Add SDK edits * Other edits * Add file to toc * Update central-configuration.md * Update docs/reference/central-configuration.md Co-authored-by: jackshirazi <[email protected]> * Update EDOT Python docs for central configuration * Update docs * Add supported settings * Edits * Add feedback * Add config tables * Update central-configuration.md * Add sentence * Absolute links * Add applies to for PHP * Add applies to tags * Remove iOS * iOS comment * Fix word * Update docs/reference/central-configuration.md Co-authored-by: Aleksandra Spilkowska <[email protected]> * Update docs/reference/central-configuration.md Co-authored-by: Aleksandra Spilkowska <[email protected]> * Update docs/reference/central-configuration.md Co-authored-by: Aleksandra Spilkowska <[email protected]> * Update docs/reference/edot-collector/config/default-config-standalone.md Co-authored-by: Aleksandra Spilkowska <[email protected]> * Update docs/reference/edot-sdks/ios/configuration.md Co-authored-by: Aleksandra Spilkowska <[email protected]> --------- Co-authored-by: jackshirazi <[email protected]> Co-authored-by: Riccardo Magliocchetti <[email protected]> Co-authored-by: Aleksandra Spilkowska <[email protected]>
1 parent bafb232 commit 2f1ba0e

File tree

21 files changed

+344
-22
lines changed

21 files changed

+344
-22
lines changed
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
navigation_title: Central configuration
3+
description: Reference documentation for the central configuration of EDOT SDKs.
4+
applies_to:
5+
deployment:
6+
ess: preview 9.1
7+
stack: preview 9.1
8+
serverless: unavailable
9+
products:
10+
- id: observability
11+
- id: kibana
12+
- id: edot-collector
13+
---
14+
15+
# Central configuration for EDOT SDKs
16+
17+
Manage {{edot}} (EDOT) SDKs through the APM Agent Central Configuration feature in the Applications UI. Changes are automatically propagated to the deployed [EDOT SDKs](/reference/edot-sdks/index.md). Refer to [APM Agent Central Configuration](docs-content://solutions/observability/apm/apm-agent-central-configuration.md) for more information.
18+
19+
This feature implements the Open Agent Management Protocol (OpAMP). Refer to [Open Agent Management Protocol
20+
](https://opentelemetry.io/docs/specs/opamp/) for more information.
21+
22+
## Prerequisites
23+
24+
To use APM Agent Central Configuration for EDOT SDKs, you need:
25+
26+
* An Elastic self-managed or {{ecloud}} deployment, version 9.1 or higher.
27+
* A standalone [EDOT Collector](/reference/edot-collector/index.md), in either Agent or Collector mode.
28+
* [EDOT SDKs](/reference/edot-sdks/index.md) instrumenting your application.
29+
30+
The following versions of EDOT and {{stack}} support central configuration:
31+
32+
| Component | Minimum version |
33+
|-----------|----------------|
34+
| Kibana | 9.1 or higher |
35+
| EDOT Collector | 8.19, 9.1 or higher |
36+
| EDOT Android | 1.2.0 or higher |
37+
| EDOT Java | 1.5.0 or higher |
38+
| EDOT Node.js | 1.2.0 or higher |
39+
| EDOT PHP | 1.1.1 or higher |
40+
| EDOT Python | 1.4.0 or higher |
41+
42+
::::{note}
43+
Serverless deployments are not currently supported.
44+
::::
45+
46+
## Activate central configuration
47+
48+
To activate APM Agent Central Configuration for EDOT SDKs, follow these steps.
49+
50+
:::::{stepper}
51+
52+
::::{step} Edit the EDOT Collector configuration
53+
54+
Edit the EDOT Collector configuration file to use the `apmconfig` extension. You need a valid {{es}} API key to authenticate to the {{es}} endpoint.
55+
56+
:::{include} _snippets/retrieve-credentials.md
57+
:::
58+
59+
The example configuration is:
60+
61+
```yaml
62+
extensions:
63+
bearertokenauth:
64+
scheme: "APIKey"
65+
token: "<ENCODED_ELASTICSEARCH_APIKEY>"
66+
67+
apmconfig:
68+
opamp:
69+
protocols:
70+
http:
71+
# Default is localhost:4320
72+
# endpoint: "<CUSTOM_OPAMP_ENDPOINT>"
73+
source:
74+
elasticsearch:
75+
endpoint: "<ELASTICSEARCH_ENDPOINT>"
76+
auth:
77+
authenticator: bearertokenauth
78+
```
79+
80+
Restart the Elastic Agent to also restart the Collector and apply the changes. Refer to [EDOT Collector configuration](/reference/edot-collector/config/default-config-standalone.md#central-configuration) for more information.
81+
82+
::::
83+
84+
::::{step} Set the environment variable for the SDKs
85+
86+
Activate the central configuration feature in the SDKs by setting the `ELASTIC_OTEL_OPAMP_ENDPOINT` environment variable to the URL endpoint of the `apmconfig` extension that you configured in the previous step. For example:
87+
88+
```sh
89+
export ELASTIC_OTEL_OPAMP_ENDPOINT="http://localhost:4320"
90+
```
91+
92+
Restart the instrumented application to apply the changes.
93+
94+
:::{note}
95+
Central configuration uses the `service.name` and `deployment.environment.name` OpenTelemetry resource attributes to target specific instances with a configuration. If no environment is specified, the central configuration feature will match `All` as the environment.
96+
:::
97+
98+
::::
99+
100+
::::{step} Check that the EDOT SDK appears in central configuration
101+
102+
Wait some time for the EDOT SDK to appear in {{kib}} under Agent Configuration.
103+
104+
1. Go to **{{kib}}** → **Observability** → **Applications** and select a service.
105+
2. Select **Settings** and go to **Agent Configuration**.
106+
107+
:::{note}
108+
Your application must produce and send telemetry data for the EDOT SDK to appear in Agent Configuration.
109+
:::
110+
111+
::::
112+
113+
:::::{stepper}
114+
115+
## Supported settings
116+
117+
For a list of settings that you can configure through APM Agent Central Configuration, refer to the configuration reference of each EDOT SDK:
118+
119+
- [EDOT Android](/reference/edot-sdks/android/configuration.md)
120+
- [EDOT Java](/reference/edot-sdks/java/configuration.md#central-configuration)
121+
- [EDOT Node.js](/reference/edot-sdks/nodejs/configuration.md#central-configuration)
122+
- [EDOT PHP](/reference/edot-sdks/php/configuration.md#central-configuration)
123+
- [EDOT Python](/reference/edot-sdks/python/configuration.md#central-configuration)
124+
125+
EDOT iOS currently supports APM Agent Central Configuration through APM Server. Refer to [EDOT iOS configuration](/reference/edot-sdks/ios/configuration.md) for more details.

docs/reference/compatibility/collectors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ For information on the compatibility of each Collector component, refer to the [
6161

6262
Non-EDOT distributions of the OTel Collector, such as custom Collector builds, upstream Collector distributions, and so on aren't officially supported through Elastic but are technically compatible ([Compatible]) if they contain the [required OTel Collector components](/reference/edot-collector/custom-collector.md) and are configured like the EDOT Collector.
6363

64-
You can retrieve required components and configuration options from the [sample configuration files](https://github.com/elastic/elastic-agent/tree/v<COLLECTOR_VERSION>/internal/pkg/otel/samples/linux) for the EDOT Collector.
64+
You can retrieve required components and configuration options from the [example configuration files](https://github.com/elastic/elastic-agent/tree/v<COLLECTOR_VERSION>/internal/pkg/otel/samples/linux) for the EDOT Collector.
6565

6666
For a comparison between EDOT and the upstream OTel, refer to [EDOT compared to upstream OTel](edot-vs-upstream.md).
6767

docs/reference/compatibility/edot-vs-upstream.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Here are some key differences and considerations when using EDOT compared to ups
2525
| Integration | Seamless integration with Elastic Stack. | Requires additional configuration for Elastic. |
2626
| Components | Curated list of components for Elastic Observability. | Generic components that may not support all Elastic features. |
2727
| Deployment | Easier to deploy with Elastic Stack. | Requires manual setup and configuration. |
28+
| Central management | Central management of OTel SDKs and Collectors. | No central management. |
2829
| Compatibility | Fully compatible with Elastic Stack components. | Compatible but may require additional configuration. |
2930
| Self-managed/ECH | Required for full functionality. | Compatible but without guaranteed support. |
3031
| Updates | Future updates aligned with Elastic Stack releases. | Updates depend on upstream OpenTelemetry release cycle. |

docs/reference/compatibility/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The following table shows Elastic features and their level of support and compat
3838
| Usage of [Time Series Data Streams] | [Compatible] | [Supported] |
3939
| **Central Management** | [Incompatible] | [Not supported] |
4040
| Central management of OTel collectors | [Incompatible] | [Not supported] |
41-
| Central management of OTel SDKs | [Incompatible] | [Not supported] |
41+
| Central management of OTel SDKs | [Compatible] | [Supported] |
4242

4343

4444
^1^ Refer to [limitations on host metrics](limitations.md#infrastructure-and-host-metrics)

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

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ With the {{motlp}}, there is no need to configure any Elastic-specific component
101101

102102
In Gateway mode, the Collector ingests data from other Collectors running in Agent mode and forwards it to Elastic.
103103

104-
## Sample configuration
104+
## Example configuration
105105

106-
The following sample configuration files are available for the Gateway mode:
106+
The following example configuration files are available for the Gateway mode:
107107

108108
| Version | Configuration |
109109
|---------|----------------|
@@ -207,6 +207,115 @@ The service section defines separate pipelines for different telemetry types:
207207

208208
Each pipeline connects specific receivers, processors, and exporters to handle different data types appropriately.
209209

210+
211+
## Central configuration
212+
213+
The EDOT Collector can be configured to use [APM Agent Central Configuration](docs-content://solutions/observability/apm/apm-agent-central-configuration.md). Refer to [Central configuration docs](/reference/central-configuration.md) for more details.
214+
215+
### Activate the apmconfig extension
216+
217+
To activate the central configuration feature, uncomment the [`apmconfig`](https://github.com/elastic/opentelemetry-collector-components/blob/main/extension/apmconfigextension/README.md) and [`bearertokenauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/bearertokenauthextension/README.md) extensions and provide the necessary configuration, or add the configuration manually. For example:
218+
219+
```yaml
220+
extensions:
221+
bearertokenauth:
222+
scheme: "APIKey"
223+
token: "<ENCODED_ELASTICSEARCH_APIKEY>"
224+
225+
apmconfig:
226+
source:
227+
elasticsearch:
228+
endpoint: "<ELASTICSEARCH_ENDPOINT>"
229+
auth:
230+
authenticator: bearertokenauth
231+
opamp:
232+
protocols:
233+
http:
234+
# Default is localhost:4320
235+
# endpoint: "<CUSTOM_OPAMP_ENDPOINT>
236+
```
237+
238+
:::{note}
239+
Create an API Key following [these instructions](docs-content://deploy-manage/api-keys/elasticsearch-api-keys.md).
240+
:::
241+
242+
### TLS configuration
243+
244+
You can turn on TLS or mutual TLS to encrypt data in transit between EDOT SDKs and the extension. Refer to [OpenTelemetry TLS server configuration](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md#server-configuration) for more details.
245+
246+
For example:
247+
248+
```yaml
249+
extensions:
250+
apmconfig:
251+
opamp:
252+
protocols:
253+
http:
254+
endpoint: ":4320"
255+
tls:
256+
cert_file: server.crt
257+
key_file: server.key
258+
...
259+
```
260+
261+
### Authentication settings
262+
263+
In addition to TLS, you can configure authentication to ensure that only authorized agents can communicate with the extension and retrieve their corresponding remote configurations.
264+
265+
The `apmconfig` extension supports any configauth authenticator. Use the `apikeyauth` extension to authenticate with Elasticsearch API keys:
266+
267+
```yaml
268+
extensions:
269+
apikeyauth:
270+
endpoint: "<YOUR_ELASTICSEARCH_ENDPOINT>"
271+
application_privileges:
272+
- application: "apm"
273+
privileges:
274+
- "config_agent:read"
275+
resources:
276+
- "-"
277+
apmconfig:
278+
opamp:
279+
protocols:
280+
http:
281+
auth:
282+
authenticator: apikeyauth
283+
...
284+
```
285+
286+
The server expects incoming HTTP requests to include an API key with sufficient privileges, using the following header format: `Authorization: ApiKey <base64(id:api_key)>`.
287+
288+
You can create an API key with the minimum required application permissions through {{kib}} by going to **Observability** → **Applications** → **Settings** → **Agent Keys**, or by using the Elasticsearch Security API:
289+
290+
```sh
291+
POST /_security/api_key
292+
{
293+
"name": "apmconfig-opamp-test-sdk",
294+
"metadata": {
295+
"application": "apm"
296+
},
297+
"role_descriptors": {
298+
"apm": {
299+
"cluster": [],
300+
"indices": [],
301+
"applications": [
302+
{
303+
"application": "apm",
304+
"privileges": [
305+
"config_agent:read"
306+
],
307+
"resources": [
308+
"*"
309+
]
310+
}
311+
],
312+
"run_as": [],
313+
"metadata": {}
314+
}
315+
}
316+
}
317+
```
318+
210319
[`attributes`]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor
211320
[`filelog`]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver
212321
[`hostmetrics`]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver

docs/reference/edot-sdks/features.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,17 +352,17 @@ features:
352352
status: not-available
353353
min_version:
354354
Java:
355-
status: not-available
356-
min_version:
355+
status: tech-preview
356+
min_version: 1.5.0
357357
Node.js:
358-
status: not-available
359-
min_version:
358+
status: tech-preview
359+
min_version: 1.2.0
360360
PHP:
361-
status: not-available
362-
min_version:
361+
status: tech-preview
362+
min_version: 1.1.0
363363
Python:
364-
status: not-available
365-
min_version:
364+
status: tech-preview
365+
min_version: 1.4.0
366366
Android:
367367
status: not-available
368368
min_version:

docs/reference/edot-sdks/ios/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You can configure the `AgentConfigBuilder` with the following functions.
3737
* **Type:** URL
3838
* **Default:** nil
3939

40-
The URL host endpoint that handles both OTLP data export as well as Elastic Central Config.
40+
The URL host endpoint that handles both OTLP data export as well as Elastic Central Configuration.
4141
This configuration option is deprecated. Use `withExportUrl` instead.
4242

4343
### `withExportUrl` [withExportUrl]
@@ -198,7 +198,7 @@ Deployment environment is set to `default`. This can be overridden using the `OT
198198

199199
### Dynamic configuration ![dynamic config](images/dynamic-config.svg "") [dynamic-configuration]
200200

201-
Dynamic configurations are available through the kibana UI and are read by the SDK remotely to apply configuration on all active agents deployed in the field. More info on dynamic configurations can be found in [agent configurations](docs-content://solutions/observability/apps/apm-agent-central-configuration.md).
201+
Dynamic configurations are available through the {{kib}} UI and are read by the SDK remotely to apply configuration on all active agents deployed in the field. More info on dynamic configurations can be found in [agent configurations](docs-content://solutions/observability/apps/apm-agent-central-configuration.md).
202202

203203
#### Recording [recording]
204204

docs/reference/edot-sdks/java/configuration.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,31 @@ The following settings are available:
8787
| `ELASTIC_OTEL_JAVA_INSTRUMENTATION_GENAI_EMIT_EVENTS` | value of `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` | If set to `true`, the agent will generate log events for OpenAI requests and responses. Potentially sensitive content will only be included if `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` is `true` |
8888
| `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` | `false` | If set to `true`, enables the capturing of OpenAI request and response content in the log events outputted by the agent. ↪ |
8989

90+
## Central configuration
91+
92+
```{applies_to}
93+
serverless: unavailable
94+
stack: preview 9.1
95+
product:
96+
edot_java: preview 1.5.0
97+
```
98+
99+
APM Agent Central Configuration lets you configure EDOT Java instances remotely, see [Central configuration docs](/reference/central-configuration.md) for more details.
100+
101+
### Central configuration settings
102+
103+
You can modify the following settings for EDOT Java through APM Agent Central Configuration:
104+
105+
| Setting | Central configuration name | Type |
106+
|---------|--------------------------|------|
107+
| Logging level | `logging_level` | Dynamic |
108+
| Turn off instrumentations | `deactivate_instrumentations` | Dynamic |
109+
| Turn off all instrumentations | `deactivate_all_instrumentations` | Dynamic |
110+
| Send traces | `send_traces` | Dynamic |
111+
| Send metrics | `send_metrics` | Dynamic |
112+
| Send logs | `send_logs` | Dynamic |
113+
114+
Dynamic settings can be changed without having to restart the application.
90115

91116
## Configuration methods
92117

docs/reference/edot-sdks/java/features.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ Set `OTEL_INSTRUMENTATION_RUNTIME_TELEMETRY_EMIT_EXPERIMENTAL_TELEMETRY` to `fal
5656

5757
{{es}} and {{kib}} work best with metrics provided in delta-temporality. Therefore, the EDOT Java changes the default value of `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` to `DELTA`. You can override this default if needed, though some provided {{kib}} dashboards will not work correctly if you do it.
5858

59+
## Central configuration
60+
61+
You can manage EDOT Java configurations through the [APM Agent Central Configuration feature](docs-content://solutions/observability/apm/apm-agent-central-configuration.md) in the Applications UI.
62+
63+
Refer to [Central configuration](/reference/central-configuration.md) for more information.
64+
5965
## Elastic Universal Profiling integration
6066

6167
[Universal Profiling](https://www.elastic.co/observability/universal-profiling) integration provides the ability to correlate traces with profiling data from the Elastic universal profiler. This feature is turned on by default on supported systems, and turned off otherwise.

docs/reference/edot-sdks/java/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ In addition to all the features of OpenTelemetry Java, with EDOT Java you have a
2929
* Optional features that can enhance OpenTelemetry data that is being sent to Elastic.
3030
* Elastic-specific processors that ensure optimal compatibility when exporting OpenTelemetry signal data to an Elastic backend like an Elastic Observability deployment.
3131
* Preconfigured collection of tracing and metrics signals, applying some opinionated defaults, such as which sources are collected by default.
32+
* Compatibility with APM Agent Central Configuration to modify the settings of the EDOT Java agent without having to restart the application.
3233

3334
Follow the step-by-step instructions in [Setup](/reference/edot-sdks/java/setup/index.md) to get started.
3435

0 commit comments

Comments
 (0)