Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProviderSegment represents Segment. ProviderSegment = "segment" // ProviderRudderstack represents Rudderstack. ProviderRudderstack = "rudderstack" // ProviderPostHog represents PostHog. ProviderPostHog = "posthog" )
Variables ¶
View Source
var ( // ProvidersAnalytics are what we provide to dependency injection. ProvidersAnalytics = wire.NewSet( ProvideEventReporter, ) )
Functions ¶
func ProvideEventReporter ¶
func ProvideEventReporter(cfg *Config, logger logging.Logger, tracerProvider tracing.TracerProvider) (analytics.EventReporter, error)
ProvideEventReporter provides a analytics.EventReporter from a config.
Types ¶
type Config ¶
type Config struct { Segment *segment.Config `json:"segment" toml:"segment,omitempty"` Posthog *posthog.Config `json:"posthog" toml:"posthog,omitempty"` Rudderstack *rudderstack.Config `json:"rudderstack" toml:"rudderstack,omitempty"` Provider string `json:"provider" toml:"provider,omitempty"` }
Config is the configuration structure.
func (*Config) ProvideCollector ¶
func (cfg *Config) ProvideCollector(logger logging.Logger, tracerProvider tracing.TracerProvider) (analytics.EventReporter, error)
ProvideCollector provides a collector.
Click to show internal directories.
Click to hide internal directories.