-
Notifications
You must be signed in to change notification settings - Fork 197
Add documentation for creating APM agent keys for EDOT SDKs #4554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+102
−37
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8a99622
Add documentation for creating APM agent keys for EDOT SDKs
alexandra5000 a9dc964
Add APM agent key documentation for EDOT SDKs
alexandra5000 e653a9f
Merge branch 'main' into api-agent-keys
alexandra5000 18968c2
Merge branch 'main' into api-agent-keys
alexandra5000 2633934
Add a section distinguishing between APM agent keys and Stack Managem…
alexandra5000 d507d7f
Apply peer review comments
alexandra5000 491ba3a
Merge branch 'main' into api-agent-keys
alexandra5000 097cbcd
Merge branch 'main' into api-agent-keys
alexandra5000 e7f2109
Merge branch 'main' into api-agent-keys
alexandra5000 e03813a
Merge branch 'main' into api-agent-keys
alexandra5000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
solutions/observability/apm/_snippets/create-apm-agent-key-applications-ui.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| To create an {{apm-agent}} key: | ||
|
|
||
| 1. In {{kib}}, find **Applications** in the main menu or use the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md). | ||
| 2. Select any **Applications** page. | ||
| 3. Go to **Settings** > **Agent keys**. | ||
| 4. Select **Create {{apm-agent}} key**. | ||
| 5. Enter a name for your API key. | ||
| 6. Assign at least one privilege: | ||
| - **Agent configuration** (`config_agent:read`): Required to use agent central configuration for remote configuration. | ||
| - **Ingest** (`event:write`): Required to ingest agent events. | ||
| 7. Select **Create {{apm-agent}} key**. | ||
| 8. Copy the API key now. The key is shown only once. | ||
|
|
||
| :::{note} | ||
| API keys do not expire. | ||
| ::: | ||
|
|
||
| :::{image} /solutions/images/observability-apm-ui-api-key.png | ||
| :alt: {{apm-agent}} key creation | ||
| :screenshot: | ||
| ::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
solutions/observability/apm/opentelemetry/create-apm-agent-key-for-edot-sdks.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| navigation_title: Create APM agent key for EDOT SDKs | ||
| description: Learn how to create an APM agent key for Elastic Distribution of OpenTelemetry (EDOT) SDKs using Kibana. | ||
| applies_to: | ||
| stack: ga | ||
| serverless: ga | ||
| products: | ||
| - id: observability | ||
| - id: apm | ||
| - id: cloud-serverless | ||
| --- | ||
|
|
||
| # Create {{apm-agent}} key for EDOT SDKs [create-apm-agent-key-for-edot-sdks] | ||
|
|
||
| {{apm-agent}} keys are least-privilege API keys for ingesting {{product.apm}} data. Create these keys using the Applications UI in {{kib}}. | ||
|
|
||
| ::::{important} | ||
| {{apm-agent}} keys are sent as plain text, so they only provide security when used in combination with [TLS](/solutions/observability/apm/apm-agent-tls-communication.md). | ||
| :::: | ||
|
|
||
| ## Difference from {{stack-manage-app}} API keys | ||
|
|
||
| There are two ways to create API keys in {{kib}}: | ||
|
|
||
| * **{{stack-manage-app}} > API keys > Create API key**: Creates general-purpose API keys for {{es}} operations. For more information, refer to [{{es}} API keys](/deploy-manage/api-keys/elasticsearch-api-keys.md). | ||
| * **Applications > Settings > Agent keys > Create {{apm-agent}} key** (the method described on this page): Creates API keys specifically for ingesting {{product.apm}} data. All [{{edot}} (EDOT) SDKs](opentelemetry://reference/edot-sdks/index.md) should use this method. | ||
|
|
||
| ## Create an {{apm-agent}} key | ||
|
|
||
| The Applications UI provides a built-in workflow to create {{apm-agent}} keys. These keys have the minimum required privileges for EDOT SDKs to send data to Elastic. | ||
|
|
||
| :::{include} ../_snippets/create-apm-agent-key-applications-ui.md | ||
| ::: | ||
|
|
||
| For EDOT SDKs, the **Agent configuration** privilege enables [EDOT SDKs Central Configuration](opentelemetry://reference/central-configuration.md) for remote configuration. | ||
|
|
||
| ## Use the {{apm-agent}} key with EDOT SDKs | ||
|
|
||
| After creating the {{apm-agent}} key, configure your EDOT SDK to use it. Configuration details vary by language and deployment: | ||
|
|
||
| * **Android**: [`apiKey`](apm-agent-android://reference/edot-android/configuration.md) | ||
| * **.NET**: [`ApiKey`](apm-agent-dotnet://reference/config-reporter.md#config-api-key) | ||
| * **iOS**: [`withApiKey`](apm-agent-ios://reference/edot-ios/configuration.md#withapikey) | ||
| * **Java**: [`api_key`](elastic-otel-java://reference/edot-java/configuration.md) | ||
| * **Node.js**: [`apiKey`](elastic-otel-node://reference/edot-node/configuration.md) | ||
| * **PHP**: [`api_key`](elastic-otel-php://reference/edot-php/configuration.md) | ||
| * **Python**: [`api_key`](elastic-otel-python://reference/edot-python/configuration.md) | ||
|
|
||
| ## Required user privileges | ||
|
|
||
| To create an {{apm-agent}} key, you must have the required privileges: | ||
|
|
||
| :::::::{tab-set} | ||
|
|
||
| ::::::{tab-item} {{fleet}}-managed or {{apm-server}} binary | ||
|
|
||
| You must have the `manage_own_api_key` cluster privilege and the {{product.apm}} application privileges you plan to assign to the key. Additionally, appropriate {{kib}} Space and Feature privileges are needed to access the Applications UI. | ||
|
|
||
| For details on configuring the minimum required privileges, refer to [API keys for Elastic {{product.apm}}](/solutions/observability/apm/api-keys.md#apm-create-api-key-user). | ||
|
|
||
| :::::: | ||
|
|
||
| ::::::{tab-item} {{serverless-full}} | ||
|
|
||
| For {{observability}} {{serverless-short}} projects, the Editor role or higher is required to create and manage API keys. Refer to [Assign user roles and privileges](/deploy-manage/users-roles/cloud-organization/user-roles.md#general-assign-user-roles) for more information. | ||
|
|
||
| :::::: | ||
|
|
||
| ::::::: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.