Unlike some other Atatus agents, the Go agent does not instrument your whole application automatically. It only creates transactions for the routes and handlers you explicitly wrap with the matching framework module. If some endpoints show up in Atatus and others do not, this is almost always the cause.
Check the middleware is applied
Every supported framework needs its own wrapper or middleware registered. For example, with net/http you wrap each handler individually:
http.Handle("/api/example1", athttp.Wrap(http.HandlerFunc(handleRequest)))
A handler registered without athttp.Wrap (or the equivalent for your framework, such as atgin.Middleware for Gin) will still serve requests normally, but Atatus never sees them.
Go through your route registrations and confirm each one is wrapped or covered by the middleware. For router-level middleware such as atgin.Middleware, make sure it is attached before any routes are registered, so it applies to the whole router:
router := gin.Default()
router.Use(atgin.Middleware(router))
// Routes registered after this line are instrumented
router.GET("/", handleRequest)
Check groups and subrouters
If your framework supports route groups or subrouters, confirm the middleware is applied to each group, not just the top-level router. A group created before Use is called, or a subrouter built from a separate instance, can bypass the middleware entirely.
Propagate the request context
Spans for database queries and downstream HTTP calls are attached to the transaction through the request context. Make sure your handler passes the context along instead of using context.Background():
func handleRequest(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
_ = db.QueryContext(ctx, "SELECT 'Atatus!'").Scan(&greeting)
}
If a handler creates a new background context for its downstream calls, those calls will not appear as spans under the transaction, even though the transaction itself shows up.
Still missing transactions?
If specific routes are still missing after confirming the middleware and context propagation, send your route setup code to success@atatus.com along with the framework and version you are using.
+1-415-800-4104