How can add APM tracing in below very simple go code, which use net/http
.
package main
import (
"fmt"
"net/http"
)
func helloHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello, World!")
}
func main() {
http.HandleFunc("/hello", helloHandler)
http.ListenAndServe(":8080", nil)
}
Do we use Built-in instrumentation modules | APM Go Agent Reference [2.x] | Elastic module for that how?
New to golang and Apm. I see most of example either with mux or gin.