New Fluxzy v2 just shipped. Electron is out, Tauri is in. gRPC ready, 3x smaller install. Learn more

applyTagAction Action

Attach a structured tag to matching exchanges so downstream filters and exports can recognise them programmatically.

Captures get hard to work with once they grow past a few hundred exchanges, and free form comments only go so far. applyTagAction lets you build a small vocabulary of structured labels that filters can act on and exports can group by, which is what turns a raw packet capture into something you can build reports and dashboards on.

When to use this action

Use applyTagAction when you need a machine readable label on an exchange. Unlike applyCommentAction, a tag has a stable identifier and a value, so other rules and tools can act on it.

Typical situations include:

  • Marking exchanges that belong to a specific test step so a reporting tool can group them.
  • Building rule pipelines where later rules check hasTagFilter to decide whether to fire.
  • Exporting captured traffic and post processing it with scripts that look for known tag identifiers.
  • Differentiating sessions or scenarios when several tests share one Fluxzy instance.

The action evaluates on requestHeaderReceivedFromClient. Choose stable GUIDs for the identifier so tools never confuse two unrelated tags with the same label.

Real world examples

Tag every request that goes through the checkout flow

Use a stable GUID so the tag survives renames and is easy to grep in exports.

rules:
- filter:
    typeKind: PathFilter
    pattern: ^/checkout/
    operation: Regex
  actions:
  - typeKind: ApplyTagAction
    tag:
      identifier: 0f6e1a8a-1d3a-4f2c-9d8b-2d8c5b3a4e1d
      value: checkout-flow

Tag and then filter on the same tag later

Use the tag as a routing primitive. A second rule fires only when a previous rule applied the tag.

rules:
- filter:
    typeKind: HostFilter
    pattern: api.example.com
  actions:
  - typeKind: ApplyTagAction
    tag:
      identifier: a1f4d2e8-9b2e-4a1c-8f4a-3a2b7c1d9e0a
      value: api-traffic
- filter:
    typeKind: HasTagFilter
    tag:
      identifier: a1f4d2e8-9b2e-4a1c-8f4a-3a2b7c1d9e0a
  actions:
  - typeKind: ApplyCommentAction
    comment: "API exchange, see runbook"

Differentiate two test runs that share the same proxy

Two scenarios can run in parallel through one Fluxzy. Tag them differently so exports can be split per run.

rules:
- filter:
    typeKind: ProcessNameFilter
    pattern: pytest-run-a
  actions:
  - typeKind: ApplyTagAction
    tag:
      identifier: 2b1f8c4d-7e5a-4d3b-9c2a-1e8f3b5d7c9a
      value: scenario-a

Reference

applyTagAction

Description

Affect a tag to exchange. Tags are meta-information and do not alter the connection.

Evaluation scope

Evaluation scope defines the timing where this filter will be applied.

requestHeaderReceivedFromClient This scope occurs the moment fluxzy parsed the request header receiveid from client

YAML configuration name

applyTagAction

Settings

This action has no specific characteristic

Example of usage

The following examples apply this action to any exchanges

Add tag Hello fluxzy.

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: ApplyTagAction
    tag:
      identifier: 852d1563-5664-4f17-a4f2-bfe5f7c4993a
      value: Hello fluxzy

.NET reference

View definition of ApplyTagAction for .NET integration.

See also

The following actions are related to this action:

Frequently asked questions

Why does the tag need an identifier and a value?

The identifier is the stable key that filters and exports compare on, while the value is the human readable label. Picking a GUID for identifier guarantees no accidental collisions across teams.

Can I apply several tags to the same exchange?

Yes. List multiple ApplyTagAction entries under the same actions array. Each one adds an independent tag.

What is the difference with applyCommentAction?

Comments are unstructured text aimed at people reading the capture. Tags are structured and meant for programs and filters.

Are tags visible in HAR exports?

Yes. Tags are written into the exported exchange metadata so external tooling can read them without using Fluxzy directly.

Learn more about Fluxzy rules