-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Something like this:
client, err := posthog.NewWithConfig(
config.Posthog.APIKey,
posthog.Config{},
)
if err != nil {
log.Fatal("failed to initialize", "error", err)
}
client.BeforeSend(func(msg posthog.Message) posthog.Message {
switch m := msg.(type) {
case posthog.Exception:
// would be nice if we can access the actual exception here,
// instead of just the already transformed data
return m
default:
return m
}
})
client.BeforeSend(func(msg posthog.Message) posthog.Message {
// is not sent if `nil` is returned
return nil
})
client.BeforeSend(func(msg posthog.Message) posthog.Message {
// never runs
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request