Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/telemetry/optout.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ func (s *Service) SendOptOutBeacon(ctx context.Context) error {
}
req.Header.Set("Content-Type", "application/json")

// The beacon is fire-and-forget from NotifyConfigChanged, so a Service
// built without a client (test literals do this) must not take the
// goroutine — and the test binary — down with a nil dereference.
if s.client == nil {
return errors.New("send opt-out beacon: no HTTP client configured")
}
resp, err := s.client.Do(req)
if err != nil {
return fmt.Errorf("send opt-out beacon: %w", err)
Expand Down
Loading