getsentry / sentry-go

The official Go SDK for Sentry (sentry.io)
https://docs.sentry.io/platforms/go/
MIT License
922 stars 213 forks source link

Auto Instrumentation for Performance Monitoring #390

Open odannyc opened 3 years ago

odannyc commented 3 years ago

Summary

I'd like for sentry-go to provide ways to auto-instrument multiple common integrations. The most common ones are database/sql, pq, http...

Motivation

New Relic, DataDog and other packages that provide tracing already have these helper methods of instrumenting your application. Here is just one example of New Relic giving you ways to instrument the pq library: https://github.com/newrelic/go-agent/blob/master/v3/integrations/nrpq/README.md

Here are all the instrumentation helpers that datadog gives you:

https://github.com/DataDog/dd-trace-go/tree/v1/contrib

aldy505 commented 7 months ago

@cleptric Is this still on track? I have my own implementation for some things that I often use here https://github.com/aldy505/sentry-integration, most users probably will use the pgx and http.Client one. But I don't know if this approach aligns with tracing with otel.

cleptric commented 7 months ago

http.Client would be a good candidate, but we must first ship Tracing without Performance. With the new APIs added here, we can always attach a sentry-trace and baggage header, regardless of performance being enabled or not.