AutoMerge is generally available

Last updated:

Export Spam Filters

Build spam filters visually in Dash0, then export them as YAML for version control and deployment.

Once you have created spam filters as defined in Set Spam Filters, do the following:

  1. Navigate to Settings > Datasets in your organization.

  2. Select your dataset and click the Spam filters tab.

  3. Select your spam filter, name it, click Download, and download the YAML files of your choice.

    Export spam filter

Understand the Export Formats

You can download one or both of the following formats, depending on where you want the filter to run.

OpenTelemetry Collector YAML

The low-level OTTL representation of your filter, ready to drop into your own OpenTelemetry Collector's processors section. Use this to filter telemetry directly in your infrastructure, before it leaves your environment.

yaml
# This is a configuration snippet for the OpenTelemetry Collector filter processor.
# See: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/filterprocessor/README.md
processors:
  filter/ottl:
    logs:
      log_record:
        - '((resource.attributes["service.name"] != nil and ConvertCase(String(resource.attributes["service.name"]), "lower") == "api-gateway") or (attributes["service.name"] != nil and ConvertCase(String(attributes["service.name"]), "lower") == "api-gateway") or (instrumentation_scope.attributes["service.name"] != nil and ConvertCase(String(instrumentation_scope.attributes["service.name"]), "lower") == "api-gateway"))'

Spam Filter CRD

The declarative Dash0SpamFilter custom resource, used to manage the filter as code via the Dash0 Operator for Kubernetes. Use this when you want Dash0 to enforce the filter and prefer to version and deploy it alongside your other Kubernetes manifests.

yaml
apiVersion: v1alpha2
kind: Dash0SpamFilter
metadata:
  name: drop-health-checks
  labels:
    dash0.com/id: 43f4ac1b-c9e3-4a5b-836f-4de4b449607d
    dash0.com/source: ui
spec:
  context: log
  filter:
    - key: service.name
      operator: is
      value: health-check

Further Reading