|
| 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. |
0 commit comments