You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solutions/observability/apm/create-assign-feature-roles-to-apm-server-users.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,6 @@ applies_to:
10
10
11
11
::::{note}
12
12
Kibana custom roles are *not* compatible with [{{serverless-full}}](https://docs.elastic.co/serverless).
13
-
14
13
::::
15
14
16
15
Manage access on a feature-by-feature basis by creating several custom feature-related *roles* and assigning one or more of these roles to each *user or group* based on which features they need to access.
@@ -23,7 +22,6 @@ In general, there are three types of privileges you’ll work with when creating
23
22
***{{es}} cluster privileges**: Manage the actions a user can perform against your cluster.
24
23
***{{es}} index privileges**: Control access to the data in specific indices of your cluster.
25
24
***{{kib}} space privileges**: Grant users write or read access to features and apps within {{kib}}.
26
-
27
25
::::
28
26
29
27
The following are common roles that APM Server users might need:
@@ -32,14 +30,14 @@ The following are common roles that APM Server users might need:
32
30
*[**Central configuration management role**](#apm-privileges-agent-central-config): Allows a user to view APM Agent central configurations, which is **required** when [central configuration management](/solutions/observability/apm/apm-agent-central-configuration.md) is enabled (it is enabled by default).
33
31
*[**Monitoring role**](#apm-privileges-to-publish-monitoring): Allows a user to publish monitoring data, view monitoring data, or both.
34
32
*[**RUM source mapping role**](#apm-privileges-rum-source-mapping): Allows a user to read RUM source maps.
33
+
*[**Tail-based sampling role**](#apm-privileges-tail-based-sampling): Allows a user to use [tail-based sampling](/solutions/observability/apm/transaction-sampling.md#apm-tail-based-sampling).
35
34
36
35
::::{admonition} Example: Assigning multiple roles to an APM Server user
37
36
If you want to create an APM Server user who can use the Elastic APM Real User Monitoring (RUM) JavaScript Agent to ingest data from a frontend application and you use central configuration to manage APM agents, you would need to assign these three roles to the user:
## Create a *writer* role [apm-privileges-to-publish-events]
@@ -48,7 +46,6 @@ APM users that publish events to {{es}} *must* have privileges to write to APM d
48
46
49
47
::::{note}
50
48
This is not needed when APM Server doesn’t write to {{es}} directly. For example, in some cases you may configure APM Server to write to another output like Logstash, Kafka, or any other output supported by libbeat. In these cases, different authentication credentials will need to be passed to [`apm-server.agent.config.elasticsearch`](/solutions/observability/apm/configure-apm-agent-central-configuration.md#apm-agent-config-elasticsearch).
51
-
52
49
::::
53
50
54
51
To grant an APM Server user the required privileges for writing events to {{es}}:
@@ -69,7 +66,6 @@ If you have explicitly disabled Elastic security *and* you are *not* using tail-
69
66
70
67
::::{note}
71
68
Assign additional APM feature roles to users as needed including the *Central configuration management role*, which is [required in most cases](#apm-central-config-role-note).
72
-
73
69
::::
74
70
75
71
## Create a *central configuration management* role [apm-privileges-agent-central-config]
@@ -78,7 +74,6 @@ Assign additional APM feature roles to users as needed including the *Central co
78
74
:name: apm-central-config-role-note
79
75
80
76
The privileges included in this role are **required** for all users when [central configuration management](/solutions/observability/apm/apm-agent-central-configuration.md) is enabled (it is enabled by default). You need this role unless central configuration management has been explicitly disabled in the Applications UI.
81
-
82
77
::::
83
78
84
79
$$$apm-privileges-agent-central-config-server$$$
@@ -108,7 +103,6 @@ The previous privileges should be sufficient for APM agent central configuration
108
103
109
104
::::{note}
110
105
Assign additional APM feature roles to users as needed including the *Writer role*, which is [required in most cases](#apm-privileges-to-publish-events).
111
-
112
106
::::
113
107
114
108
::::{tip}
@@ -130,7 +124,6 @@ Looking for privileges and roles needed to use central configuration from the Ap
130
124
131
125
::::{important}
132
126
**{{ecloud}} users:** This section does not apply to [{{ech}}](https://www.elastic.co/cloud/elasticsearch-service). Monitoring on {{ecloud}} is enabled by clicking the **Enable** button in the **Monitoring** panel.
@@ -161,7 +154,6 @@ If you don’t use the `apm_system` user, you can create a custom role:
161
154
162
155
::::{note}
163
156
Assign additional APM feature roles to users as needed including the [*Writer role*](#apm-privileges-to-publish-events) and [*Central configuration management role*](#apm-central-config-role-note), both of which are required in most cases.
@@ -194,7 +186,6 @@ If you don’t use the `remote_monitoring_user` user, you can create a custom us
194
186
195
187
::::{note}
196
188
Assign additional APM feature roles to users as needed including the [*Writer role*](#apm-privileges-to-publish-events) and [*Central configuration management role*](#apm-central-config-role-note), both of which are required in most cases.
197
-
198
189
::::
199
190
200
191
### View monitoring data [apm-privileges-to-publish-monitoring-view]
@@ -216,7 +207,6 @@ To grant users the required privileges for viewing monitoring data:
216
207
217
208
::::{note}
218
209
Assign additional APM feature roles to users as needed including the [*Writer role*](#apm-privileges-to-publish-events) and [*Central configuration management role*](#apm-central-config-role-note), both of which are required in most cases.
219
-
220
210
::::
221
211
222
212
## Create a *source map* role [apm-privileges-rum-source-map]
@@ -232,7 +222,20 @@ To grant an APM Server user with the required privileges for reading RUM source
232
222
233
223
::::{note}
234
224
Assign additional APM feature roles to users as needed including the [*Writer role*](#apm-privileges-to-publish-events) and [*Central configuration management role*](#apm-central-config-role-note), both of which are required in most cases.
235
-
236
225
::::
237
226
238
-
The previous privileges should be sufficient for RUM source mapping to work properly as long as APM Server communicates with {{es}} successfully. If it fails, it may fallback to read source maps through {{kib}} if configured, which requires additional {{kib}} privileges. For more details, refer to the [{{stack}}](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-apm-sourcemaps) or [{{serverless-short}}](https://www.elastic.co/docs/api/doc/serverless/group/endpoint-apm-sourcemaps) API documentation.
227
+
The previous privileges should be sufficient for RUM source mapping to work properly as long as APM Server communicates with {{es}} successfully. If it fails, it may fallback to read source maps through {{kib}} if configured, which requires additional {{kib}} privileges. For more details, refer to the [{{stack}}](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-apm-sourcemaps) or [{{serverless-short}}](https://www.elastic.co/docs/api/doc/serverless/group/endpoint-apm-sourcemaps) API documentation.
228
+
229
+
## Create a *tail-based sampling* role [apm-privileges-tail-based-sampling]
230
+
231
+
If [tail-based sampling](/solutions/observability/apm/tail-based-sampling.md) is enabled, the user will need additional privileges.
232
+
233
+
APM Server users need the following privileges to read tail-based sampling indices from {{es}}:
234
+
235
+
| Type | Privilege | Purpose |
236
+
| --- | --- | --- |
237
+
| Index |`read` on `traces-apm.sampled` index | Allow APM Server to read tail-based sampling indices from {{es}} |
238
+
239
+
::::{note}
240
+
Assign additional APM feature roles to users as needed including the [*Writer role*](#apm-privileges-to-publish-events) and [*Central configuration management role*](#apm-central-config-role-note), both of which are required in most cases.
Most options on this page are supported by all APM Server deployment methods when writing to {{es}}. If you are using a different [output](/solutions/observability/apm/configure-output.md), tail-based sampling is *not* supported.
14
+
::::
14
15
16
+
::::{note}
17
+
Enhanced privileges are required to use tail-based sampling. For more information, refer to [Create a tail-based sampling role](/solutions/observability/apm/create-assign-feature-roles-to-apm-server-users.md#apm-privileges-tail-based-sampling).
Copy file name to clipboardExpand all lines: solutions/observability/apm/transaction-sampling.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,6 @@ serverless: unavailable
112
112
**Support for tail-based sampling**
113
113
114
114
Tail-based sampling is only supported when writing to {{es}}. If you are using a different [output](/solutions/observability/apm/configure-output.md), tail-based sampling is *not* supported.
115
-
116
115
::::
117
116
118
117
In tail-based sampling, the sampling decision for each trace is made after the trace has completed. This means all traces will be analyzed against a set of rules, or policies, which will determine the rate at which they are sampled.
@@ -261,6 +260,10 @@ stack:
261
260
serverless: unavailable
262
261
```
263
262
263
+
::::{note}
264
+
Enhanced privileges are required to use tail-based sampling. For more information, refer to [Create a tail-based sampling role](/solutions/observability/apm/create-assign-feature-roles-to-apm-server-users.md#apm-privileges-tail-based-sampling).
265
+
::::
266
+
264
267
Enable tail-based sampling with [Enable tail-based sampling](/solutions/observability/apm/tail-based-sampling.md#sampling-tail-enabled-ref). When enabled, trace events are mapped to sampling policies. Each sampling policy must specify a sample rate, and can optionally specify other conditions. All of the policy conditions must be true for a trace event to match it.
265
268
266
269
Trace events are matched to policies in the order specified. Each policy list must conclude with a default policy — one that only specifies a sample rate. This default policy is used to catch remaining trace events that don’t match a stricter policy. Requiring this default policy ensures that traces are only dropped intentionally. If you enable tail-based sampling and send a transaction that does not match any of the policies, APM Server will reject the transaction with the error `no matching policy`.
0 commit comments