Fix stack trace, duplicates and better coverage of captured errors in APM (#16516)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
apm-server:
|
||||
host: apm-server:8200
|
||||
frontend.enabled: true
|
||||
frontend.allow_origins: "*"
|
||||
|
||||
output.elasticsearch:
|
||||
enabled: true
|
||||
hosts: ["elasticsearch"]
|
||||
|
||||
setup.kibana:
|
||||
host: "kibana"
|
||||
@@ -0,0 +1,30 @@
|
||||
# Running a local Elastic/Kibana APM
|
||||
|
||||
## Setup
|
||||
|
||||
To setup a full Elastic APM stack, from this directory, run:
|
||||
|
||||
```
|
||||
$ docker-compose up -d
|
||||
$ docker-compose exec apm-server ./apm-server setup
|
||||
```
|
||||
|
||||
Give it a few seconds to complete setup, and then you should be able to view the APM website at `http://localhost:5601`.
|
||||
|
||||
## Configuring local Fleet
|
||||
|
||||
Make sure Fleet is ready to run locally (docker services are started, binary is built, etc., see [Testing and local development](../../docs/Contributing/Testing-and-local-development.md)).
|
||||
|
||||
Start the locally-built Fleet (`fleet serve`) and provide the `--logging_tracing_enabled --logging_tracing_type=elasticapm` flags (note that sending those options using environment variables does not seem to work).
|
||||
|
||||
Navigate the Fleet website and you should start seeing API requests and (eventually) errors show up in the APM dashboard (http://localhost:5601/app/apm).
|
||||
|
||||
You may set the following environment variables to further configure the APM data collection:
|
||||
|
||||
```
|
||||
ELASTIC_APM_SERVICE_NAME=fleet
|
||||
ELASTIC_APM_ENVIRONMENT=development
|
||||
ELASTIC_APM_TRANSACTION_SAMPLE_RATE=1
|
||||
```
|
||||
|
||||
The default values should be fine for a local environment (in particular, the sample rate defaults to 1.0 so all events are recorded).
|
||||
@@ -0,0 +1,45 @@
|
||||
# From https://gist.github.com/sarriaroman/98289f3a1ae1cf46a801c89f2990c8fa
|
||||
|
||||
# This docker-compose file will set up Elastic APM, Kibana and Elasticsearch containers
|
||||
# and the apm-server.yml configuration file ensures that APM can talk to Kibana. Once
|
||||
# the servers are up and running you should be able to browse http://localhost:5601
|
||||
# and see Kibana running.
|
||||
# In order to set up the APM dashboards, you will need to run the `./apm-server -setup`
|
||||
# command on the running apm-server container:
|
||||
# $ docker-compose up -d
|
||||
# Starting elasticsearch_1 ... done
|
||||
# Starting kibana_1 ... done
|
||||
# Starting apm-server_1 ... done
|
||||
# $ docker-compose exec apm-server ./apm-server setup
|
||||
# Loaded index template
|
||||
# Loaded dashboards
|
||||
#
|
||||
# You should now be able to browse http://localhost:5601 and see the APM dashboards in Kibana.
|
||||
version: "3"
|
||||
services:
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
kibana:
|
||||
image: docker.elastic.co/kibana/kibana:7.8.0
|
||||
ports:
|
||||
- "5601:5601"
|
||||
links:
|
||||
- elasticsearch
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
apm-server:
|
||||
image: docker.elastic.co/apm/apm-server:7.8.0
|
||||
ports:
|
||||
- "8200:8200"
|
||||
volumes:
|
||||
- ./.apm-server.yml:/usr/share/apm-server/apm-server.yml
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
links:
|
||||
- elasticsearch
|
||||
- kibana
|
||||
Reference in New Issue
Block a user