End-to-end analysis performance throughout microservice by tracing entire of a request.
- It will inject a traceparent into HTTP header outgoing requests.
- Incoming requests will check HTTP header tracing metadata to get trace-id. If it exists, it adds child span to parent span, if not it creates a new span.
Run docker-compose up. Compose will download the official docker containers and start Elasticsearch, Kibana, and APM Server.
Add apmhttp wrapper for middleware handler
http.ListenAndServe(":8080", apmhttp.Wrap(mux))
Add apmhttp client wrapper for http request
client := apmhttp.WrapClient(http.DefaultClient)
Use the APM app at http://localhost:5601/app/apm to visualize your application performance data!