Skip to content

feat: Add XPING_TAGS support for structured filterable run metadata #98

@xping-admin

Description

@xping-admin

Problem

Local runs (and some CI runs) lack structured metadata that would allow filtering and grouping in the Dashboard. A developer cannot currently annotate a run with information like which team owns it, which JIRA ticket it relates to, or which machine profile was used — making Dashboard search and filtering over local runs impractical.

Proposed Solution

Add an optional Tags configuration property accepting a Dictionary<string, string> with a corresponding XPING_TAGS environment variable override using a comma-separated key:value format (Datadog convention).

Behaviour

  • Tags are a set of key:value string pairs attached at the session level (not per-test).
  • XPING_TAGS env var uses comma-separated key:value format; it merges with (and overrides) any tags set in config.
  • Keys and values are case-insensitive, trimmed.
  • Tags are included in the upload payload and stored as a JSON column on the session entity in the Dashboard.
  • Tags are indexed for faceted filtering in the Dashboard (e.g. filter by developer:jane or ticket:JIRA-1234).

Configuration

Via appsettings.json / SDK options:

{
  "Xping": {
    "Tags": {
      "team": "payments",
      "ticket": "JIRA-1234"
    }
  }
}

Via environment variable:

export XPING_TAGS="developer:jane,branch:feat/payment,ticket:JIRA-1234,machine:macbook-m3"

Naming rationale

XPING_TAGS (plural) follows the Datadog DD_TAGS convention. It is distinct from the per-test Tags already present on TestMetadata — this is a session-level concept.

Industry References

  • Datadog Test Visibility: DD_TAGS with key:value comma-separated format is the direct precedent.
  • Playwright and Cypress both support --tag CLI flags for session-level labelling.
  • OpenTelemetry resource attributes use the same structured key=value pattern for signal metadata.

Acceptance Criteria

  • XpingConfiguration has a nullable Tags property (Dictionary<string, string>?)
  • XPING_TAGS env var (key:value,key:value) is parsed and merged with config tags (env takes precedence on key conflicts)
  • Invalid key:value entries in XPING_TAGS are skipped with a warning (not a hard failure)
  • Tags are included in the upload payload sent to the Dashboard API
  • Unit tests cover: env var parsing, config merging, conflict resolution, malformed input handling
  • SDK documentation / README updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions