getsentry / team-webplatform-meta

0 stars 0 forks source link

Go SDK Roadmap #13

Open smeubank opened 1 year ago

smeubank commented 1 year ago

Go SDK roadmap v1.0.0

Better performance API

Move all integrations into their own submodules

The sentry-otel module will be the first attempt to solve this issue, leading the way for other integrations to follow.

Performance tracing out of the box

We currently only offer performance tracing for net/http and should expand this to all integrations by default.

Add gRPC integration

available in OTel

gRPC is widely used in Go, so the SDK should ship with a default integration.

Add Fiber support

Fiber is one of Go's biggest frameworks, so the SDK ship with a default integration.

(Stretch goal) Add Buffalo support

A framework that is closer to other languages' frameworks like Ruby on Rails or Laravel.

(Stretch goal) Add support for more logging libraries

TBD

SDK usage in Go routines

The current APIs exposed are insufficient and hard to understand when working with Go routines. We should make it easier to clone and set the Hub/Scope on the context when using Go routines.

go func(ctx *conext.Context) {
    // Explicitly set a new Hub on the context
    sentry.SetHubOnContext(sentry.GetHubFromContext(ctx).Clone())
    ...
    hub := sentry.GetHubFromContext(ctx)
}
go func() {
    // Replaces sentry.GetCurrentHub()
    hub := sentry.GetGlobalHub().Clone()
}

Investigate: SDK configuration via functional options

With the current approach (passing ClientOptions to sentry.Init), we can't always say if the configuration option was passed or not (e.g., Golang will initialize all boolean flags to false, if they're not set to true in ClientOptions). Functional options (resource1, resource2) is a pattern that is sometimes used to handle cases like this.

Misc


Road to Performance and OTEL

Performance feature Parity

Misc:

smeubank commented 1 year ago

@tonyo & @cleptric converting this to an issue on meta repo, did either of you have a chance to check this if there's any big points to add for Go 1.0

some of these checklist items are done or in progress of done already if memory serves correct

smeubank commented 1 year ago

Short list of short term investments: