File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -171,18 +171,18 @@ defmodule Sentry.Config do
171171 type_doc: "`t:traces_sampler_function/0` or `nil`" ,
172172 doc: """
173173 A function that determines the sample rate for transaction events. This function
174- receives a sampling context map and should return a boolean or a float between `0.0` and `1.0`.
174+ receives a sampling context struct and should return a boolean or a float between `0.0` and `1.0`.
175175
176176 The sampling context contains:
177- - `:parent_sampled` - boolean indicating if the parent trace was sampled (nil if no parent)
177+ - `:parent_sampled` - boolean indicating if the parent trace span was sampled (nil if no parent)
178178 - `:transaction_context` - map with transaction information (name, op, etc.)
179179
180180 If both `:traces_sampler` and `:traces_sample_rate` are configured, `:traces_sampler` takes precedence.
181181
182182 Example:
183183 ```elixir
184184 traces_sampler: fn sampling_context ->
185- case sampling_context[: transaction_context][:op] do
185+ case sampling_context. transaction_context.op do
186186 "http.server" -> 0.1 # Sample 10% of HTTP requests
187187 "db.query" -> 0.01 # Sample 1% of database queries
188188 _ -> false # Don't sample other operations
You can’t perform that action at this time.
0 commit comments