You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
github.com/go-chi/chi/v5 v5.0.12 with go.elastic.co/apm/module/apmchiv5/v2 v2.5.0
gorm.io/gorm v1.25.5 with go.elastic.co/apm/module/apmgormv2/v2 v2.5.0
When i pass my DB object to my handlers I call .WithContext() using r *http.Request passed from chi to the handler. I am able to see the dependency for postgress and some metrics. However I am unable to see the spans in the http requests.
double checked the request object to make sure the transaction information was present and it is
To Reproduce
Steps to reproduce the behaviour:
var database, _ = gorm.Open(postgres.Open("dsn"), &gorm.Config{})
func handler(w http.ResponseWriter, r *http.Request) error {
var projects []models.Project
var responseWrapper models.ResponseWrapper[[]models.Project]
database.WithContext(r.Context()).Preload(clause.Associations).Order("Name").Find(&projects)
if len(projects) > 0 {
responseWrapper.Data = projects
} else {
responseWrapper.Data = []models.Project{}
}
w.WriteHeader(http.StatusOK)
w.Write(responseWrapper.Marshal())
return nil
}
Expected behavior
I would expect to see spans in the http transactions for my database queries.
The text was updated successfully, but these errors were encountered:
Describe the bug
I am using a combination of:
github.com/go-chi/chi/v5 v5.0.12 with go.elastic.co/apm/module/apmchiv5/v2 v2.5.0
gorm.io/gorm v1.25.5 with go.elastic.co/apm/module/apmgormv2/v2 v2.5.0
go.elastic.co/apm/module/apmsql/v2 v2.5.0 // indirect
go.elastic.co/apm/v2 v2.5.0 // indirect
When i pass my DB object to my handlers I call
.WithContext()
usingr *http.Request
passed from chi to the handler. I am able to see the dependency for postgress and some metrics. However I am unable to see the spans in the http requests.double checked the request object to make sure the transaction information was present and it is
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
I would expect to see spans in the http transactions for my database queries.
The text was updated successfully, but these errors were encountered: