# Backport This will backport the following commits from `main` to `8.14`: - [Remove APM documentation from Kibana repo and Guide (#179981)](https://github.com/elastic/kibana/pull/179981) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Brandon Morelli","email":"brandon.morelli@elastic.co"},"sourceCommit":{"committedDate":"2024-08-06T20:08:07Z","message":"Remove APM documentation from Kibana repo and Guide (#179981)\n\n### Summary\r\n\r\nRelated to https://github.com/elastic/observability-docs/pull/3723.\r\n\r\n---------\r\n\r\nCo-authored-by: Colleen McGinnis <colleen.mcginnis@elastic.co>","sha":"91b80ff338810a65982d66807c4d9bb041b12fcb","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v8.14.0","v8.15.0","v8.16.0"],"number":179981,"url":"https://github.com/elastic/kibana/pull/179981","mergeCommit":{"message":"Remove APM documentation from Kibana repo and Guide (#179981)\n\n### Summary\r\n\r\nRelated to https://github.com/elastic/observability-docs/pull/3723.\r\n\r\n---------\r\n\r\nCo-authored-by: Colleen McGinnis <colleen.mcginnis@elastic.co>","sha":"91b80ff338810a65982d66807c4d9bb041b12fcb"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/190007","number":190007,"state":"MERGED","mergeCommit":{"sha":"177f02f5a66895ba143a55f2bf27b1b51eed4db2","message":"[8.15] Remove APM documentation from Kibana repo and Guide (#179981) (#190007)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.15`:\n- [Remove APM documentation from Kibana repo and Guide\n(#179981)](https://github.com/elastic/kibana/pull/179981)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Brandon\nMorelli\",\"email\":\"brandon.morelli@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2024-08-06T20:08:07Z\",\"message\":\"Remove\nAPM documentation from Kibana repo and Guide (#179981)\\n\\n###\nSummary\\r\\n\\r\\nRelated to\nhttps://github.com/elastic/observability-docs/pull/3723.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nColleen McGinnis\n<colleen.mcginnis@elastic.co>\",\"sha\":\"91b80ff338810a65982d66807c4d9bb041b12fcb\",\"branchLabelMapping\":{\"^v8.16.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"backport:prev-minor\",\"v8.14.0\",\"v8.15.0\",\"v8.16.0\"],\"title\":\"Remove\nAPM documentation from Kibana repo and\nGuide\",\"number\":179981,\"url\":\"https://github.com/elastic/kibana/pull/179981\",\"mergeCommit\":{\"message\":\"Remove\nAPM documentation from Kibana repo and Guide (#179981)\\n\\n###\nSummary\\r\\n\\r\\nRelated to\nhttps://github.com/elastic/observability-docs/pull/3723.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nColleen McGinnis\n<colleen.mcginnis@elastic.co>\",\"sha\":\"91b80ff338810a65982d66807c4d9bb041b12fcb\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.14\",\"8.15\"],\"targetPullRequestStates\":[{\"branch\":\"8.14\",\"label\":\"v8.14.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.15\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v8.16.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/179981\",\"number\":179981,\"mergeCommit\":{\"message\":\"Remove\nAPM documentation from Kibana repo and Guide (#179981)\\n\\n###\nSummary\\r\\n\\r\\nRelated to\nhttps://github.com/elastic/observability-docs/pull/3723.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nColleen McGinnis\n<colleen.mcginnis@elastic.co>\",\"sha\":\"91b80ff338810a65982d66807c4d9bb041b12fcb\"}}]}]\nBACKPORT-->\n\nCo-authored-by: Brandon Morelli <brandon.morelli@elastic.co>"}},{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/179981","number":179981,"mergeCommit":{"message":"Remove APM documentation from Kibana repo and Guide (#179981)\n\n### Summary\r\n\r\nRelated to https://github.com/elastic/observability-docs/pull/3723.\r\n\r\n---------\r\n\r\nCo-authored-by: Colleen McGinnis <colleen.mcginnis@elastic.co>","sha":"91b80ff338810a65982d66807c4d9bb041b12fcb"}}]}] BACKPORT--> --------- Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co>
|
@ -3829,7 +3829,7 @@ Review the following information about the {kib} 8.6.0 release.
|
|||
When you attempt to create an APM latency threshold rule in **Observability** > **Alerts** > **Rules** for all services or all transaction types, the request will fail with a `params invalid` error.
|
||||
|
||||
*Impact* +
|
||||
This known issue only impacts the Observability Rules page. To work around this issue, create APM latency threshold rules in the APM Alerts and Rules dialog. See {kibana-ref}/apm-alerts.html[Alerts and rules] for detailed instructions.
|
||||
This known issue only impacts the Observability Rules page. To work around this issue, create APM latency threshold rules in the APM Alerts and Rules dialog. See {observability-guide}/apm-alerts.html[Alerts and rules] for detailed instructions.
|
||||
====
|
||||
|
||||
[float]
|
||||
|
@ -5419,7 +5419,7 @@ you make the necessary updates after you upgrade to 8.3.0.
|
|||
Removes the `apm_user` role. For more information, check {kibana-pull}132790[#132790].
|
||||
|
||||
*Impact* +
|
||||
In the link:https://www.elastic.co/guide/en/kibana/8.3/xpack-apm.html[APM documentation], the `apm_user`role is replaced with the `viewer` and `editor` built-in roles.
|
||||
The `apm_user`role is replaced with the `viewer` and `editor` built-in roles.
|
||||
====
|
||||
|
||||
[discrete]
|
||||
|
|
|
@ -1,85 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[advanced-queries]]
|
||||
=== Query your data
|
||||
|
||||
Querying your APM data is an essential tool that can make finding bottlenecks in your code even more straightforward.
|
||||
|
||||
Using the query bar, a powerful data query feature, you can pass advanced queries on your data
|
||||
to filter on specific pieces of information you’re interested in.
|
||||
|
||||
The query bar comes with a handy autocomplete that helps find the fields and even provides suggestions to the data they include.
|
||||
You can select the query bar and hit the down arrow on your keyboard to begin scanning recommendations.
|
||||
|
||||
[float]
|
||||
[[apm-app-advanced-queries]]
|
||||
=== Querying in the APM app
|
||||
|
||||
When querying in the APM app, you’re merely searching and selecting data from fields in {es} documents. Queries entered
|
||||
into the query bar are also added as parameters to the URL, so it’s easy to share a specific query or view with others.
|
||||
|
||||
When you type, you can begin to see some of the transaction fields available for filtering:
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-query-bar.png[Example of the Kibana Query bar in APM app in Kibana]
|
||||
|
||||
[TIP]
|
||||
=====
|
||||
To learn more about the {kib} query language capabilities, see the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements] documentation.
|
||||
=====
|
||||
|
||||
[float]
|
||||
[[apm-app-queries]]
|
||||
==== APM app queries
|
||||
|
||||
APM queries can be handy for removing noise from your data in the <<services,Services>>, <<transactions,Transactions>>,
|
||||
<<errors,Errors>>, <<metrics,Metrics>>, and <<traces,Traces>> views.
|
||||
|
||||
For example, in the *Services* view, you can quickly view a list of all the instrumented services running on your production
|
||||
environment: `service.environment : production`. Or filter the list by including the APM agent's name and the host it’s running on:
|
||||
`service.environment : "production" and agent.name : "java" and host.name : "prod-server1"`.
|
||||
|
||||
On the *Traces* view, you might want to view failed transaction results from any of your running containers:
|
||||
`transaction.result :"FAILURE" and container.id : *`.
|
||||
|
||||
On the *Transactions* view, you may want to list only the slower transactions than a specified time threshold: `transaction.duration.us > 2000000`.
|
||||
Or filter the list by including the service version and the Kubernetes pod it's running on:
|
||||
`transaction.duration.us > 2000000 and service.version : "7.12.0" and kubernetes.pod.name : "pod-5468b47f57-pqk2m"`.
|
||||
|
||||
[float]
|
||||
[[discover-advanced-queries]]
|
||||
=== Querying in Discover
|
||||
|
||||
Alternatively, you can query your APM documents in {kibana-ref}/discover.html[*Discover*].
|
||||
Querying documents in *Discover* works the same way as queries in the APM app,
|
||||
and *Discover* supports all of the example APM app queries shown on this page.
|
||||
|
||||
[float]
|
||||
[[discover-queries]]
|
||||
==== Discover queries
|
||||
|
||||
One example where you may want to make use of *Discover*
|
||||
is to view _all_ transactions for an endpoint instead of just a sample.
|
||||
|
||||
TIP: Starting in v7.6, you can view ten samples per bucket in the APM app, instead of just one.
|
||||
|
||||
Use the APM app to find a transaction name and time bucket that you're interested in learning more about.
|
||||
Then, switch to *Discover* and make a search:
|
||||
|
||||
["source","sh"]
|
||||
-----
|
||||
processor.event: "transaction" AND transaction.name: "<TRANSACTION_NAME_HERE>" and transaction.duration.us > 13000 and transaction.duration.us < 14000`
|
||||
-----
|
||||
|
||||
In this example, we're interested in viewing all of the `APIRestController#customers` transactions
|
||||
that took between 13 and 14 milliseconds. Here's what Discover returns:
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/advanced-discover.png[View all transactions in bucket]
|
||||
|
||||
You can now explore the data until you find a specific transaction that you're interested in.
|
||||
Copy that transaction's `transaction.id` and paste it into the APM app to view the data in the context of the APM app:
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/specific-transaction-search.png[View specific transaction in apm app]
|
||||
[role="screenshot"]
|
||||
image::apm/images/specific-transaction.png[View specific transaction in apm app]
|
|
@ -1,56 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[agent-configuration]]
|
||||
=== APM Agent central configuration
|
||||
|
||||
++++
|
||||
<titleabbrev>Configure APM agents with central config</titleabbrev>
|
||||
++++
|
||||
|
||||
APM Agent configuration allows you to fine-tune your APM agent configuration from within the APM app.
|
||||
Changes are automatically propagated to your APM agents, so there's no need to redeploy.
|
||||
|
||||
To get started, choose the services and environments you wish to configure.
|
||||
The APM app will let you know when your APM agents have applied your configurations.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-agent-configuration.png[APM Agent configuration in Kibana]
|
||||
|
||||
[float]
|
||||
==== Precedence
|
||||
|
||||
Configurations set from the APM app take precedence over configurations set locally in each APM agent.
|
||||
However, if APM Server is slow to respond, is offline, reports an error, etc.,
|
||||
APM agents will use local defaults until they're able to update the configuration.
|
||||
For this reason, it is still essential to set custom default configurations locally in each of your APM agents.
|
||||
|
||||
[float]
|
||||
==== Supported configurations
|
||||
|
||||
Each APM agent has a list of supported configurations.
|
||||
After selecting a Service name and environment in the APM app,
|
||||
a list of all supported configuration options,
|
||||
including descriptions and default values, will be displayed.
|
||||
|
||||
Supported configurations are also tagged with the image:./images/dynamic-config.svg[] badge in each APM agent's configuration reference:
|
||||
|
||||
[horizontal]
|
||||
Android agent:: {apm-android-ref}/configuration.html[Configuration reference]
|
||||
Go agent:: {apm-go-ref}/configuration.html[Configuration reference]
|
||||
iOS agent:: {apm-ios-ref}/configuration.html[Configuration reference]
|
||||
Java agent:: {apm-java-ref}/configuration.html[Configuration reference]
|
||||
.NET agent:: {apm-dotnet-ref}/configuration.html[Configuration reference]
|
||||
Node.js agent:: {apm-node-ref}/configuration.html[Configuration reference]
|
||||
PHP agent:: {apm-php-ref}/configuration.html[Configuration reference]
|
||||
Python agent:: {apm-py-ref}/configuration.html[Configuration reference]
|
||||
Ruby agent:: {apm-ruby-ref}/configuration.html[Configuration reference]
|
||||
Real User Monitoring (RUM) agent:: {apm-rum-ref}/configuration.html[Configuration reference]
|
||||
|
||||
[float]
|
||||
==== APM Server configuration
|
||||
|
||||
For most users, APM agent configuration should work out-of-the-box.
|
||||
If you run into trouble, it may be because you're not using the {es} output,
|
||||
or because your {es} credentials don't have sufficient privileges.
|
||||
|
||||
See {apm-guide-ref}/configure-agent-config.html[configure APM agent configuration]
|
||||
to learn how to configure APM Server to avoid these problems.
|
|
@ -1,18 +0,0 @@
|
|||
[[agent-explorer]]
|
||||
=== APM Agent explorer
|
||||
|
||||
++++
|
||||
<titleabbrev>Identify deployment details for APM agents</titleabbrev>
|
||||
++++
|
||||
|
||||
beta::[]
|
||||
|
||||
APM agent explorer provides a centralized panel to identify APM agent deployment details, like service name, environment, instances, and agent name, version, and documentation.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-agent-explorer.png[APM agent explorer]
|
||||
|
||||
Select an APM agent to expand it and view the details of each agent instance.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-agent-explorer-flyout.png[APM agent explorer flyout]
|
|
@ -1,826 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[apm-api]]
|
||||
== APM app API
|
||||
|
||||
++++
|
||||
<titleabbrev>REST API</titleabbrev>
|
||||
++++
|
||||
|
||||
Some APM app features are provided via a REST API:
|
||||
|
||||
* <<agent-config-api>>
|
||||
* <<apm-annotation-api>>
|
||||
* <<rum-sourcemap-api>>
|
||||
* <<agent-key-api>>
|
||||
|
||||
[float]
|
||||
[[apm-api-example]]
|
||||
=== Using the APIs
|
||||
|
||||
// The following content is reused throughout the API docs
|
||||
// tag::using-the-APIs[]
|
||||
Interact with APM APIs using cURL or another API tool.
|
||||
All APM APIs are Kibana APIs, not Elasticsearch APIs;
|
||||
because of this, the Kibana dev tools console cannot be used to interact with APM APIs.
|
||||
|
||||
For all APM APIs, you must use a request header.
|
||||
Supported headers are `Authorization`, `kbn-xsrf`, and `Content-Type`.
|
||||
|
||||
`Authorization: ApiKey {credentials}`::
|
||||
Kibana supports token-based authentication with the Elasticsearch API key service.
|
||||
The API key returned by the {ref}/security-api-create-api-key.html[Elasticsearch create API key API]
|
||||
can be used by sending a request with an `Authorization` header that has a value of `ApiKey` followed by the `{credentials}`,
|
||||
where `{credentials}` is the base64 encoding of `id` and `api_key` joined by a colon.
|
||||
+
|
||||
Alternatively, you can create a user and use their username and password to authenticate API access: `-u $USER:$PASSWORD`.
|
||||
+
|
||||
Whether using `Authorization: ApiKey {credentials}`, or `-u $USER:$PASSWORD`,
|
||||
users interacting with APM APIs must have <<apm-app-api-user,sufficient privileges>>.
|
||||
|
||||
`kbn-xsrf: true`::
|
||||
By default, you must use `kbn-xsrf` for all API calls, except in the following scenarios:
|
||||
|
||||
* The API endpoint uses the `GET` or `HEAD` operations
|
||||
* The path is allowed using the <<settings-xsrf-allowlist, `server.xsrf.allowlist`>> setting
|
||||
* XSRF protections are disabled using the <<settings-xsrf-disableProtection, `server.xsrf.disableProtection`>> setting
|
||||
|
||||
`Content-Type: application/json`::
|
||||
Applicable only when you send a payload in the API request.
|
||||
{kib} API requests and responses use JSON.
|
||||
Typically, if you include the `kbn-xsrf` header, you must also include the `Content-Type` header.
|
||||
// end::using-the-APIs[]
|
||||
|
||||
Here's an example CURL request that adds an annotation to the APM app:
|
||||
|
||||
[source,curl]
|
||||
----
|
||||
curl -X POST \
|
||||
http://localhost:5601/api/apm/services/opbeans-java/annotation \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'kbn-xsrf: true' \
|
||||
-H 'Authorization: Basic YhUlubWZhM0FDbnlQeE6WRtaW49FQmSGZ4RUWXdX' \
|
||||
-d '{
|
||||
"@timestamp": "2020-05-11T10:31:30.452Z",
|
||||
"service": {
|
||||
"version": "1.2"
|
||||
},
|
||||
"message": "Revert upgrade",
|
||||
"tags": [
|
||||
"elastic.co", "customer"
|
||||
]
|
||||
}'
|
||||
----
|
||||
|
||||
[float]
|
||||
[[kibana-api]]
|
||||
=== Kibana API
|
||||
|
||||
In addition to the APM specific API endpoints, Kibana provides its own <<api,REST API>>
|
||||
which you can use to automate certain aspects of configuring and deploying Kibana.
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[agent-config-api]]
|
||||
=== Agent Configuration API
|
||||
|
||||
The APM agent configuration API allows you to fine-tune your APM agent configuration,
|
||||
without needing to redeploy your application.
|
||||
|
||||
The following APM agent configuration APIs are available:
|
||||
|
||||
* <<apm-update-config>> to create or update an APM agent configuration
|
||||
* <<apm-delete-config>> to delete an APM agent configuration.
|
||||
* <<apm-list-config>> to list all APM agent configurations.
|
||||
* <<apm-search-config>> to search for an APM agent configuration.
|
||||
|
||||
[float]
|
||||
[[use-agent-config-api]]
|
||||
==== How to use APM APIs
|
||||
|
||||
.Expand for required headers, privileges, and usage details
|
||||
[%collapsible%closed]
|
||||
======
|
||||
include::api.asciidoc[tag=using-the-APIs]
|
||||
======
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[apm-update-config]]
|
||||
==== Create or update configuration
|
||||
|
||||
[[apm-update-config-req]]
|
||||
===== Request
|
||||
|
||||
`PUT /api/apm/settings/agent-configuration`
|
||||
|
||||
[role="child_attributes"]
|
||||
[[apm-update-config-req-body]]
|
||||
===== Request body
|
||||
|
||||
`service`::
|
||||
(required, object) Service identifying the configuration to create or update.
|
||||
+
|
||||
.Properties of `service`
|
||||
[%collapsible%open]
|
||||
======
|
||||
`name` :::
|
||||
(required, string) Name of service
|
||||
|
||||
`environment` :::
|
||||
(optional, string) Environment of service
|
||||
======
|
||||
|
||||
`settings`::
|
||||
(required) Key/value object with option name and option value.
|
||||
|
||||
`agent_name`::
|
||||
(optional) The agent name is used by the UI to determine which settings to display.
|
||||
|
||||
|
||||
[[apm-update-config-example]]
|
||||
===== Example
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
PUT /api/apm/settings/agent-configuration
|
||||
{
|
||||
"service": {
|
||||
"name": "frontend",
|
||||
"environment": "production"
|
||||
},
|
||||
"settings": {
|
||||
"transaction_sample_rate": "0.4",
|
||||
"capture_body": "off",
|
||||
"transaction_max_spans": "500"
|
||||
},
|
||||
"agent_name": "nodejs"
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
|
||||
[[apm-delete-config]]
|
||||
==== Delete configuration
|
||||
|
||||
[[apm-delete-config-req]]
|
||||
===== Request
|
||||
|
||||
`DELETE /api/apm/settings/agent-configuration`
|
||||
|
||||
[role="child_attributes"]
|
||||
[[apm-delete-config-req-body]]
|
||||
===== Request body
|
||||
`service`::
|
||||
(required, object) Service identifying the configuration to delete
|
||||
+
|
||||
.Properties of `service`
|
||||
[%collapsible%open]
|
||||
======
|
||||
`name` :::
|
||||
(required, string) Name of service
|
||||
|
||||
`environment` :::
|
||||
(optional, string) Environment of service
|
||||
======
|
||||
|
||||
|
||||
[[apm-delete-config-example]]
|
||||
===== Example
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
DELETE /api/apm/settings/agent-configuration
|
||||
{
|
||||
"service" : {
|
||||
"name": "frontend",
|
||||
"environment": "production"
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[apm-list-config]]
|
||||
==== List configuration
|
||||
|
||||
[[apm-list-config-req]]
|
||||
===== Request
|
||||
|
||||
`GET /api/apm/settings/agent-configuration`
|
||||
|
||||
[[apm-list-config-body]]
|
||||
===== Response body
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
[
|
||||
{
|
||||
"agent_name": "go",
|
||||
"service": {
|
||||
"name": "opbeans-go",
|
||||
"environment": "production"
|
||||
},
|
||||
"settings": {
|
||||
"transaction_sample_rate": "1",
|
||||
"capture_body": "off",
|
||||
"transaction_max_spans": "200"
|
||||
},
|
||||
"@timestamp": 1581934104843,
|
||||
"applied_by_agent": false,
|
||||
"etag": "1e58c178efeebae15c25c539da740d21dee422fc"
|
||||
},
|
||||
{
|
||||
"agent_name": "go",
|
||||
"service": {
|
||||
"name": "opbeans-go"
|
||||
},
|
||||
"settings": {
|
||||
"transaction_sample_rate": "1",
|
||||
"capture_body": "off",
|
||||
"transaction_max_spans": "300"
|
||||
},
|
||||
"@timestamp": 1581934111727,
|
||||
"applied_by_agent": false,
|
||||
"etag": "3eed916d3db434d9fb7f039daa681c7a04539a64"
|
||||
},
|
||||
{
|
||||
"agent_name": "nodejs",
|
||||
"service": {
|
||||
"name": "frontend"
|
||||
},
|
||||
"settings": {
|
||||
"transaction_sample_rate": "1",
|
||||
},
|
||||
"@timestamp": 1582031336265,
|
||||
"applied_by_agent": false,
|
||||
"etag": "5080ed25785b7b19f32713681e79f46996801a5b"
|
||||
}
|
||||
]
|
||||
--------------------------------------------------
|
||||
|
||||
[[apm-list-config-example]]
|
||||
===== Example
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
GET /api/apm/settings/agent-configuration
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[apm-search-config]]
|
||||
==== Search configuration
|
||||
|
||||
[[apm-search-config-req]]
|
||||
===== Request
|
||||
|
||||
`POST /api/apm/settings/agent-configuration/search`
|
||||
|
||||
[role="child_attributes"]
|
||||
[[apm-search-config-req-body]]
|
||||
===== Request body
|
||||
|
||||
`service`::
|
||||
(required, object) Service identifying the configuration.
|
||||
+
|
||||
.Properties of `service`
|
||||
[%collapsible%open]
|
||||
======
|
||||
`name` :::
|
||||
(required, string) Name of service
|
||||
|
||||
`environment` :::
|
||||
(optional, string) Environment of service
|
||||
======
|
||||
|
||||
`etag`::
|
||||
(required) etag is sent by the APM agent to indicate the etag of the last successfully applied configuration. If the etag matches an existing configuration its `applied_by_agent` property will be set to `true`. Every time a configuration is edited `applied_by_agent` is reset to `false`.
|
||||
|
||||
[[apm-search-config-body]]
|
||||
===== Response body
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"_index": ".apm-agent-configuration",
|
||||
"_id": "CIaqXXABmQCdPphWj8EJ",
|
||||
"_score": 2,
|
||||
"_source": {
|
||||
"agent_name": "nodejs",
|
||||
"service": {
|
||||
"name": "frontend"
|
||||
},
|
||||
"settings": {
|
||||
"transaction_sample_rate": "1",
|
||||
},
|
||||
"@timestamp": 1582031336265,
|
||||
"applied_by_agent": false,
|
||||
"etag": "5080ed25785b7b19f32713681e79f46996801a5b"
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
[[apm-search-config-example]]
|
||||
===== Example
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
POST /api/apm/settings/agent-configuration/search
|
||||
{
|
||||
"etag": "1e58c178efeebae15c25c539da740d21dee422fc",
|
||||
"service" : {
|
||||
"name": "frontend",
|
||||
"environment": "production"
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[apm-annotation-api]]
|
||||
=== Annotation API
|
||||
|
||||
The Annotation API allows you to annotate visualizations in the APM app with significant events, like deployments,
|
||||
allowing you to easily see how these events are impacting the performance of your existing applications.
|
||||
|
||||
By default, annotations are stored in a newly created `observability-annotations` index.
|
||||
The name of this index can be changed in your `config.yml` by editing `xpack.observability.annotations.index`.
|
||||
If you change the default index name, you'll also need to <<apm-app-annotation-user-create,update your user privileges>> accordingly.
|
||||
|
||||
The following APIs are available:
|
||||
|
||||
* <<apm-annotation-create>> to create an annotation for APM.
|
||||
// * <<obs-annotation-create>> POST /api/observability/annotation
|
||||
// * <<obs-annotation-get>> GET /api/observability/annotation/:id
|
||||
// * <<obs-annotation-delete>> DELETE /api/observability/annotation/:id
|
||||
|
||||
[float]
|
||||
[[use-annotation-api]]
|
||||
==== How to use APM APIs
|
||||
|
||||
.Expand for required headers, privileges, and usage details
|
||||
[%collapsible%closed]
|
||||
======
|
||||
include::api.asciidoc[tag=using-the-APIs]
|
||||
======
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[apm-annotation-create]]
|
||||
==== Create or update annotation
|
||||
|
||||
[[apm-annotation-config-req]]
|
||||
===== Request
|
||||
|
||||
`POST /api/apm/services/:serviceName/annotation`
|
||||
|
||||
[role="child_attributes"]
|
||||
[[apm-annotation-config-req-body]]
|
||||
===== Request body
|
||||
|
||||
`service`::
|
||||
(required, object) Service identifying the configuration to create or update.
|
||||
+
|
||||
.Properties of `service`
|
||||
[%collapsible%open]
|
||||
======
|
||||
`version` :::
|
||||
(required, string) Version of service.
|
||||
|
||||
`environment` :::
|
||||
(optional, string) Environment of service.
|
||||
======
|
||||
|
||||
`@timestamp`::
|
||||
(required, string) The date and time of the annotation. Must be in https://www.w3.org/TR/NOTE-datetime[ISO 8601] format.
|
||||
|
||||
`message`::
|
||||
(optional, string) The message displayed in the annotation. Defaults to `service.version`.
|
||||
|
||||
`tags`::
|
||||
(optional, array) Tags are used by the APM app to distinguish APM annotations from other annotations.
|
||||
Tags may have additional functionality in future releases. Defaults to `[apm]`.
|
||||
While you can add additional tags, you cannot remove the `apm` tag.
|
||||
|
||||
[[apm-annotation-config-example]]
|
||||
===== Example
|
||||
|
||||
The following example creates an annotation for a service named `opbeans-java`.
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
curl -X POST \
|
||||
http://localhost:5601/api/apm/services/opbeans-java/annotation \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'kbn-xsrf: true' \
|
||||
-H 'Authorization: Basic YhUlubWZhM0FDbnlQeE6WRtaW49FQmSGZ4RUWXdX' \
|
||||
-d '{
|
||||
"@timestamp": "2020-05-08T10:31:30.452Z",
|
||||
"service": {
|
||||
"version": "1.2"
|
||||
},
|
||||
"message": "Deployment 1.2"
|
||||
}'
|
||||
--------------------------------------------------
|
||||
|
||||
[[apm-annotation-config-body]]
|
||||
===== Response body
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"_index": "observability-annotations",
|
||||
"_id": "Lc9I93EBh6DbmkeV7nFX",
|
||||
"_version": 1,
|
||||
"_seq_no": 12,
|
||||
"_primary_term": 1,
|
||||
"found": true,
|
||||
"_source": {
|
||||
"message": "Deployment 1.2",
|
||||
"@timestamp": "2020-05-08T10:31:30.452Z",
|
||||
"service": {
|
||||
"version": "1.2",
|
||||
"name": "opbeans-java"
|
||||
},
|
||||
"tags": [
|
||||
"apm",
|
||||
"elastic.co",
|
||||
"customer"
|
||||
],
|
||||
"annotation": {
|
||||
"type": "deployment"
|
||||
},
|
||||
"event": {
|
||||
"created": "2020-05-09T02:34:43.937Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[rum-sourcemap-api]]
|
||||
=== RUM source map API
|
||||
|
||||
IMPORTANT: This endpoint is only compatible with the
|
||||
{apm-guide-ref}/index.html[APM integration for Elastic Agent].
|
||||
|
||||
A source map allows minified files to be mapped back to original source code --
|
||||
allowing you to maintain the speed advantage of minified code,
|
||||
without losing the ability to quickly and easily debug your application.
|
||||
|
||||
For best results, uploading source maps should become a part of your deployment procedure,
|
||||
and not something you only do when you see unhelpful errors.
|
||||
That’s because uploading source maps after errors happen won’t make old errors magically readable --
|
||||
errors must occur again for source mapping to occur.
|
||||
|
||||
The following APIs are available:
|
||||
|
||||
* <<rum-sourcemap-post>>
|
||||
* <<rum-sourcemap-get>>
|
||||
* <<rum-sourcemap-delete>>
|
||||
|
||||
[float]
|
||||
[[limit-sourcemap-api]]
|
||||
==== Max payload size
|
||||
|
||||
{kib}'s maximum payload size is 1mb.
|
||||
If you attempt to upload a source map that exceeds the max payload size, you will get a `413` error.
|
||||
|
||||
Before uploading source maps that exceed this default, change the maximum payload size allowed by {kib}
|
||||
with the <<server-maxPayload,`server.maxPayload`>> variable.
|
||||
|
||||
[float]
|
||||
[[use-sourcemap-api]]
|
||||
==== How to use APM APIs
|
||||
|
||||
.Expand for required headers, privileges, and usage details
|
||||
[%collapsible%closed]
|
||||
======
|
||||
include::api.asciidoc[tag=using-the-APIs]
|
||||
======
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[rum-sourcemap-post]]
|
||||
==== Create or update source map
|
||||
|
||||
Create or update a source map for a specific service and version.
|
||||
|
||||
[[rum-sourcemap-post-privs]]
|
||||
===== Privileges
|
||||
|
||||
The user accessing this endpoint requires `All` Kibana privileges for the {beat_kib_app} feature.
|
||||
For more information, see <<kibana-privileges>>.
|
||||
|
||||
[[apm-sourcemap-post-req]]
|
||||
===== Request
|
||||
|
||||
`POST /api/apm/sourcemaps`
|
||||
|
||||
[role="child_attributes"]
|
||||
[[apm-sourcemap-post-req-body]]
|
||||
===== Request body
|
||||
|
||||
`service_name`::
|
||||
(required, string) The name of the service that the service map should apply to.
|
||||
|
||||
`service_version`::
|
||||
(required, string) The version of the service that the service map should apply to.
|
||||
|
||||
`bundle_filepath`::
|
||||
(required, string) The absolute path of the final bundle as used in the web application.
|
||||
|
||||
`sourcemap`::
|
||||
(required, string or file upload) The source map. It must follow the
|
||||
https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k[source map revision 3 proposal].
|
||||
|
||||
[[apm-sourcemap-post-example]]
|
||||
===== Examples
|
||||
|
||||
The following example uploads a source map for a service named `foo` and a service version of `1.0.0`:
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
curl -X POST "http://localhost:5601/api/apm/sourcemaps" \
|
||||
-H 'Content-Type: multipart/form-data' \
|
||||
-H 'kbn-xsrf: true' \
|
||||
-H 'Authorization: ApiKey ${YOUR_API_KEY}' \
|
||||
-F 'service_name="foo"' \
|
||||
-F 'service_version="1.0.0"' \
|
||||
-F 'bundle_filepath="/test/e2e/general-usecase/bundle.js"' \
|
||||
-F 'sourcemap="{\"version\":3,\"file\":\"static/js/main.chunk.js\",\"sources\":[\"fleet-source-map-client/src/index.css\",\"fleet-source-map-client/src/App.js\",\"webpack:///./src/index.css?bb0a\",\"fleet-source-map-client/src/index.js\",\"fleet-source-map-client/src/reportWebVitals.js\"],\"sourcesContent\":[\"content\"],\"mappings\":\"mapping\",\"sourceRoot\":\"\"}"' <1>
|
||||
--------------------------------------------------
|
||||
<1> Alternatively, upload the source map as a file with `-F 'sourcemap=@path/to/source_map/bundle.js.map'`
|
||||
|
||||
[[apm-sourcemap-post-body]]
|
||||
===== Response body
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"type": "sourcemap",
|
||||
"identifier": "foo-1.0.0",
|
||||
"relative_url": "/api/fleet/artifacts/foo-1.0.0/644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456",
|
||||
"body": "eJyFkL1OwzAUhd/Fc+MbYMuCEBIbHRjKgBgc96R16tiWr1OQqr47NwqJxEK3q/PzWccXxchnZ7E1A1SjuhjVZtF2yOxiEPlO17oWox3D3uPFeSRTjmJQARfCPeiAgGx8NTKsYdAc1T3rwaSJGcds8Sp3c1HnhfywUZ3QhMTFFGepZxqMC9oex3CS9tpk1XyozgOlmoVKuJX1DqEQZ0su7PGtLU+V/3JPKc3cL7TJ2FNDRPov4bFta3MDM4f7W69lpJjLO9qdK8bzVPhcJz3HUCQ4LbO/p5hCSC4cZPByrp/wFqOklbpefwAhzpqI",
|
||||
"created": "2021-07-09T20:47:44.812Z",
|
||||
"id": "apm:foo-1.0.0-644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456",
|
||||
"compressionAlgorithm": "zlib",
|
||||
"decodedSha256": "644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456",
|
||||
"decodedSize": 441,
|
||||
"encodedSha256": "024c72749c3e3dd411b103f7040ae62633558608f480bce4b108cf5b2275bd24",
|
||||
"encodedSize": 237,
|
||||
"encryptionAlgorithm": "none",
|
||||
"packageName": "apm"
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[rum-sourcemap-get]]
|
||||
==== Get source maps
|
||||
|
||||
Returns an array of Fleet artifacts, including source map uploads.
|
||||
|
||||
[[rum-sourcemap-get-privs]]
|
||||
===== Privileges
|
||||
|
||||
The user accessing this endpoint requires `Read` or `All` Kibana privileges for the {beat_kib_app} feature.
|
||||
For more information, see <<kibana-privileges>>.
|
||||
|
||||
[[apm-sourcemap-get-req]]
|
||||
===== Request
|
||||
|
||||
`GET /api/apm/sourcemaps`
|
||||
|
||||
[[apm-sourcemap-get-example]]
|
||||
===== Example
|
||||
|
||||
The following example requests all uploaded source maps:
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
curl -X GET "http://localhost:5601/api/apm/sourcemaps" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'kbn-xsrf: true' \
|
||||
-H 'Authorization: ApiKey ${YOUR_API_KEY}'
|
||||
--------------------------------------------------
|
||||
|
||||
[[apm-sourcemap-get-body]]
|
||||
===== Response body
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"artifacts": [
|
||||
{
|
||||
"type": "sourcemap",
|
||||
"identifier": "foo-1.0.0",
|
||||
"relative_url": "/api/fleet/artifacts/foo-1.0.0/644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456",
|
||||
"body": {
|
||||
"serviceName": "foo",
|
||||
"serviceVersion": "1.0.0",
|
||||
"bundleFilepath": "/test/e2e/general-usecase/bundle.js",
|
||||
"sourceMap": {
|
||||
"version": 3,
|
||||
"file": "static/js/main.chunk.js",
|
||||
"sources": [
|
||||
"fleet-source-map-client/src/index.css",
|
||||
"fleet-source-map-client/src/App.js",
|
||||
"webpack:///./src/index.css?bb0a",
|
||||
"fleet-source-map-client/src/index.js",
|
||||
"fleet-source-map-client/src/reportWebVitals.js"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"content"
|
||||
],
|
||||
"mappings": "mapping",
|
||||
"sourceRoot": ""
|
||||
}
|
||||
},
|
||||
"created": "2021-07-09T20:47:44.812Z",
|
||||
"id": "apm:foo-1.0.0-644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456",
|
||||
"compressionAlgorithm": "zlib",
|
||||
"decodedSha256": "644fd5a997d1ddd90ee131ba18e2b3d03931d89dd1fe4599143c0b3264b3e456",
|
||||
"decodedSize": 441,
|
||||
"encodedSha256": "024c72749c3e3dd411b103f7040ae62633558608f480bce4b108cf5b2275bd24",
|
||||
"encodedSize": 237,
|
||||
"encryptionAlgorithm": "none",
|
||||
"packageName": "apm"
|
||||
}
|
||||
]
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[rum-sourcemap-delete]]
|
||||
==== Delete source map
|
||||
|
||||
Delete a previously uploaded source map.
|
||||
|
||||
[[rum-sourcemap-delete-privs]]
|
||||
===== Privileges
|
||||
|
||||
The user accessing this endpoint requires `All` Kibana privileges for the {beat_kib_app} feature.
|
||||
For more information, see <<kibana-privileges>>.
|
||||
|
||||
[[apm-sourcemap-delete-req]]
|
||||
===== Request
|
||||
|
||||
`DELETE /api/apm/sourcemaps/:id`
|
||||
|
||||
[[apm-sourcemap-delete-example]]
|
||||
===== Example
|
||||
|
||||
The following example deletes a source map with an id of `apm:foo-1.0.0-644fd5a9`:
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
curl -X DELETE "http://localhost:5601/api/apm/sourcemaps/apm:foo-1.0.0-644fd5a9" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'kbn-xsrf: true' \
|
||||
-H 'Authorization: ApiKey ${YOUR_API_KEY}'
|
||||
--------------------------------------------------
|
||||
|
||||
[[apm-sourcemap-delete-body]]
|
||||
===== Response body
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{}
|
||||
--------------------------------------------------
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[agent-key-api]]
|
||||
=== APM agent Key API
|
||||
|
||||
The APM agent Key API allows you to configure APM agent keys to authorize requests from APM agents to the APM Server.
|
||||
|
||||
The following APM agent key APIs are available:
|
||||
|
||||
* <<apm-create-agent-key>> to create an APM agent key
|
||||
|
||||
[float]
|
||||
[[use-agent-key-api]]
|
||||
==== How to use APM APIs
|
||||
|
||||
.Expand for required headers, privileges, and usage details
|
||||
[%collapsible%closed]
|
||||
======
|
||||
include::api.asciidoc[tag=using-the-APIs]
|
||||
======
|
||||
|
||||
////
|
||||
*******************************************************
|
||||
////
|
||||
|
||||
[[apm-create-agent-key]]
|
||||
==== Create agent key
|
||||
|
||||
Create an APM agent API key. Specify API key privileges in the request body at creation time.
|
||||
|
||||
[[apm-create-agent-key-privileges]]
|
||||
===== Privileges
|
||||
|
||||
The user creating an APM agent API key must have at least the `manage_own_api_key` cluster privilege
|
||||
and the APM application-level privileges that it wishes to grant.
|
||||
|
||||
====== Example role
|
||||
|
||||
The example below uses the Kibana <<role-management-api,role management API>> to create a role named `apm_agent_key_user`.
|
||||
Create and assign this role to a user that wishes to create APM agent API keys.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
POST /_security/role/apm_agent_key_user
|
||||
{
|
||||
"cluster": ["manage_own_api_key"],
|
||||
"applications": [{
|
||||
"application": "apm",
|
||||
"privileges": ["event:write", "config_agent:read"],
|
||||
"resources": ["*"]
|
||||
}]
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
[[apm-create-agent-key-req]]
|
||||
===== Request
|
||||
|
||||
`POST /api/apm/agent_keys`
|
||||
|
||||
[role="child_attributes"]
|
||||
[[apm-create-agent-key-req-body]]
|
||||
===== Request body
|
||||
|
||||
`name`::
|
||||
(required, string) Name of the APM agent key.
|
||||
|
||||
`privileges`::
|
||||
(required, array) APM agent key privileges. It can take one or more of the following values:
|
||||
|
||||
- `event:write`. Required for ingesting APM agent events.
|
||||
- `config_agent:read`. Required for APM agents to read agent configuration remotely.
|
||||
|
||||
[[apm-agent-key-create-example]]
|
||||
===== Example
|
||||
|
||||
[source,curl]
|
||||
--------------------------------------------------
|
||||
POST /api/apm/agent_keys
|
||||
{
|
||||
"name": "apm-key",
|
||||
"privileges": ["event:write", "config_agent:read"]
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
[[apm-agent-key-create-body]]
|
||||
===== Response body
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"agentKey": {
|
||||
"id": "3DCLmn0B3ZMhLUa7WBG9",
|
||||
"name": "apm-key",
|
||||
"api_key": "PjGloCGOTzaZr8ilUPvkjA",
|
||||
"encoded": "M0RDTG1uMEIzWk1oTFVhN1dCRzk6UGpHbG9DR09UemFacjhpbFVQdmtqQQ=="
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
Once created, you can copy the API key (Base64 encoded) and use it to to authorize requests from APM agents to the APM Server.
|
|
@ -1,175 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[apm-alerts]]
|
||||
=== Alerts and rules
|
||||
|
||||
++++
|
||||
<titleabbrev>Create an alert</titleabbrev>
|
||||
++++
|
||||
|
||||
The APM app allows you to define **rules** to detect complex conditions within your APM data
|
||||
and trigger built-in **actions** when those conditions are met.
|
||||
|
||||
The following **rules** are supported:
|
||||
|
||||
* **Threshold rule**:
|
||||
Alert when the latency or failed transaction rate is abnormal.
|
||||
Threshold rules can be as broad or as granular as you'd like, enabling you to define exactly when you want to be alerted--whether that's at the environment level, service name level, transaction type level, and/or transaction name level.
|
||||
* **Anomaly rule**:
|
||||
Alert when either the latency of a service is anomalous. Anomaly rules can be set at the environment level, service level, and/or transaction type level.
|
||||
* **Error count rule**:
|
||||
Alert when the number of errors in a service exceeds a defined threshold. Error count rules can be set at the environment level, service level, and error group level.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-alert.png[Create an alert in the APM app]
|
||||
|
||||
Below, we'll walk through the creation of two APM rules.
|
||||
|
||||
For a complete walkthrough of the **Create rule** flyout panel, including detailed information on each configurable property,
|
||||
see Kibana's <<create-edit-rules,create and edit rules>>.
|
||||
|
||||
[float]
|
||||
[[apm-create-transaction-alert]]
|
||||
=== Example: create a latency anomaly rule
|
||||
|
||||
Latency anomaly rules trigger when the latency of a service is abnormal.
|
||||
Because some parts of an application are more important than others, and have a different
|
||||
tolerance for latency, we'll target a specific transaction within a service.
|
||||
|
||||
Before continuing, identify the service name, transaction type, and environment that you'd like to create a latency anomaly rule for.
|
||||
This guide will create an alert for all services based on the following criteria:
|
||||
|
||||
* Service: `{your_service.name}`
|
||||
* Transaction: `{your_transaction.name}`
|
||||
* Environment: `{your_service.environment}`
|
||||
* Severity level: critical
|
||||
* Check every five minutes
|
||||
* Send an alert to a Slack channel when the rule status changes
|
||||
|
||||
From any page in the APM app, select **Alerts and rules** > **Create anomaly rule**.
|
||||
Change the name of the rule, but do not edit the tags.
|
||||
|
||||
Based on the criteria above, define the following rule details:
|
||||
|
||||
* **Service** - `{your_service.name}`
|
||||
* **Type** - `{your_transaction.name}`
|
||||
* **Environment** - `{your_service.environment}`
|
||||
* **Has anomaly with severity** - `critical`
|
||||
* **Check every** - `5 minutes`
|
||||
|
||||
Next, add a connector type. Multiple connectors can be selected, but in this example we're interested in Slack.
|
||||
Select **Slack** > **Create a connector**.
|
||||
Enter a name for the connector,
|
||||
and paste your Slack webhook URL.
|
||||
See Slack's webhook documentation if you need to create one.
|
||||
|
||||
A default message is provided as a starting point for your alert.
|
||||
You can use the https://mustache.github.io/[Mustache] template syntax, i.e., `{{variable}}`
|
||||
to pass additional alert values at the time a condition is detected to an action.
|
||||
A list of available variables can be accessed by selecting the
|
||||
**add variable** button image:apm/images/add-variable.png[add variable button].
|
||||
|
||||
Click **Save**. Your rule has been created and is now active!
|
||||
|
||||
[float]
|
||||
[[apm-create-error-alert]]
|
||||
=== Example: create an error count threshold alert
|
||||
|
||||
The error count threshold alert triggers when the number of errors in a service exceeds a defined threshold.
|
||||
Because some errors are more important than others, this guide will focus a specific error group ID.
|
||||
|
||||
Before continuing, identify the service name, environment name, and error group ID that you'd like to create a latency anomaly rule for.
|
||||
The easiest way to find an error group ID is to select the service that you're interested in and navigating to the **Errors** tab.
|
||||
|
||||
This guide will create an alert for an error group ID based on the following criteria:
|
||||
|
||||
* Service: `{your_service.name}`
|
||||
* Environment: `{your_service.environment}`
|
||||
* Error Grouping Key: `{your_error.ID}`
|
||||
* Error rate is above 25 errors for the last five minutes
|
||||
* Group alerts by `service.name` and `service.environment`
|
||||
* Check every 1 minute
|
||||
* Send the alert via email to the site reliability team
|
||||
|
||||
From any page in the APM app, select **Alerts and rules** > **Create error count rule**.
|
||||
Change the name of the alert, but do not edit the tags.
|
||||
|
||||
Based on the criteria above, define the following rule details:
|
||||
|
||||
* **Service**: `{your_service.name}`
|
||||
* **Environment**: `{your_service.environment}`
|
||||
* **Error Grouping Key**: `{your_error.ID}`
|
||||
* **Is above** - `25 errors`
|
||||
* **For the last** - `5 minutes`
|
||||
* **Group alerts by** - `service.name` `service.environment`
|
||||
* **Check every** - `1 minute`
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
Alternatively, you can use a KQL filter to limit the scope of the alert:
|
||||
|
||||
. Toggle on *Use KQL Filter*.
|
||||
. Add a filter, for example to achieve the same effect as the example above:
|
||||
+
|
||||
[source,txt]
|
||||
------
|
||||
service.name:"{your_service.name}" and service.environment:"{your_service.environment}" and error.grouping_key:"{your_error.ID}"
|
||||
------
|
||||
|
||||
Using a KQL Filter to limit the scope is available for _Latency threshold_, _Failed transaction rate threshold_, and
|
||||
_Error count threshold_ rules.
|
||||
====
|
||||
|
||||
Select the **Email** connector and click **Create a connector**.
|
||||
Fill out the required details: sender, host, port, etc., and click **save**.
|
||||
|
||||
A default message is provided as a starting point for your alert.
|
||||
You can use the https://mustache.github.io/[Mustache] template syntax, i.e., `{{variable}}`
|
||||
to pass additional alert values at the time a condition is detected to an action.
|
||||
A list of available variables can be accessed by selecting the
|
||||
**add variable** button image:apm/images/add-variable.png[add variable button].
|
||||
|
||||
Click **Save**. The alert has been created and is now active!
|
||||
|
||||
[float]
|
||||
[[apm-alert-view-active]]
|
||||
=== View active alerts
|
||||
|
||||
Active alerts are displayed and grouped in multiple ways in the APM app.
|
||||
|
||||
[float]
|
||||
[[apm-alert-view-group]]
|
||||
==== View alerts by service group
|
||||
|
||||
If you're using the <<service-groups,service groups>> feature, you can view alerts by service group.
|
||||
From the service group overview page, click the red alert indicator to open the **Alerts** tab with a predefined filter that matches the filter used when creating the service group.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-service-group.png[Example view of service group in the APM app in Kibana]
|
||||
|
||||
[float]
|
||||
[[apm-alert-view-service]]
|
||||
==== View alerts by service
|
||||
|
||||
Alerts can be viewed within the context of any service.
|
||||
After selecting a service, go to the **Alerts** tab to view any alerts that are active for the selected service.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/active-alert-service.png[View active alerts by service]
|
||||
|
||||
[float]
|
||||
[[apm-alert-manage]]
|
||||
=== Manage alerts and rules
|
||||
|
||||
From the APM app, select **Alerts and rules** > **Manage rules** to be taken to
|
||||
the {kib} *{rules-ui}* page.
|
||||
From this page, you can disable, mute, and delete APM alerts.
|
||||
|
||||
[float]
|
||||
[[apm-alert-more-info]]
|
||||
=== More information
|
||||
|
||||
See {kibana-ref}/alerting-getting-started.html[Alerting] for more information.
|
||||
|
||||
NOTE: If you are using an **on-premise** Elastic Stack deployment with security,
|
||||
communication between Elasticsearch and Kibana must have TLS configured.
|
||||
More information is in the alerting {kibana-ref}/alerting-setup.html#alerting-prerequisites[prerequisites].
|
|
@ -1,346 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[apm-app-users]]
|
||||
== APM app users and privileges
|
||||
|
||||
:beat_default_index_prefix: apm
|
||||
:annotation_index: observability-annotations
|
||||
|
||||
++++
|
||||
<titleabbrev>Users and privileges</titleabbrev>
|
||||
++++
|
||||
|
||||
Use role-based access control to grant users access to secured
|
||||
resources. The roles that you set up depend on your organization's security
|
||||
requirements and the minimum privileges required to use specific features.
|
||||
|
||||
{es-security-features} provides {ref}/built-in-roles.html[built-in roles] that grant a
|
||||
subset of the privileges needed by APM users.
|
||||
When possible, assign users the built-in roles to minimize the affect of future changes on your security strategy.
|
||||
If no built-in role is available, you can assign users the privileges needed to accomplish a specific task.
|
||||
In general, there are three types of privileges you'll work with:
|
||||
|
||||
* **Elasticsearch cluster privileges**: Manage the actions a user can perform against your cluster.
|
||||
* **Elasticsearch index privileges**: Control access to the data in specific indices your cluster.
|
||||
* **Kibana feature privileges**: Grant users write or read access to features and apps within Kibana.
|
||||
|
||||
Select your use-case to get started:
|
||||
|
||||
* <<apm-app-reader>>
|
||||
* <<apm-app-annotation-user-create>>
|
||||
* <<apm-app-central-config-user>>
|
||||
* <<apm-app-storage-explorer-user-create>>
|
||||
* <<apm-app-api-user>>
|
||||
|
||||
////
|
||||
*********************************** ***********************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[apm-app-reader]]
|
||||
=== APM reader user
|
||||
|
||||
++++
|
||||
<titleabbrev>Create an APM reader user</titleabbrev>
|
||||
++++
|
||||
|
||||
APM reader users typically need to view the APM app and dashboards and visualizations that use APM data.
|
||||
These users might also need to create and edit dashboards, visualizations, and machine learning jobs.
|
||||
|
||||
[[apm-app-reader-full]]
|
||||
==== APM reader
|
||||
|
||||
To create an APM reader user:
|
||||
|
||||
. Create a new role, named something like `read-apm`, and assign the following privileges:
|
||||
+
|
||||
--
|
||||
:apm-read-view:
|
||||
:apm-monitor:
|
||||
include::./tab-widgets/apm-app-reader/widget.asciidoc[]
|
||||
:!apm-read-view:
|
||||
:!apm-monitor:
|
||||
--
|
||||
|
||||
. Assign the `read-apm` role created in the previous step, and the following built-in roles to
|
||||
any APM reader users:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Role | Purpose
|
||||
|
||||
|`kibana_admin`
|
||||
|Grants access to all features in Kibana.
|
||||
|
||||
|`machine_learning_admin`
|
||||
|Grants the privileges required to create, update, and view machine learning jobs
|
||||
|====
|
||||
|
||||
[[apm-app-reader-partial]]
|
||||
==== Partial APM reader
|
||||
|
||||
In some instances, you may wish to restrict certain Kibana apps that a user has access to.
|
||||
|
||||
. Create a new role, named something like `read-apm-partial`, and assign the following privileges:
|
||||
+
|
||||
--
|
||||
include::./tab-widgets/apm-app-reader/widget.asciidoc[]
|
||||
--
|
||||
|
||||
. Assign feature privileges to any Kibana feature that the user needs access to.
|
||||
Here are two examples:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
| Kibana
|
||||
| `Read` or `All` on the {beat_kib_app} feature
|
||||
| Allow the use of the the {beat_kib_app} apps
|
||||
|
||||
| Kibana
|
||||
| `Read` or `All` on Dashboards and Discover
|
||||
| Allow the user to view, edit, and create dashboards, as well as browse data.
|
||||
|====
|
||||
|
||||
. Finally, assign the following role if a user needs to enable and edit machine learning features:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Role | Purpose
|
||||
|
||||
|`machine_learning_admin`
|
||||
|Grants the privileges required to create, update, and view machine learning jobs
|
||||
|====
|
||||
|
||||
////
|
||||
*********************************** ***********************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[apm-app-annotation-user-create]]
|
||||
=== APM app annotation user
|
||||
|
||||
++++
|
||||
<titleabbrev>Create an annotation user</titleabbrev>
|
||||
++++
|
||||
|
||||
NOTE: By default, the `viewer` and `editor` built-in roles provide read access to Observability annotations.
|
||||
You only need to create an annotation user to write to the annotations index
|
||||
(<<apm-settings-kb,`xpack.observability.annotations.index`>>).
|
||||
|
||||
[[apm-app-annotation-user]]
|
||||
==== Annotation user
|
||||
|
||||
View deployment annotations in the APM app.
|
||||
|
||||
. Create a new role, named something like `annotation_user`,
|
||||
and assign the following privileges:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
|Index
|
||||
|`read` on +\{ANNOTATION_INDEX\}+^1^
|
||||
|Read-only access to the observability annotation index
|
||||
|
||||
|Index
|
||||
|`view_index_metadata` on +\{ANNOTATION_INDEX\}+^1^
|
||||
|Read-only access to observability annotation index metadata
|
||||
|====
|
||||
+
|
||||
^1^ +\{ANNOTATION_INDEX\}+ should be the index name you've defined in
|
||||
<<apm-settings-kb,`xpack.observability.annotations.index`>>.
|
||||
|
||||
. Assign the `annotation_user` created previously, and the roles and privileges necessary to create
|
||||
a <<apm-app-reader-full,full>> or <<apm-app-reader-partial,partial>> APM reader to any users that need to view annotations in the APM app
|
||||
|
||||
[[apm-app-annotation-api]]
|
||||
==== Annotation API
|
||||
|
||||
See <<apm-app-api-user>>.
|
||||
|
||||
////
|
||||
*********************************** ***********************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[apm-app-central-config-user]]
|
||||
=== APM app central config user
|
||||
|
||||
++++
|
||||
<titleabbrev>Create a central config user</titleabbrev>
|
||||
++++
|
||||
|
||||
[[apm-app-central-config-manager]]
|
||||
==== Central configuration manager
|
||||
|
||||
Central configuration users need to be able to view, create, update, and delete APM agent configurations.
|
||||
|
||||
. Create a new role, named something like `central-config-manager`, and assign the following privileges:
|
||||
+
|
||||
--
|
||||
include::./tab-widgets/central-config-users/widget.asciidoc[]
|
||||
--
|
||||
+
|
||||
TIP: Using the deprecated APM Server binaries?
|
||||
Add the privileges under the **Classic APM indices** tab above.
|
||||
|
||||
. Assign the `central-config-manager` role created in the previous step,
|
||||
and the following Kibana feature privileges to anyone who needs to manage central configurations:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
| Kibana
|
||||
|`All` on the {beat_kib_app} feature
|
||||
|Allow full use of the {beat_kib_app} apps
|
||||
|====
|
||||
|
||||
[[apm-app-central-config-reader]]
|
||||
==== Central configuration reader
|
||||
|
||||
In some instances, you may wish to create a user that can only read central configurations,
|
||||
but not create, update, or delete them.
|
||||
|
||||
. Create a new role, named something like `central-config-reader`, and assign the following privileges:
|
||||
+
|
||||
--
|
||||
include::./tab-widgets/central-config-users/widget.asciidoc[]
|
||||
--
|
||||
+
|
||||
TIP: Using the deprecated APM Server binaries?
|
||||
Add the privileges under the **Classic APM indices** tab above.
|
||||
|
||||
. Assign the `central-config-reader` role created in the previous step,
|
||||
and the following Kibana feature privileges to anyone who needs to read central configurations:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
| Kibana
|
||||
|`read` on the {beat_kib_app} feature
|
||||
|Allow read access to the {beat_kib_app} apps
|
||||
|====
|
||||
|
||||
[[apm-app-central-config-api]]
|
||||
==== Central configuration API
|
||||
|
||||
See <<apm-app-api-user>>.
|
||||
|
||||
////
|
||||
*********************************** ***********************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[apm-app-storage-explorer-user-create]]
|
||||
=== APM app storage explorer user
|
||||
|
||||
++++
|
||||
<titleabbrev>Create a storage explorer user</titleabbrev>
|
||||
++++
|
||||
|
||||
[[apm-app-storage-explorer-user]]
|
||||
==== Storage Explorer user
|
||||
|
||||
View the **Storage Explorer** in the APM app.
|
||||
|
||||
. Create a new role, named something like `storage-explorer_user`,
|
||||
and assign the following privileges:
|
||||
+
|
||||
--
|
||||
include::./tab-widgets/storage-explorer-user/widget.asciidoc[]
|
||||
--
|
||||
|
||||
. Assign the `storage-explorer_user` created previously, and the roles and privileges necessary to create
|
||||
a <<apm-app-reader-full,full>> or <<apm-app-reader-partial,partial>> APM reader to any users that need to view **Storage Explorer** in the APM app.
|
||||
|
||||
////
|
||||
*********************************** ***********************************
|
||||
////
|
||||
|
||||
[role="xpack"]
|
||||
[[apm-app-api-user]]
|
||||
=== APM app API user
|
||||
|
||||
++++
|
||||
<titleabbrev>Create an API user</titleabbrev>
|
||||
++++
|
||||
|
||||
[[apm-app-api-config-manager]]
|
||||
==== Central configuration API
|
||||
|
||||
Users can list, search, create, update, and delete central configurations via the APM app API.
|
||||
|
||||
. Assign the following Kibana feature privileges:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
| Kibana
|
||||
|`all` on the {beat_kib_app} feature
|
||||
|Allow all access to the {beat_kib_app} apps
|
||||
|====
|
||||
|
||||
[[apm-app-api-config-reader]]
|
||||
==== Central configuration API reader
|
||||
|
||||
Sometimes a user only needs to list and search central configurations via the APM app API.
|
||||
|
||||
. Assign the following Kibana feature privileges:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
| Kibana
|
||||
|`read` on the {beat_kib_app} feature
|
||||
|Allow read access to the {beat_kib_app} apps
|
||||
|====
|
||||
|
||||
[[apm-app-api-annotation-manager]]
|
||||
==== Annotation API
|
||||
|
||||
Users can use the annotation API to create annotations on their APM data.
|
||||
|
||||
. Create a new role, named something like `annotation_role`,
|
||||
and assign the following privileges:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
|Index
|
||||
|`manage` on +{annotation_index}+ index
|
||||
|Check if the +{annotation_index}+ index exists
|
||||
|
||||
|Index
|
||||
|`read` on +{annotation_index}+ index
|
||||
|Read the +{annotation_index}+ index
|
||||
|
||||
|Index
|
||||
|`create_index` on +{annotation_index}+ index
|
||||
|Create the +{annotation_index}+ index
|
||||
|
||||
|Index
|
||||
|`create_doc` on +{annotation_index}+ index
|
||||
|Create new annotations in the +{annotation_index}+ index
|
||||
|====
|
||||
|
||||
. Assign the `annotation_role` created previously,
|
||||
and the following Kibana feature privileges to any annotation API users:
|
||||
+
|
||||
[options="header"]
|
||||
|====
|
||||
|Type | Privilege | Purpose
|
||||
|
||||
| Kibana
|
||||
|`all` on the {beat_kib_app} feature
|
||||
|Allow all access to the {beat_kib_app} apps
|
||||
|====
|
||||
|
||||
//LEARN MORE
|
||||
//Learn more about <<kibana-feature-privileges,feature privileges>>.
|
|
@ -1,415 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[apm-spaces]]
|
||||
=== Control access to APM data
|
||||
|
||||
Starting in version 8.2.0, the APM app is <<xpack-spaces,{kib} Space>> aware.
|
||||
This allows you to separate your data--and access to that data--by team, use case, service environment,
|
||||
or any other filter that you choose.
|
||||
|
||||
To take advantage of this feature, your APM data needs to be written to different data steams.
|
||||
One way to accomplish this is with different namespaces.
|
||||
For example, you can send production data to an APM integration with a namespace of `production`,
|
||||
while sending staging data to a different APM integration with a namespace of `staging`.
|
||||
|
||||
Multiple APM integration instances is not required though. The simplest way to take advantage of this feature
|
||||
is by creating filtered aliases. See the guide below for more information.
|
||||
|
||||
[float]
|
||||
[[apm-spaces-example]]
|
||||
=== Guide: Separate staging and production data
|
||||
|
||||
This guide will explain how to separate your staging and production data.
|
||||
This can be helpful to either remove noise when troubleshooting a production issue,
|
||||
or to create more granular access control for certain data.
|
||||
|
||||
This guide assumes that you:
|
||||
|
||||
* Are sending both staging and production APM data to an {es} cluster.
|
||||
* Have configured the `environment` variable in your APM agent configurations.
|
||||
This variable sets the `service.environment` field in APM documents.
|
||||
You should have documents where `service.environment: production` and `service.environment: staging`.
|
||||
If this field is empty, see <<environment-selector,service environment filter>> to learn how to set this value.
|
||||
|
||||
[float]
|
||||
==== Step 1: Create filtered aliases
|
||||
|
||||
The APM app uses index patterns to query your APM data. An index pattern can match data streams, indices, and/or aliases.
|
||||
The default values are:
|
||||
|
||||
[options="header"]
|
||||
|====
|
||||
| Index setting | Default index pattern
|
||||
| Error | `logs-apm*`
|
||||
| Span/Transaction | `traces-apm*`
|
||||
| Metrics | `metrics-apm*`
|
||||
|====
|
||||
|
||||
NOTE: The default index settings also query the `apm-*` data view.
|
||||
This data view matches APM data shipped in earlier versions of APM (prior to v8.0).
|
||||
|
||||
Instead of querying the default APM data views, we can create filtered aliases for the APM app to query.
|
||||
A filtered alias is a secondary name for a group of data streams that has a user-defined
|
||||
filter to limit the documents that the alias can access.
|
||||
|
||||
To separate `staging` and `production` APM data, we'd need to create six filtered aliases--three
|
||||
aliases for each service environment:
|
||||
|
||||
[options="header"]
|
||||
|====
|
||||
| Index setting | `production` env | `staging` env
|
||||
| Error | `production-logs-apm` | `staging-logs-apm`
|
||||
| Span/Transaction | `production-traces-apm` | `staging-traces-apm`
|
||||
| Metrics | `production-metrics-apm` | `staging-metrics-apm`
|
||||
|====
|
||||
|
||||
The `production-<event>-apm` aliases will contain a filter that only provides access to documents
|
||||
where the `service.environment` is `production`.
|
||||
Similarly, the `staging-<event>-apm` aliases will contain a filter that only provides access to documents
|
||||
where the `service.environment` is `staging`.
|
||||
|
||||
To create these six filtered aliases, use the {es} {ref}/indices-aliases.html[Aliases API].
|
||||
In {kib}, open **Dev Tools** and run the following POST requests.
|
||||
|
||||
[%collapsible%open]
|
||||
.`traces-apm*` production alias example
|
||||
====
|
||||
[source, console]
|
||||
----
|
||||
POST /_aliases?pretty
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"add": {
|
||||
"index": "traces-apm*", <1>
|
||||
"alias": "production-traces-apm", <2>
|
||||
"filter": {
|
||||
"term": {
|
||||
"service.environment": {
|
||||
"value": "production" <3>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This example matches the APM traces data stream
|
||||
<2> The alias must not match the default APM index (`traces-apm*,apm-*`)
|
||||
<3> Only match documents where `service.environment: production`
|
||||
====
|
||||
|
||||
[%collapsible]
|
||||
.`logs-apm*` production alias example
|
||||
====
|
||||
[source, console]
|
||||
----
|
||||
POST /_aliases?pretty
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"add": {
|
||||
"index": "logs-apm*", <1>
|
||||
"alias": "production-logs-apm", <2>
|
||||
"filter": {
|
||||
"term": {
|
||||
"service.environment": {
|
||||
"value": "production" <3>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This example matches the APM logs data stream
|
||||
<2> The alias must not match the default APM index (`logs-apm*,apm-*`)
|
||||
<3> Only match documents where `service.environment: production`
|
||||
====
|
||||
|
||||
[%collapsible]
|
||||
.`metrics-apm*` production alias example
|
||||
====
|
||||
[source, console]
|
||||
----
|
||||
POST /_aliases?pretty
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"add": {
|
||||
"index": "metrics-apm*", <1>
|
||||
"alias": "production-metrics-apm", <2>
|
||||
"filter": {
|
||||
"term": {
|
||||
"service.environment": {
|
||||
"value": "production" <3>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This example matches the APM metrics data stream
|
||||
<2> The alias must not match the default APM index (`metrics-apm*,apm-*`)
|
||||
<3> Only match documents where `service.environment: production`
|
||||
====
|
||||
|
||||
[%collapsible]
|
||||
.`traces-apm*` staging alias example
|
||||
====
|
||||
[source, console]
|
||||
----
|
||||
POST /_aliases?pretty
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"add": {
|
||||
"index": "traces-apm*", <1>
|
||||
"alias": "staging-traces-apm", <2>
|
||||
"filter": {
|
||||
"term": {
|
||||
"service.environment": {
|
||||
"value": "staging" <3>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This example matches the APM traces data stream
|
||||
<2> The alias must not match the default APM index (`traces-apm*,apm-*`)
|
||||
<3> Only match documents where `service.environment: staging`
|
||||
====
|
||||
|
||||
[%collapsible]
|
||||
.`logs-apm*` staging alias example
|
||||
====
|
||||
[source, console]
|
||||
----
|
||||
POST /_aliases?pretty
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"add": {
|
||||
"index": "logs-apm*", <1>
|
||||
"alias": "staging-logs-apm", <2>
|
||||
"filter": {
|
||||
"term": {
|
||||
"service.environment": {
|
||||
"value": "staging" <3>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This example matches the APM logs data stream
|
||||
<2> The alias must not match the default APM index (`logs-apm*,apm-*`)
|
||||
<3> Only match documents where `service.environment: staging`
|
||||
====
|
||||
|
||||
[%collapsible]
|
||||
.`metrics-apm*` staging alias example
|
||||
====
|
||||
[source, console]
|
||||
----
|
||||
POST /_aliases?pretty
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"add": {
|
||||
"index": "metrics-apm*", <1>
|
||||
"alias": "staging-metrics-apm", <2>
|
||||
"filter": {
|
||||
"term": {
|
||||
"service.environment": {
|
||||
"value": "staging" <3>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This example matches the APM metrics data stream
|
||||
<2> The alias must not match the default APM index (`metrics-apm*,apm-*`)
|
||||
<3> Only match documents where `service.environment: staging`
|
||||
====
|
||||
|
||||
[float]
|
||||
==== Step 2: Create {kib} spaces
|
||||
|
||||
Next, you'll need to create a {Kib} space for each service environment.
|
||||
To create these spaces, navigate to **Stack Management** > **Spaces** > **Create a space**.
|
||||
For this guide, we've created two Kibana spaces, one named `production` and one named `staging`.
|
||||
|
||||
See <<spaces-managing>> for more information on creating a space.
|
||||
|
||||
[float]
|
||||
==== Step 3: Update APM index settings in each space
|
||||
|
||||
Now we can change the default data views that the APM app queries in each space.
|
||||
|
||||
Open the APM app and navigate to **Settings** > **Indices**.
|
||||
Use the table below to update your settings for each space.
|
||||
The values in each column match the names of the filtered aliases we created in step one.
|
||||
|
||||
[options="header"]
|
||||
|====
|
||||
| Index setting | `production` space | `staging` space
|
||||
| Error indices | `production-logs-apm` | `staging-logs-apm`
|
||||
| Span indices | `production-traces-apm` | `staging-traces-apm`
|
||||
| Transaction indices | `production-traces-apm` | `staging-traces-apm`
|
||||
| Metrics indices | `production-metrics-apm` | `staging-metrics-apm`
|
||||
|====
|
||||
|
||||
[role="screenshot"]
|
||||
image::settings/images/apm-settings.png[APM app settings in Kibana]
|
||||
|
||||
[float]
|
||||
==== Step 4: Create {kib} access roles
|
||||
|
||||
In {kib}, navigate to **Stack Management** > **Roles** and click **Create role**.
|
||||
|
||||
You'll need to create two roles: one for `staging` users (we'll call this role `staging_apm_viewer`)
|
||||
and one for `production` users (we'll call this role `production_apm_viewer`).
|
||||
|
||||
Using the table below, assign each role the following privileges:
|
||||
|
||||
[options="header"]
|
||||
|====
|
||||
| Privileges | `production_apm_viewer` | `staging_apm_viewer`
|
||||
| Index privileges | index: `production-*-apm`, privilege: `read` | index: `staging-*-apm`, privilege: `read`
|
||||
| Kibana privileges | space: `production`, feature privileges: `APM and User Experience: read` | space: `staging`, feature privileges: `APM and User Experience: read`
|
||||
|====
|
||||
|
||||
[role="screenshot"]
|
||||
image::./images/apm-roles-config.png[APM role config example]
|
||||
|
||||
Alternatively, you can use the
|
||||
{es} {ref}/security-api-put-role.html[Create or update roles API]:
|
||||
|
||||
[%collapsible%open]
|
||||
.Create a `production_apm_viewer` role
|
||||
====
|
||||
This request creates a `production_apm_viewer` role:
|
||||
|
||||
[source, console]
|
||||
----
|
||||
POST /_security/role/production_apm_viewer
|
||||
{
|
||||
"cluster": [ ],
|
||||
"indices": [
|
||||
{
|
||||
"names": ["production-*-apm"], <1>
|
||||
"privileges": ["read"]
|
||||
}
|
||||
],
|
||||
"applications": [
|
||||
{
|
||||
"application" : "kibana-.kibana",
|
||||
"privileges" : [
|
||||
"feature_apm.read" <2>
|
||||
],
|
||||
"resources" : [
|
||||
"space:production" <3>
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This data view matches all of the production aliases created in step one.
|
||||
<2> Assigns `read` privileges for the APM and User Experience apps.
|
||||
<3> Provides access to the space named `production`.
|
||||
====
|
||||
|
||||
[%collapsible]
|
||||
.Create a `staging_apm_viewer` role
|
||||
====
|
||||
This request creates a `staging_apm_viewer` role:
|
||||
|
||||
[source, console]
|
||||
----
|
||||
POST /_security/role/staging_apm_viewer
|
||||
{
|
||||
"cluster": [ ],
|
||||
"indices": [
|
||||
{
|
||||
"names": ["staging-*-apm"], <1>
|
||||
"privileges": ["read"]
|
||||
}
|
||||
],
|
||||
"applications": [
|
||||
{
|
||||
"application" : "kibana-.kibana",
|
||||
"privileges" : [
|
||||
"feature_apm.read" <2>
|
||||
],
|
||||
"resources" : [
|
||||
"space:staging" <3>
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
----
|
||||
<1> This data view matches all of the staging aliases created in step one.
|
||||
<2> Assigns `read` privileges for the APM and User Experience apps.
|
||||
<3> Provides access to the space named `staging`.
|
||||
====
|
||||
|
||||
[float]
|
||||
==== Step 5: Assign users to roles
|
||||
|
||||
The last thing to do is assign users to the newly created roles above.
|
||||
Users will only have access to the data within the spaces that they are granted.
|
||||
|
||||
For information on how to create users and assign them roles with the {kib} UI,
|
||||
see <<tutorial-secure-access-to-kibana>>.
|
||||
|
||||
Alternatively, you can use the
|
||||
{es} {ref}/security-api-put-user.html[Create or update users API].
|
||||
|
||||
This example creates a new user and assigns them the `production_apm_viewer` role created in the previous step.
|
||||
This user will only have access to the production space and data with a `service.environment` of `production`.
|
||||
Remember to change the `password`, `full_name`, and `email` fields.
|
||||
|
||||
[source, console]
|
||||
----
|
||||
POST /_security/user/production-apm-user
|
||||
{
|
||||
"password" : "l0ng-r4nd0m-p@ssw0rd",
|
||||
"roles" : [ "production_apm_viewer" ], <1>
|
||||
"full_name" : "Jane Production Smith",
|
||||
"email" : "janesmith@example.com"
|
||||
}
|
||||
----
|
||||
<1> Assigns the previously created `production_apm_viewer` role.
|
||||
|
||||
This example creates a new user and assigns them the `staging_apm_viewer` role created in the previous step.
|
||||
This user will only have access to the staging space and data with a `service.environment` of `staging`.
|
||||
Remember to change the `password`, `full_name`, and `email` fields.
|
||||
|
||||
[source, console]
|
||||
----
|
||||
POST /_security/user/staging-apm-user
|
||||
{
|
||||
"password" : "l0ng-r4nd0m-p@ssw0rd",
|
||||
"roles" : [ "staging_apm_viewer" ], <1>
|
||||
"full_name" : "John Staging Doe",
|
||||
"email" : "johndoe@example.com"
|
||||
}
|
||||
----
|
||||
<1> Assigns the previously created `staging_apm_viewer` role.
|
||||
|
||||
[float]
|
||||
==== Step 6: Marvel
|
||||
|
||||
That's it! Head back to the APM app and marvel at your space-specific data.
|
|
@ -1,89 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[correlations]]
|
||||
=== Find transaction latency and failure correlations
|
||||
|
||||
Correlations surface attributes of your data that are potentially correlated
|
||||
with high-latency or erroneous transactions. For example, if you are a site
|
||||
reliability engineer who is responsible for keeping production systems up and
|
||||
running, you want to understand what is causing slow transactions. Identifying
|
||||
attributes that are responsible for higher latency transactions can potentially
|
||||
point you toward the root cause. You may find a correlation with a particular
|
||||
piece of hardware, like a host or pod. Or, perhaps a set of users, based on IP
|
||||
address or region, is facing increased latency due to local data center issues.
|
||||
|
||||
To find correlations, select a service on the *Services* page in the {apm-app}
|
||||
then select a transaction group from the *Transactions* tab.
|
||||
|
||||
NOTE: Queries within the {apm-app} are also applied to the correlations.
|
||||
|
||||
[discrete]
|
||||
[[correlations-latency]]
|
||||
==== Find high transaction latency correlations
|
||||
|
||||
The correlations on the *Latency correlations* tab help you discover which
|
||||
attributes are contributing to increased transaction latency.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/correlations-hover.png[Latency correlations]
|
||||
|
||||
The progress bar indicates the status of the asynchronous analysis, which
|
||||
performs statistical searches across a large number of attributes. For large
|
||||
time ranges and services with high transaction throughput, this might take some
|
||||
time. To improve performance, reduce the time range.
|
||||
|
||||
The latency distribution chart visualizes the overall latency of the
|
||||
transactions in the transaction group. If there are attributes that have a
|
||||
statistically significant correlation with slow response times, they are listed
|
||||
in a table below the chart. The table is sorted by correlation coefficients that
|
||||
range from 0 to 1. Attributes with higher correlation values are more likely to
|
||||
contribute to high latency transactions. By default, the attribute with the
|
||||
highest correlation value is added to the chart. To see the latency distribution
|
||||
for other attributes, select their row in the table.
|
||||
|
||||
If a correlated attribute seems noteworthy, use the **Filter** quick links:
|
||||
|
||||
* `+` creates a new query in the {apm-app} for filtering transactions containing
|
||||
the selected value.
|
||||
* `-` creates a new query in the {apm-app} to filter out transactions containing
|
||||
the selected value.
|
||||
|
||||
You can also click the icon beside the field name to view and filter its most
|
||||
popular values.
|
||||
|
||||
In this example screenshot, there are transactions that are skewed to the right
|
||||
with slower response times than the overall latency distribution. If you select
|
||||
the `+` filter in the appropriate row of the table, it creates a new query in
|
||||
the {apm-app} for transactions with this attribute. With the "noise" now
|
||||
filtered out, you can begin viewing sample traces to continue your investigation.
|
||||
|
||||
[discrete]
|
||||
[[correlations-error-rate]]
|
||||
==== Find failed transaction correlations
|
||||
|
||||
The correlations on the *Failed transaction correlations* tab help you discover
|
||||
which attributes are most influential in distinguishing between transaction
|
||||
failures and successes. In this context, the success or failure of a transaction
|
||||
is determined by its {ecs-ref}/ecs-event.html#field-event-outcome[event.outcome]
|
||||
value. For example, APM agents set the `event.outcome` to `failure` when an HTTP
|
||||
transaction returns a `5xx` status code.
|
||||
|
||||
The chart highlights the failed transactions in the overall latency distribution
|
||||
for the transaction group. If there are attributes that have a statistically
|
||||
significant correlation with failed transactions, they are listed in a table.
|
||||
The table is sorted by scores, which are mapped to high, medium, or low impact
|
||||
levels. Attributes with high impact levels are more likely to contribute to
|
||||
failed transactions. By default, the attribute with the highest score is added
|
||||
to the chart. To see a different attribute in the chart, select its row in the
|
||||
table.
|
||||
|
||||
For example, in the screenshot below, there are attributes such as a specific
|
||||
node and pod name that have medium impact on the failed transactions.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/correlations-failed-transactions.png[Failed transaction correlations]
|
||||
|
||||
Select the `+` filter to create a new query in the {apm-app} for transactions
|
||||
with one or more of these attributes. If you are unfamiliar with a field, click
|
||||
the icon beside its name to view its most popular values and optionally filter
|
||||
on those values too. Each time that you add another attribute, it is filtering
|
||||
out more and more noise and bringing you closer to a diagnosis.
|
|
@ -1,222 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[custom-links]]
|
||||
=== Custom links
|
||||
|
||||
++++
|
||||
<titleabbrev>Create custom links</titleabbrev>
|
||||
++++
|
||||
|
||||
Elastic's custom link feature allows you to easily create up to 500 dynamic links
|
||||
based on your specific APM data.
|
||||
Custom links can be filtered to only appear in the APM app for relevant services,
|
||||
environments, transaction types, or transaction names.
|
||||
|
||||
Ready to dive in? Jump straight to the <<custom-links-examples,examples>>.
|
||||
|
||||
[float]
|
||||
[[custom-links-create]]
|
||||
=== Create a link
|
||||
|
||||
Each custom link consists of a label, URL, and optional filter.
|
||||
The easiest way to create a custom link is from within the actions dropdown in the transaction detail page.
|
||||
This method will automatically apply filters, scoping the link to that specific service,
|
||||
environment, transaction type, and transaction name.
|
||||
|
||||
Alternatively, you can create a custom link in the APM app by navigating to **Settings** > **Customize UI**,
|
||||
and selecting **Create custom link**.
|
||||
|
||||
[float]
|
||||
[[custom-links-label]]
|
||||
==== Label
|
||||
|
||||
The name of your custom link.
|
||||
The actions context menu displays this text, so keep it as short as possible.
|
||||
|
||||
TIP: Custom links are displayed alphabetically in the actions menu.
|
||||
|
||||
[float]
|
||||
[[custom-links-url]]
|
||||
==== URL
|
||||
|
||||
The URL your link points to.
|
||||
URLs support dynamic field name variables, encapsulated in double curly brackets: `{{field.name}}`.
|
||||
These variables will be replaced with transaction metadata when the link is clicked.
|
||||
|
||||
Because everyone's data is different,
|
||||
you'll need to examine your traces to see what metadata is available for use.
|
||||
To do this, select a trace in the APM app, and click **Metadata** in the **Trace Sample** table.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/example-metadata.png[Example metadata]
|
||||
|
||||
[float]
|
||||
[[custom-links-filters]]
|
||||
==== Filters
|
||||
|
||||
Filter each link to only appear for specific services or transactions.
|
||||
You can filter on the following fields:
|
||||
|
||||
* `service.name`
|
||||
* `service.env`
|
||||
* `transaction.type`
|
||||
* `transaction.name`
|
||||
|
||||
Multiple values are allowed when comma-separated.
|
||||
|
||||
[float]
|
||||
[[custom-links-examples]]
|
||||
=== Custom link examples
|
||||
|
||||
// Relevant documentation links
|
||||
:jira-query-params: https://confluence.atlassian.com/jirakb/how-to-create-issues-using-direct-html-links-in-jira-server-159474.html
|
||||
:github-query-params: https://help.github.com/en/github/managing-your-work-on-github/about-automation-for-issues-and-pull-requests-with-query-parameters
|
||||
|
||||
Not sure where to start with custom links?
|
||||
Take a look at the examples below and customize them to your liking!
|
||||
|
||||
[float]
|
||||
[[custom-links-examples-email]]
|
||||
==== Email
|
||||
|
||||
Email the owner of a service.
|
||||
|
||||
|====
|
||||
|Label |`Email <SERVICE_NAME> engineer`
|
||||
|Link |`mailto:<TEAM_OR_ENGINEER>@<COMPANY_NAME>.com`
|
||||
|Filters |`service.name:<SERVICE_NAME>`
|
||||
|====
|
||||
|
||||
**Example**
|
||||
|
||||
This link opens an email addressed to the team or owner of `python-backend`.
|
||||
It will only appear on services with the name `python-backend`.
|
||||
|
||||
|====
|
||||
|Label |`Email python-backend engineers`
|
||||
|Link |`mailto:python_team@elastic.co`
|
||||
|Filters |`service.name:python-backend`
|
||||
|====
|
||||
|
||||
[float]
|
||||
[[custom-links-examples-gh]]
|
||||
==== GitHub issue
|
||||
|
||||
Open a GitHub issue with pre-populated metadata from the selected trace sample.
|
||||
|
||||
|====
|
||||
|Label |`Open an issue in <REPO_NAME>`
|
||||
|Link |`https://github.com/<ORG>/<REPO>/issues/new?title=<TITLE>&body=<BODY>`
|
||||
|Filters |`service.name:client`
|
||||
|====
|
||||
|
||||
**Example**
|
||||
|
||||
This link opens a new GitHub issue in the apm-agent-rum repository.
|
||||
It populates the issue body with relevant metadata from the currently active trace.
|
||||
Clicking this link results in the following issue being created:
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/create-github-issue.png[Example github issue]
|
||||
|
||||
|====
|
||||
|Label |`Open an issue in apm-rum-js`
|
||||
|Link |`https://github.com/elastic/apm-agent-rum-js/issues/new?title=Investigate+APM+trace&body=Investigate+the+following+APM+trace%3A%0D%0A%0D%0Aservice.name%3A+{{service.name}}%0D%0Atransaction.id%3A+{{transaction.id}}%0D%0Acontainer.id%3A+{{container.id}}%0D%0Aurl.full%3A+{{url.full}}`
|
||||
|Filters |`service.name:client`
|
||||
|====
|
||||
|
||||
See the {github-query-params}[GitHub automation documentation] for a full list of supported query parameters.
|
||||
|
||||
[float]
|
||||
[[custom-links-examples-jira]]
|
||||
==== Jira task
|
||||
|
||||
Create a Jira task with pre-populated metadata from the selected trace sample.
|
||||
|
||||
|====
|
||||
|Label |`Open an issue in Jira`
|
||||
|Link |`https://<JIRA_BASE_URL>/secure/CreateIssueDetails!init.jspa?<ARGUMENTS>`
|
||||
|====
|
||||
|
||||
**Example**
|
||||
|
||||
This link creates a new task on the Engineering board in Jira.
|
||||
It populates the issue body with relevant metadata from the currently active trace.
|
||||
Clicking this link results in the following task being created in Jira:
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/create-jira-issue.png[Example jira issue]
|
||||
|
||||
|====
|
||||
|Label |`Open a task in Jira`
|
||||
|Link |`https://test-site-33.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=10001&summary=Created+via+APM&description=Investigate+the+following+APM+trace%3A%0D%0A%0D%0Aservice.name%3A+{{service.name}}%0D%0Atransaction.id%3A+{{transaction.id}}%0D%0Acontainer.id%3A+{{container.id}}%0D%0Aurl.full%3A+{{url.full}}`
|
||||
|====
|
||||
|
||||
See the {jira-query-params}[Jira application administration knowledge base]
|
||||
for a full list of supported query parameters.
|
||||
|
||||
[float]
|
||||
[[custom-links-examples-kib]]
|
||||
==== Kibana dashboards
|
||||
|
||||
Link to a custom dashboard in Kibana.
|
||||
|
||||
|====
|
||||
|Label |`Open transaction in custom visualization`
|
||||
|Link |`https://kibana-instance/app/kibana#/dashboard?_g=query:(language:kuery,query:'transaction.id:{{transaction.id}}'...`
|
||||
|====
|
||||
|
||||
**Example**
|
||||
|
||||
This link opens the current `transaction.id` in a custom kibana dashboard.
|
||||
There are no filters set.
|
||||
|
||||
|====
|
||||
|Label |`Open transaction in Python drilldown viz`
|
||||
|URL |`https://kibana-instance/app/kibana#/dashboard?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-24h,to:now))&_a=(description:'',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(),gridData:(h:15,i:cb79c1c0-1af8-472c-aaf7-d158a76946fb,w:24,x:0,y:0),id:c8c74b20-6a30-11ea-92ab-b5d3feff11df,panelIndex:cb79c1c0-1af8-472c-aaf7-d158a76946fb,type:visualization,version:'7.7')),query:(language:kuery,query:'transaction.id:{{transaction.id}}'),timeRestore:!f,title:'',viewMode:edit)`
|
||||
|====
|
||||
|
||||
[float]
|
||||
[[custom-links-examples-slack]]
|
||||
==== Slack channel
|
||||
|
||||
Open a specified slack channel.
|
||||
|
||||
|====
|
||||
|Label |`Open SLACK_CHANNEL`
|
||||
|Link |`https://COMPANY_SLACK.slack.com/archives/SLACK_CHANNEL`
|
||||
|Filters |`service.name` : `SERVICE_NAME`
|
||||
|====
|
||||
|
||||
**Example**
|
||||
|
||||
This link opens a company slack channel, #apm-support.
|
||||
It only appears when `transaction.name` is `GET user/login`.
|
||||
|
||||
|====
|
||||
|Label |`Open #apm-user-support`
|
||||
|Link |`https://microsoft.slack.com/archives/efk52kt23k`
|
||||
|Filters |`transaction.name:GET user/login`
|
||||
|====
|
||||
|
||||
[float]
|
||||
[[custom-links-examples-web]]
|
||||
==== Website
|
||||
|
||||
Open an internal or external website.
|
||||
|
||||
|====
|
||||
|Label |`Open <WEBSITE>`
|
||||
|Link |`https://<COMPANY_SLACK>.slack.com/archives/<SLACK_CHANNEL>`
|
||||
|Filters |`service.name:<SERVICE_NAME>`
|
||||
|====
|
||||
|
||||
**Example**
|
||||
|
||||
This link opens more data on a specific `user.email`.
|
||||
It only appears on front-end transactions.
|
||||
|
||||
|====
|
||||
|Label |`View user internally`
|
||||
|Link |`https://internal-site.company.com/user/{{user.email}}`
|
||||
|Filters |`service.name:client`
|
||||
|====
|
|
@ -1,48 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[dependencies]]
|
||||
=== Dependencies
|
||||
|
||||
APM agents collect details about external calls made from instrumented services.
|
||||
Sometimes, these external calls resolve into a downstream service that's instrumented -- in these cases,
|
||||
you can utilize <<distributed-tracing,distributed tracing>> to drill down into problematic downstream services.
|
||||
Other times, though, it's not possible to instrument a downstream dependency --
|
||||
like with a database or third-party service.
|
||||
**Dependencies** gives you a window into these uninstrumented, downstream dependencies.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/dependencies.png[Dependencies view in the APM app in Kibana]
|
||||
|
||||
Many application issues are caused by slow or unresponsive downstream dependencies.
|
||||
And because a single, slow dependency can significantly impact the end-user experience,
|
||||
it's important to be able to quickly identify these problems and determine the root cause.
|
||||
|
||||
Select a dependency to see detailed latency, throughput, and failed transaction rate metrics.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/dependencies-drilldown.png[Dependencies drilldown view in the APM app in Kibana]
|
||||
|
||||
When viewing a dependency, consider your pattern of usage with that dependency.
|
||||
If your usage pattern _hasn't_ increased or decreased,
|
||||
but the experience has been negatively effected -- either with an increase in latency or errors,
|
||||
there's likely a problem with the dependency that needs to be addressed.
|
||||
|
||||
If your usage pattern _has_ changed, the dependency view can quickly show you whether
|
||||
that pattern change exists in all upstream services, or just a subset of your services.
|
||||
You might then start digging into traces coming from
|
||||
impacted services to determine why that pattern change has occurred.
|
||||
|
||||
[float]
|
||||
[[dependencies-operations]]
|
||||
==== Operations
|
||||
|
||||
beta::[]
|
||||
|
||||
**Dependency operations** provides a granular breakdown of the operations/queries a dependency is executing.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/operations.png[operations view in the APM app in Kibana]
|
||||
|
||||
Selecting an operation displays the operation's impact and performance trends over time, via key metrics like latency, throughput, and failed transaction rate. In addition, the <<spans,**Trace sample timeline**>> provides a visual drill-down into an end-to-end trace sample.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/operations-detail.png[operations detail view in the APM app in Kibana]
|
|
@ -1,48 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[transactions-annotations]]
|
||||
=== Track deployments with annotations
|
||||
|
||||
++++
|
||||
<titleabbrev>Track deployments with annotations</titleabbrev>
|
||||
++++
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-transaction-annotation.png[Example view of transactions annotation in the APM app in Kibana]
|
||||
|
||||
For enhanced visibility into your deployments, we offer deployment annotations on all transaction charts.
|
||||
This feature enables you to easily determine if your deployment has increased response times for an end-user,
|
||||
or if the memory/CPU footprint of your application has changed.
|
||||
Being able to quickly identify bad deployments enables you to rollback and fix issues without causing costly outages.
|
||||
|
||||
By default, automatic deployment annotations are enabled.
|
||||
This means the APM app will create an annotation on your data when the `service.version` of your application changes.
|
||||
|
||||
Alternatively, you can explicitly create deployment annotations with our annotation API.
|
||||
The API can integrate into your CI/CD pipeline,
|
||||
so that each time you deploy, a POST request is sent to the annotation API endpoint:
|
||||
|
||||
[source,curl]
|
||||
----
|
||||
curl -X POST \
|
||||
http://localhost:5601/api/apm/services/${SERVICE_NAME}/annotation \ <1>
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'kbn-xsrf: true' \
|
||||
-H 'Authorization: Basic ${API_KEY}' \ <2>
|
||||
-d '{
|
||||
"@timestamp": "${DEPLOY_TIME}", <3>
|
||||
"service": {
|
||||
"version": "${SERVICE_VERSION}" <4>
|
||||
},
|
||||
"message": "${MESSAGE}" <5>
|
||||
}'
|
||||
----
|
||||
<1> The `service.name` of your application
|
||||
<2> An APM app API key with sufficient privileges
|
||||
<3> The time of the deployment
|
||||
<4> The `service.version` to be displayed in the annotation
|
||||
<5> A custom message to be displayed in the annotation
|
||||
|
||||
See the <<apm-annotation-api,annotation API>> reference for more information.
|
||||
|
||||
|
||||
NOTE: If custom annotations have been created for the selected time period, any derived annotations, i.e., those created automatically when `service.version` changes, will not be shown.
|
|
@ -1,36 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[errors]]
|
||||
=== Errors
|
||||
|
||||
TIP: {apm-guide-ref}/data-model-errors.html[Errors] are groups of exceptions with a similar exception or log message.
|
||||
|
||||
The *Errors* overview provides a high-level view of the exceptions that APM agents catch,
|
||||
or that users manually report with APM agent APIs.
|
||||
Like errors are grouped together to make it easy to quickly see which errors are affecting your services,
|
||||
and to take actions to rectify them.
|
||||
|
||||
A service returning a 5xx code from a request handler, controller, etc., will not create
|
||||
an exception that an APM agent can catch, and will therefore not show up in this view.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-errors-overview.png[APM Errors overview]
|
||||
|
||||
Selecting an error group ID or error message brings you to the *Error group*.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-error-group.png[APM Error group]
|
||||
|
||||
The error group details page visualizes the number of error occurrences over time and compared to a recent time range.
|
||||
This allows you to quickly determine if the error rate is changing or remaining constant.
|
||||
You'll also see the top 5 affected transactions--enabling you to quickly narrow down which transactions are most impacted
|
||||
by the selected error.
|
||||
|
||||
Further down, you'll see an Error sample.
|
||||
The error shown is always the most recent to occur.
|
||||
The sample includes the exception message, culprit, stack trace where the error occurred,
|
||||
and additional contextual information to help debug the issue--all of which can be copied with the click of a button.
|
||||
|
||||
In some cases, you might also see a Transaction sample ID.
|
||||
This feature allows you to make a connection between the errors and transactions,
|
||||
by linking you to the specific transaction where the error occurred.
|
||||
This allows you to see the whole trace, including which services the request went through.
|
|
@ -1,46 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[filters]]
|
||||
=== Filters
|
||||
|
||||
++++
|
||||
<titleabbrev>Filter data</titleabbrev>
|
||||
++++
|
||||
|
||||
Global filters are ways you can filter data across the APM app based on a specific
|
||||
time range or environment. When viewing a specific service, the filter persists
|
||||
as you move between tabs.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/global-filters.png[Global filters available in the APM app in Kibana]
|
||||
|
||||
[NOTE]
|
||||
=====
|
||||
If you prefer to use advanced queries on your data to filter on specific pieces
|
||||
of information, see <<advanced-queries,Query your data>>.
|
||||
=====
|
||||
|
||||
[[global-time-range]]
|
||||
==== Global time range
|
||||
|
||||
The <<set-time-filter,global time range filter>> in {kib} restricts APM data to a specific time period.
|
||||
|
||||
[[environment-selector]]
|
||||
==== Service environment filter
|
||||
|
||||
The environment selector is a global filter for `service.environment`.
|
||||
It allows you to view only relevant data and is especially useful for separating development from production environments.
|
||||
By default, all environments are displayed. If there are no environment options, you'll see "not defined".
|
||||
|
||||
Service environments are defined when configuring your APM agents.
|
||||
It's vital to be consistent when naming environments in your APM agents.
|
||||
To learn how to configure service environments, see the specific APM agent documentation:
|
||||
|
||||
* *Go:* {apm-go-ref}/configuration.html#config-environment[`ELASTIC_APM_ENVIRONMENT`]
|
||||
* *iOS agent:* _Not yet supported_
|
||||
* *Java:* {apm-java-ref}/config-core.html#config-environment[`environment`]
|
||||
* *.NET:* {apm-dotnet-ref}/config-core.html#config-environment[`Environment`]
|
||||
* *Node.js:* {apm-node-ref}/configuration.html#environment[`environment`]
|
||||
* *PHP:* {apm-php-ref}/configuration-reference.html#config-environment[`environment`]
|
||||
* *Python:* {apm-py-ref}/configuration.html#config-environment[`environment`]
|
||||
* *Ruby:* {apm-ruby-ref}/configuration.html#config-environment[`environment`]
|
||||
* *Real User Monitoring:* {apm-rum-ref}/configuration.html#environment[`environment`]
|
|
@ -1,71 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[apm-getting-started]]
|
||||
== Get started with the APM app
|
||||
|
||||
++++
|
||||
<titleabbrev>Get started</titleabbrev>
|
||||
++++
|
||||
|
||||
// Conditionally display a screenshot or video depending on what the
|
||||
// current documentation version is.
|
||||
|
||||
ifeval::["{is-current-version}"=="true"]
|
||||
++++
|
||||
<script type="text/javascript" async src="https://play.vidyard.com/embed/v4.js"></script>
|
||||
<img
|
||||
style="width: 100%; margin: auto; display: block;"
|
||||
class="vidyard-player-embed"
|
||||
src="https://play.vidyard.com/Y4nE2XLYEk75odbRQmUA3g.jpg"
|
||||
data-uuid="Y4nE2XLYEk75odbRQmUA3g"
|
||||
data-v="4"
|
||||
data-type="inline"
|
||||
/>
|
||||
</br>
|
||||
++++
|
||||
endif::[]
|
||||
|
||||
For a quick, high-level overview of the health and performance of your application,
|
||||
start with:
|
||||
|
||||
* <<services>>
|
||||
* <<traces>>
|
||||
* <<dependencies>>
|
||||
* <<service-maps>>
|
||||
|
||||
Notice something awry? Select a service or trace and dive deeper with:
|
||||
|
||||
* <<service-overview>>
|
||||
* <<mobile-service-overview>>
|
||||
* <<transactions>>
|
||||
* <<spans>>
|
||||
* <<errors>>
|
||||
* <<metrics>>
|
||||
* <<infrastructure>>
|
||||
* <<logs>>
|
||||
|
||||
TIP: Want to learn more about the Elastic APM ecosystem?
|
||||
See the {apm-guide-ref}/apm-overview.html[APM Overview].
|
||||
|
||||
include::services.asciidoc[]
|
||||
|
||||
include::traces.asciidoc[]
|
||||
|
||||
include::dependencies.asciidoc[]
|
||||
|
||||
include::service-maps.asciidoc[]
|
||||
|
||||
include::service-overview.asciidoc[]
|
||||
|
||||
include::mobile-service.asciidoc[]
|
||||
|
||||
include::transactions.asciidoc[]
|
||||
|
||||
include::spans.asciidoc[]
|
||||
|
||||
include::errors.asciidoc[]
|
||||
|
||||
include::metrics.asciidoc[]
|
||||
|
||||
include::infrastructure.asciidoc[]
|
||||
|
||||
include::logs.asciidoc[]
|
|
@ -1,47 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[apm-how-to]]
|
||||
== How-to guides
|
||||
|
||||
Learn how to perform common APM app tasks.
|
||||
|
||||
|
||||
* <<agent-configuration>>
|
||||
* <<apm-spaces>>
|
||||
* <<apm-alerts>>
|
||||
* <<custom-links>>
|
||||
* <<filters>>
|
||||
* <<correlations>>
|
||||
* <<agent-explorer>>
|
||||
* <<machine-learning-integration>>
|
||||
* <<mobile-session-explorer>>
|
||||
* <<apm-lambda>>
|
||||
* <<advanced-queries>>
|
||||
* <<storage-explorer>>
|
||||
* <<transactions-annotations>>
|
||||
|
||||
|
||||
include::agent-configuration.asciidoc[]
|
||||
|
||||
include::apm-spaces.asciidoc[]
|
||||
|
||||
include::apm-alerts.asciidoc[]
|
||||
|
||||
include::custom-links.asciidoc[]
|
||||
|
||||
include::filters.asciidoc[]
|
||||
|
||||
include::correlations.asciidoc[]
|
||||
|
||||
include::agent-explorer.asciidoc[]
|
||||
|
||||
include::machine-learning.asciidoc[]
|
||||
|
||||
include::mobile-session-explorer.asciidoc[]
|
||||
|
||||
include::lambda.asciidoc[]
|
||||
|
||||
include::advanced-queries.asciidoc[]
|
||||
|
||||
include::storage-explorer.asciidoc[]
|
||||
|
||||
include::deployment-annotations.asciidoc[]
|
Before Width: | Height: | Size: 392 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 963 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 257 KiB |
Before Width: | Height: | Size: 327 KiB |
Before Width: | Height: | Size: 314 KiB |
Before Width: | Height: | Size: 265 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 361 KiB |
Before Width: | Height: | Size: 383 KiB |
Before Width: | Height: | Size: 460 KiB |
Before Width: | Height: | Size: 526 KiB |
Before Width: | Height: | Size: 508 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 640 KiB |
Before Width: | Height: | Size: 546 KiB |
Before Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 613 KiB |
Before Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 590 KiB |
Before Width: | Height: | Size: 435 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 723 KiB |
Before Width: | Height: | Size: 337 KiB |
Before Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 460 KiB |
Before Width: | Height: | Size: 252 KiB |
Before Width: | Height: | Size: 516 KiB |
Before Width: | Height: | Size: 340 KiB |
Before Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 370 KiB |
Before Width: | Height: | Size: 373 KiB |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="59" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="59" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#9f9f9f" d="M0 0h0v20H0z"/><path fill="#9f9f9f" d="M0 0h59v20H0z"/><path fill="url(#b)" d="M0 0h59v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="295" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="490">Dynamic</text><text x="295" y="140" transform="scale(.1)" textLength="490">Dynamic</text></g> </svg>
|
Before Width: | Height: | Size: 775 B |
Before Width: | Height: | Size: 207 KiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 399 KiB |
Before Width: | Height: | Size: 519 KiB |
Before Width: | Height: | Size: 663 KiB |
Before Width: | Height: | Size: 1 MiB |
Before Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 277 KiB |
Before Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 619 KiB |
Before Width: | Height: | Size: 240 KiB |
Before Width: | Height: | Size: 374 KiB |
Before Width: | Height: | Size: 1 MiB |
Before Width: | Height: | Size: 997 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 401 KiB |
Before Width: | Height: | Size: 249 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 549 KiB |
Before Width: | Height: | Size: 259 KiB |
Before Width: | Height: | Size: 179 KiB |
Before Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 219 KiB |
Before Width: | Height: | Size: 278 KiB |
Before Width: | Height: | Size: 534 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 343 KiB |
Before Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.3 KiB |
|
@ -1,41 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[xpack-apm]]
|
||||
= APM
|
||||
|
||||
[partintro]
|
||||
--
|
||||
The APM app in {kib} allows you to monitor your software services and applications in real-time;
|
||||
visualize detailed performance information on your services,
|
||||
identify and analyze errors,
|
||||
and monitor host-level and APM agent-specific metrics like JVM and Go runtime metrics.
|
||||
|
||||
[float]
|
||||
[[apm-bottlenecks]]
|
||||
== Visualizing application bottlenecks
|
||||
|
||||
Having access to application-level insights with just a few clicks can drastically decrease the time you spend
|
||||
debugging errors, slow response times, and crashes.
|
||||
|
||||
For example, you can see information about response times, requests per minute, and status codes per endpoint.
|
||||
You can even dive into a specific request sample and get a complete waterfall view of what your application is spending its time on.
|
||||
You might see that your bottlenecks are in database queries, cache calls, or external requests.
|
||||
For each incoming request and each application error,
|
||||
you can also see contextual information such as the request header, user information,
|
||||
system values, or custom data that you manually attached to the request.
|
||||
--
|
||||
|
||||
:beat_kib_app: APM and User Experience
|
||||
|
||||
include::set-up.asciidoc[]
|
||||
|
||||
include::getting-started.asciidoc[]
|
||||
|
||||
include::how-to-guides.asciidoc[]
|
||||
|
||||
include::apm-app-users.asciidoc[]
|
||||
|
||||
include::settings.asciidoc[]
|
||||
|
||||
include::api.asciidoc[]
|
||||
|
||||
include::troubleshooting.asciidoc[]
|
|
@ -1,15 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[infrastructure]]
|
||||
=== Infrastructure
|
||||
|
||||
beta::[]
|
||||
|
||||
The *Infrastructure* tab provides information about the containers, pods, and hosts
|
||||
that the selected service is linked to.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/infra.png[Example view of the Infrastructure tab in APM app in Kibana]
|
||||
|
||||
IT ops and software reliability engineers (SREs) can use this tab
|
||||
to quickly find a service's underlying infrastructure resources when debugging a problem.
|
||||
Knowing what infrastructure is related to a service allows you to remediate issues by restarting, killing hanging instances, changing configuration, rolling back deployments, scaling up, scaling out, and so on.
|
|
@ -1,52 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[apm-lambda]]
|
||||
=== Observe Lambda functions
|
||||
|
||||
Elastic APM provides performance and error monitoring for AWS Lambda functions.
|
||||
See how your Lambda functions relate to and depend on other services, and
|
||||
get insight into function execution and runtime behavior, like lambda duration, cold start rate, cold start duration, compute usage, memory usage, and more.
|
||||
|
||||
To set up Lambda monitoring, see the relevant
|
||||
{apm-guide-ref}/monitoring-aws-lambda.html[quick start guide].
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/lambda-overview.png[lambda overview]
|
||||
|
||||
[float]
|
||||
[[apm-lambda-cold-start-info]]
|
||||
==== Cold starts
|
||||
|
||||
A cold start occurs when a Lambda function has not been used for a certain period of time. A lambda worker receives a request to run the function and prepares an execution environment.
|
||||
|
||||
Cold starts are an unavoidable byproduct of the serverless world, but visibility into how they impact your services can help you make better decisions about factors like how much memory to allocate to a function, whether to enable provisioned concurrency, or if it's time to consider removing a large dependency.
|
||||
|
||||
[float]
|
||||
[[apm-lambda-cold-start-rate]]
|
||||
===== Cold start rate
|
||||
|
||||
The cold start rate (i.e. proportion of requests that experience a cold start) is displayed per service and per transaction.
|
||||
|
||||
Cold start is also displayed in the trace waterfall, where you can drill-down into individual traces and see trace metadata like AWS request ID, trigger type, and trigger request ID.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/lambda-cold-start-trace.png[lambda cold start trace]
|
||||
|
||||
[float]
|
||||
[[apm-lambda-cold-start-latency]]
|
||||
===== Latency distribution correlation
|
||||
|
||||
The <<correlations-latency,latency correlations>> feature can be used to visualize the impact of Lambda cold starts on latency--just select the `faas.coldstart` field.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/lambda-correlations.png[lambda correlations example]
|
||||
|
||||
[float]
|
||||
[[apm-lambda-service-config]]
|
||||
==== AWS Lambda function grouping
|
||||
|
||||
The default APM agent configuration results in one APM service per AWS Lambda function,
|
||||
where the Lambda function name is the service name.
|
||||
|
||||
In some use cases, it makes more sense to logically group multiple lambda functions under a single
|
||||
APM service. You can achieve this by setting the `ELASTIC_APM_SERVICE_NAME` environment variable
|
||||
on related Lambda functions to the same value.
|
|
@ -1,19 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[logs]]
|
||||
=== Logs
|
||||
|
||||
The *Logs* tab shows contextual logs for the selected service.
|
||||
|
||||
// tag::log-overview[]
|
||||
Logs provide detailed information about specific events, and are crucial to successfully debugging slow or erroneous transactions.
|
||||
|
||||
If you've correlated your application's logs and traces, you never have to search for relevant data; it's already available to you. Viewing log and trace data together allows you to quickly diagnose and solve problems.
|
||||
|
||||
To learn how to correlate your logs with your instrumented services,
|
||||
see {observability-guide}/application-logs.html[log correlation]
|
||||
// end::log-overview[]
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/logs.png[Example view of the Logs tab in APM app in Kibana]
|
||||
|
||||
TIP: Logs displayed on this page are filtered on `service.name`
|
|
@ -1,73 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[machine-learning-integration]]
|
||||
=== Machine learning integration
|
||||
|
||||
++++
|
||||
<titleabbrev>Integrate with machine learning</titleabbrev>
|
||||
++++
|
||||
|
||||
The Machine learning integration initiates a new job predefined to calculate anomaly scores on APM transaction durations.
|
||||
With this integration, you can quickly pinpoint anomalous transactions and see the health of
|
||||
any upstream and downstream services.
|
||||
|
||||
Machine learning jobs are created per environment and are based on a service's average response time.
|
||||
Because jobs are created at the environment level,
|
||||
you can add new services to your existing environments without the need for additional machine learning jobs.
|
||||
|
||||
Results from machine learning jobs are shown in multiple places throughout the APM app:
|
||||
|
||||
* The **Services overview** provides a quick-glance view of the general health of all of your services.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::apm/images/service-quick-health.png[Example view of anomaly scores on response times in the APM app]
|
||||
|
||||
* The transaction duration chart will show the expected bounds and add an annotation when the anomaly score is 75 or above.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in the APM app]
|
||||
|
||||
* Service Maps will display a color-coded anomaly indicator based on the detected anomaly score.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-service-map-anomaly.png[Example view of anomaly scores on service maps in the APM app]
|
||||
|
||||
[float]
|
||||
[[create-ml-integration]]
|
||||
=== Enable anomaly detection
|
||||
|
||||
To enable machine learning anomaly detection:
|
||||
|
||||
. From the Services overview, Traces overview, or Service Map tab,
|
||||
select **Anomaly detection**.
|
||||
|
||||
. Click **Create Job**.
|
||||
|
||||
. Machine learning jobs are created at the environment level.
|
||||
Select all of the service environments that you want to enable anomaly detection in.
|
||||
Anomalies will surface for all services and transaction types within the selected environments.
|
||||
|
||||
. Click **Create Jobs**.
|
||||
|
||||
That's it! After a few minutes, the job will begin calculating results;
|
||||
it might take additional time for results to appear on your service maps.
|
||||
To manage existing jobs, click **Manage jobs**.
|
||||
|
||||
[float]
|
||||
[[warning-ml-integration]]
|
||||
=== Anomaly detection warning
|
||||
|
||||
To make machine learning as easy as possible to set up,
|
||||
the APM app will warn you when filtered to an environment without a machine learning job.
|
||||
|
||||
[role="screenshot"]
|
||||
image::apm/images/apm-anomaly-alert.png[Example view of anomaly alert in the APM app]
|
||||
|
||||
[float]
|
||||
[[unkown-ml-integration]]
|
||||
=== Unknown service health
|
||||
|
||||
After enabling anomaly detection, service health may display as "Unknown". Here are some reasons why this can occur:
|
||||
|
||||
1. No machine learning job exists. See <<create-ml-integration>> to enable anomaly detection and create a machine learning job.
|
||||
2. There is no machine learning data for the job. If you just created the machine learning job you'll need to wait a few minutes for data to be available. Alternatively, if the service or its enviroment are new, you'll need to wait for more trace data.
|
||||
3. No "request" or "page-load" transaction type exists for this service; service health is only available for these transaction types.
|