Skip to content

Commit

Permalink
docs: Add note about transaction x event sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
rhcarvalho committed Feb 16, 2021
1 parent e234356 commit 862d3c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,9 @@ func (client *Client) processEvent(event *Event, hint *EventHint, scope EventMod
options.SampleRate = 1.0
}

// Transactions are sampled by options.TracesSampleRate or
// options.TracesSampler when they are started. All other events
// (errors, messages) are sampled here.
if event.Type != transactionType && !sample(options.SampleRate) {
Logger.Println("Event dropped due to SampleRate hit.")
return nil
Expand Down

0 comments on commit 862d3c2

Please sign in to comment.