APM Filters

George Alpizar
George Alpizar
  • Updated

Overview

This filter type can be used to process Elastic APM logs.

This filter type samples failed and high-latency traces with successful traces and a sampling probability. 


Review Parameters

Review the following parameters that you can configure in the Edge Delta App:

Visual Editor YAML Description
Not applicable name

Enter a descriptive label for this filter / processor. 

When you create a workflow, you will use this label to enter your filter / processor into the workflow.

This parameter is required. 

Review the following example: 

name: elastic_apm_trace_filter
Not applicable type

Enter buffered-elastic-apm-processor.

This parameter is required. 

Review the following example: 

type: buffered-elastic-apm-processor
Not applicable payload_separator

Configure how to display separated, new elastic APM logs from each other, such as:  

  • <separator><metadata 1><trace 1-1>...<trace 1-x><separator><metadata 2><trace 2-1>...<trace 2-y>

This parameter is optional. 

Review the following example: 

payload_separator: "-----------------"
Not applicable enabled_types

Enter a comma-separated list of approved trace types to ingest and process, such as: 

  • "transaction", "span", "error" and "metricset"

Any ingested type that is not an enabled type will be discarded during tracing processing. 

transaction,span,error,metricset is the default value. 

This parameter is optional. 

Review the following example: 

enabled_types: "transaction,span,error,metricset"
Not applicable optimize_types

Enter a comma-separated list of trace types to optimize, such as: 

  • "transaction", "span", "error" and "metricset"

By default, optimized types are ignored, with the exception of success sampling, failure, and high latency conditions. 

transaction,span,error,metricset is the default value. 

This parameter is optional. 

Review the following example: 

optimize_types: "transaction,span"
Not applicable trace_deadline

Enter a deadline to wait for the last event of a trace. 

When a deadline is reached, the filter will be applied to the events of the trace. 

30s is the default value. 

This parameter is optional. 

Review the following example: 

trace_deadline: 1m
Not applicable should_filter_traces

Enter true or false to filter traces based on failures, high-latencies, and sampling rate. 

This parameter is optional. 

Review the following example: 

should_filter_traces: true
Not applicable failure_path

Enter the path where the failure information will be obtained from. 

The obtained value will be converted into a string. 

This parameter is optional. 

Review the following example: 

failure_path: "transaction.result"
Not applicable failure_value_pattern

Enter a pattern to match against the obtain value from failure_path.

This parameter is optional. 

Review the following example: 

failure_value_pattern: "HTTP (4|5)xx"
Not applicable transaction_latency_path

Enter a path to override the latency path for transactions.

transaction.duration is the default value. 

This parameter is optional. 

Review the following example: 

transaction_latency_path: "transaction.duration"
Not applicable span_latency_path

Enter a path to override the latency path for spans. 

span.duration is the default value. 

This parameter is optional. 

Review the following example: 

span_latency_path: "span.duration"
Not applicable latency_threshold

Enter a threshold value for latency. 

If a high-latency trace exceeds the entered value, then that trace will pass the filter. 

This parameter is optional. 

Review the following example: 

latency_threshold: 35.5
Not applicable success_sample_rate

Enter a floating number between 0 and 1. 

0.0 is the default value. 

This parameter is optional. 

Review the following example: 

success_sample_rate: 0.2

Review Sample Configuration

Review the following sample configuration: 

filters:
  - name: elastic_apm_trace_filter
    type: buffered-elastic-apm-processor
    payload_separator: "--------------------"
    enabled_types: "transaction,span,error,metricset"
    trace_deadline: 1m
    should_filter_traces: true
    failure_path: "transaction.result"
    failure_value_pattern: "HTTP (4|5)xx"
    transaction_latency_path: "transaction.duration"
    span_latency_path: "span.duration"
    latency_threshold: 2000.0
    success_sample_rate: 0.01

 

Share this document