mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-15 12:58:33 +00:00
Full rebrand of the SigNoz observability platform: - Go module: github.com/SigNoz/signoz → github.com/hanzoai/o11y - Frontend: @signozhq/* → @hanzo/o11y-*, posthog-js → @hanzo/insights - Docker: signoz/* → ghcr.io/hanzoai/o11y* - ClickHouse → Hanzo Datastore (hanzoai/datastore) - Env vars: SIGNOZ_* → HANZO_* - DB tables: signoz_* → o11y_* - All branding, URLs, docs updated - 2172 files changed
54 lines
1.3 KiB
Go
54 lines
1.3 KiB
Go
package noopanalytics
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzoai/o11y/pkg/analytics"
|
|
"github.com/hanzoai/o11y/pkg/factory"
|
|
"github.com/hanzoai/o11y/pkg/types/analyticstypes"
|
|
)
|
|
|
|
type provider struct {
|
|
stopC chan struct{}
|
|
}
|
|
|
|
func NewFactory() factory.ProviderFactory[analytics.Analytics, analytics.Config] {
|
|
return factory.NewProviderFactory(factory.MustNewName("noop"), New)
|
|
}
|
|
|
|
func New(ctx context.Context, providerSettings factory.ProviderSettings, config analytics.Config) (analytics.Analytics, error) {
|
|
return &provider{
|
|
stopC: make(chan struct{}),
|
|
}, nil
|
|
}
|
|
|
|
func (provider *provider) Start(_ context.Context) error {
|
|
<-provider.stopC
|
|
return nil
|
|
}
|
|
|
|
func (provider *provider) Send(ctx context.Context, messages ...analyticstypes.Message) {
|
|
// do nothing
|
|
}
|
|
|
|
func (provider *provider) TrackGroup(ctx context.Context, group, event string, attributes map[string]any) {
|
|
// do nothing
|
|
}
|
|
|
|
func (provider *provider) TrackUser(ctx context.Context, group, user, event string, attributes map[string]any) {
|
|
// do nothing
|
|
}
|
|
|
|
func (provider *provider) IdentifyGroup(ctx context.Context, group string, traits map[string]any) {
|
|
// do nothing
|
|
}
|
|
|
|
func (provider *provider) IdentifyUser(ctx context.Context, group, user string, traits map[string]any) {
|
|
// do nothing
|
|
}
|
|
|
|
func (provider *provider) Stop(_ context.Context) error {
|
|
close(provider.stopC)
|
|
return nil
|
|
}
|