func main()

in apps/simple-frontend-otel/main.go [22:38]


func main() {

	initTracer()

	// Create a new HTTP router to handle incoming client requests
	r := mux.NewRouter()

	r.Use(otelmux.Middleware("my-server"))

	// When client makes GET request to /hello-world
	// handler() will execute
	r.HandleFunc("/hello-world", handler).Methods(http.MethodGet)

	// Start the server and listen on localhost:8080
	http.ListenAndServe(":8080", r)

}