Hi Arsalan, thanks for trying out the Elastic APM Go agent!
The Go agent starts a background goroutine to send events to the APM Server. What's happening here is that your process is exiting before the goroutine has a chance to send them.
For testing purposes, Tracer has a method called Flush, which you can call to force any enqueued events to be flushed to the server. Tracer.Flush takes a single argument, a channel which will abort the flush (you can pass nil to wait until the flush completes, successfully or not.)
So just add this to the end of your main function:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.