We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb57272 commit d76dfaeCopy full SHA for d76dfae
docs/api.asciidoc
@@ -409,8 +409,9 @@ Return the altered payload.
409
410
If `nil` is returned all subsequent filters will be skipped and the post request cancelled.
411
412
-Example:
+Examples:
413
414
+Altering payload
415
[source,ruby]
416
----
417
ElasticAPM.add_filter(:filter_pings) do |payload|
@@ -421,6 +422,17 @@ ElasticAPM.add_filter(:filter_pings) do |payload|
421
422
end
423
424
425
+Filtering payload
426
+[source,ruby]
427
+----
428
+ElasticAPM.add_filter(
429
+ :remove_redis_spans,
430
+ Proc.new do |payload|
431
+ payload.dig(:span, :type) == 'db.redis' ? nil : payload
432
+ end
433
+)
434
435
+
436
[float]
437
[[api-transaction]]
438
=== Transaction
0 commit comments