Skip to content

dungtc/apm-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ELASTIC APM - GOLANG AGENT

End-to-end analysis performance throughout microservice by tracing entire of a request.

Propagation APM agent

  • 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.

Compose

Run docker-compose up. Compose will download the official docker containers and start Elasticsearch, Kibana, and APM Server.

SERVER

Add apmhttp wrapper for middleware handler

http.ListenAndServe(":8080", apmhttp.Wrap(mux))

CLIENT

Add apmhttp client wrapper for http request

client := apmhttp.WrapClient(http.DefaultClient)

Visualize

Use the APM app at http://localhost:5601/app/apm to visualize your application performance data!