# ElasticAPM

## 1. 개요

Elastic Stack에 구성된 APM(Application Performance Monitoring) 시스템으로, Elasticsearch를 데이터 저장소로 사용한다.

### APM Components

* Elasticsearch
* APM Agents
* APM Server
* Kibana APM UI

![](https://1967639135-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LE8_fwLnI2gUuguYTDU%2F-LFMbMnJRQcUymRjBvjP%2F-LFMbNCmaNUHgumpbRJL%2Felasticapm-components.png?generation=1529404557236644\&alt=media)

각 서버에 설치된 APM agents들이 응답 시간, DB처리시간, 외부 HTTP 요청, 에러 등과 같은 퍼포먼스 관련 데이터들을 수집하여 APM Server로 전송한다.

APM Server는 agent에서 받은 데이터로 도큐먼트를 만들어 Elasticsearch에 저장한다. 저장된 데이터는 X-Pack에 포함된 APM UI나 Kibana Dashboard를 통해 시각화 한다.

APM Server는 Go로 개발되었고, APM Agent는 Node.js, Python를 제공한다. (Ruby, Javascript 제공 예정)

## 참고

#### Elastic APM vs Pinpoint

|               | Elastic APM                                                                                                          | Pinpoint                                                                                                                                                                                                         | 비교                                                                                     |
| ------------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| Visualization | <p>Kibana Dashboard 또는 전용 UI 사용 <br>- Application (Response/Request Info) <br>- Error Tracking <br>- Transaction</p> | <p>별도 UI Server 구성 <br>- ServerMap <br>- Realtime Active Thread Chart <br>- Request/Response Scatter Chart <br>- Transaction Callstack <br>- Inspector (CPU usage, Memory/Garbage Collection, TPS, JVM args)</p> | <p>pinpoint)<br>더 다양한 동적 UI 제공 <br> APM)<br>ELK Stack 사용할 경우 별도 UI 구성 필요없음(Kibana)</p> |
| Store         | Elasticsearch                                                                                                        | HBase                                                                                                                                                                                                            | <p>APM)<br>ELK Stack 사용할 경우 별도 DB 구성 필요없음</p>                                          |
| Language      | <p>Server - GO <br>Agent - Python, Nodejs</p>                                                                        | Agent/Collector/Web - JAVA                                                                                                                                                                                       | .                                                                                      |

<https://www.elastic.co/guide/en/apm/get-started/current/install-and-run.html#agents> <http://naver.github.io/pinpoint/index.html>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://coe.gitbook.io/guide/tracing/elasticapm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
