RUM Relabel Rules

RUM relabel rules run on every incoming RUM event — views, actions, resources, errors, long tasks, and vitals — before Kloudfuse stores it. Use them to drop events from test environments or synthetic traffic and to add labels. For the rule fields, actions, and evaluation order, see How Relabel Rules Work.

Configure the rules

Add the rules to ingester.config.rum.relabelConfigs in your custom-values.yaml file:

ingester:
  config:
    rum:
      relabelConfigs:
        - source_labels: [env]
          regex: "dev|test"
          action: drop
yaml

Then apply the change:

helm upgrade --install kfuse oci://us-east1-docker.pkg.dev/mvp-demo-301906/kfuse-helm/kfuse \
  -n kfuse \
  --version <VERSION> \ (1)
  -f custom-values.yaml
bash
1 Replace <VERSION> with a valid Kloudfuse release value. See Release Notes for the latest release.

Labels the rules see

Rules see the event’s RUM attributes, under their original dotted names. Write them in source_labels exactly as shown:

Group Attributes

Application

service, env, version, source

Session and user

session.type, session.has_replay, usr.id, usr.name, usr.email

View

view.name, view.url, view.url_host, view.url_path, view.url_scheme, view.referrer

Browser and device

browser.name, browser.version, os.name, os.version, device.type

Location

geo.country, geo.country_iso_code, geo.city, geo.continent

Event type

Actions add action.name and action.frustration.type; errors add error.fingerprint.

Labels added by an ingestion API key are also visible. Rules can match these labels but cannot change them.

The application ID is not one of the labels, so a rule cannot match on it. To separate applications, match service, or send each application with its own ingestion API key and match the labels the key adds.

Examples

Each example shows a single rule. You can list as many rules as you need; they run in order.

Drop events from test environments

Stop storing RUM events from the dev and test environments:

- source_labels: [env]
  regex: "dev|test"
  action: drop
yaml

Drop synthetic sessions

Stop storing events from synthetic test sessions:

- source_labels: [session.type]
  regex: "synthetics"
  action: drop
yaml

Drop events from a staging host

Stop storing events from pages served by staging.example.com:

- source_labels: [view.url_host]
  regex: "staging\\.example\\.com"
  action: drop
yaml

Check the result

RUM events dropped by a rule appear in the Consumption Tracking dashboard with the drop reason relabel.