Skip to content

Commit 0df3349

Browse files
authored
Add auth section (#474)
* Add auth section * Add note * Simplify callouts
1 parent 2797ac2 commit 0df3349

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

docs/reference/central-configuration.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,28 @@ Edit the [EDOT Collector configuration](elastic-agent://reference/edot-collector
112112

113113
Restart the Elastic Agent to also restart the Collector and apply the changes.
114114

115-
::::{note}
116115
Refer to [Secure connection](elastic-agent://reference/edot-collector/config/default-config-standalone.md#secure-connection) if you need to secure the connection between the EDOT Collector and Elastic using TLS or mutual TLS.
117-
::::
116+
118117
:::::
119118

120-
:::::{step} Set the environment variable for the SDKs
119+
:::::{step} Set the environment variables for the SDKs
121120

122121
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:
123122

124123
```sh
125124
export ELASTIC_OTEL_OPAMP_ENDPOINT="http://localhost:4320/v1/opamp"
126125
```
127126

127+
If the OpAMP server in the Collector requires authentication set the `ELASTIC_OTEL_OPAMP_HEADERS` environment variable.
128+
129+
```sh
130+
export ELASTIC_OTEL_OPAMP_HEADERS="Authorization=ApiKey an_api_key"
131+
```
132+
128133
Restart the instrumented application to apply the changes.
129134

130-
:::{note}
131-
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.
135+
:::{important}
136+
Support for the `ELASTIC_OTEL_OPAMP_HEADERS` environment variable depends on each SDK. Refer to the configuration reference of each EDOT SDK for more information.
132137
:::
133138

134139
:::::
@@ -140,8 +145,10 @@ Wait some time for the EDOT SDK to appear in {{kib}} under Agent Configuration.
140145
1. Go to **{{kib}}****Observability****Applications** and select a service.
141146
2. Select **Settings** and go to **Agent Configuration**.
142147

148+
Your application must produce and send telemetry data for the EDOT SDK to appear in Agent Configuration. This is because central configuration requires an application name as the key, which can't be defined until the application name is associated with the EDOT SDK agent after receiveing telemetry.
149+
143150
:::{note}
144-
Your application must produce and send telemetry data for the EDOT SDK to appear in Agent Configuration. This is because central configuration requires an application name as the key, which can't be defined until the application name is associated with the EDOT SDK agent after receiveing telemetry.
151+
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.
145152
:::
146153

147154
:::::

0 commit comments

Comments
 (0)