Skip to content

Commit fb3bced

Browse files
committed
Update docs
1 parent 27bfc44 commit fb3bced

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/sentry/config.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)