Skip to content

Backfill

Deprecated, kept dark

log10x_backfill_metric is deprecated and kept dark: it stays registered and callable, but it has been removed from tool routing and is no longer advertised. Prefer the live isDropped metric surface below.

For overflow-volume and historical-volume questions, use the live isDropped metric surface instead. It answers the same questions as a TSDB query, with no archive read:

The schema below is kept as a historical reference only.

Historical schema reference

Input schema (historical reference)

The shape this tool published while it was live. Retained for reference; the tool is no longer routed.

{
  "type": "object",
  "properties": {
    "pattern": {
      "type": "string",
      "description": "Pattern to backfill — the symbolMessage (pattern name) or its tenx_hash. Use log10x_event_lookup first to resolve a raw log line."
    },
    "metric_name": {
      "type": "string",
      "description": "Destination metric name. Follow the destination TSDB's naming convention (e.g., `log10x.payment_retry_by_tenant`)."
    },
    "destination": {
      "type": "string",
      "enum": [
        "datadog",
        "prometheus",
        "cloudwatch",
        "elastic",
        "signalfx"
      ],
      "description": "Destination TSDB. Datadog and Prometheus (via remote_write adapter) were wired; CloudWatch/Elastic/SignalFx returned a clear \"not yet implemented\" error."
    },
    "bucket_size": {
      "type": "string",
      "default": "5m",
      "description": "Time bucket size. `1m`, `5m`, `1h`, `1d` are typical."
    },
    "aggregation": {
      "type": "string",
      "enum": [
        "count",
        "sum_bytes",
        "unique_values",
        "rate_per_second"
      ],
      "default": "count",
      "description": "How to aggregate events within each bucket. `count` is the default and matches the \"how many events happened\" question."
    },
    "from": {
      "type": "string",
      "description": "Start of the backfill window — ISO8601 (`2026-01-15T00:00:00Z`) or relative (`now-90d`)."
    },
    "to": {
      "type": "string",
      "default": "now",
      "description": "End of the backfill window — ISO8601 or relative. Default `now`."
    },
    "group_by": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Fields to group on — each unique combination becomes its own time series. Pass enriched-metric label names (`service`, `severity`, `tenant_id`, `http_code`, ...)."
    },
    "filters": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional JS filter expressions over event payloads, passed through to the Retriever query."
    },
    "unique_field": {
      "type": "string",
      "description": "For aggregation=unique_values: the field whose distinct count is taken per bucket (e.g., `tenant_id`)."
    },
    "emit_forward": {
      "type": "boolean",
      "default": false,
      "description": "When true, wire the live Reporter to continue emitting the same metric from current events going forward."
    },
    "environment": {
      "type": "string",
      "description": "Environment nickname — required if multi-env."
    },
    "view": {
      "type": "string",
      "const": "summary",
      "default": "summary",
      "description": "summary returns the typed envelope (data.metric_name, data.events_retrieved, data.points_emitted, data.view_url, data.warnings, data.human_summary)."
    },
    "dry_run": {
      "type": "boolean",
      "default": false,
      "description": "When true, runs the fetch and aggregation but skips the write. Returns the same envelope shape with dry_run=true and points_would_emit count."
    }
  },
  "required": [
    "pattern",
    "metric_name",
    "destination",
    "from"
  ],
  "additionalProperties": false
}

Source: src/tools/backfill-metric.ts.