Method: Sentry::Configuration#traces_sampler

Defined in:
lib/sentry/configuration.rb

#traces_samplerProc

Take a Proc that controls the sample rate for every tracing event, e.g.

Examples:

config.traces_sampler =  lambda do |tracing_context|
  # tracing_context[:transaction_context] contains the information about the transaction
  # tracing_context[:parent_sampled] contains the transaction's parent's sample decision
  true # return value can be a boolean or a float between 0.0 and 1.0
end

Returns:

  • (Proc)
[View source]

263
264
265
# File 'lib/sentry/configuration.rb', line 263

def traces_sampler
  @traces_sampler
end