{
  "repo": "tidbcloud/VictoriaMetrics",
  "binary": "vminsert",
  "binary_path": "app/vminsert/main.go",
  "services": [
    {
      "name": "VMinsertLifecycle",
      "package": "main",
      "methods": [
        {
          "name": "Startup",
          "input": "flags + environment variables",
          "output": "initialized relabeling, netstorage, parser workers, optional protocol listeners, main HTTP server, and pushmetrics loop",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.Startup"
        },
        {
          "name": "InitializeNetstorage",
          "input": "storageNode flags + hash seed",
          "output": "sorted vmstorage dialers, consistent hash ring, and background vmstorage sender/health workers",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.InitializeNetstorage"
        },
        {
          "name": "InitializeRelabeling",
          "input": "relabelConfig + relabelConfigCheckInterval + usePromCompatibleNaming",
          "output": "loaded relabel pipeline and optional config reload watcher",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.InitializeRelabeling"
        },
        {
          "name": "InitializeTimeSeriesLimits",
          "input": "maxLabelsPerTimeseries + maxLabelNameLen + maxLabelValueLen",
          "output": "global validation limits for accepted time series",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.InitializeTimeSeriesLimits"
        },
        {
          "name": "StartUnmarshalWorkers",
          "input": "protoparser worker settings",
          "output": "running background unmarshal worker pool",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StartUnmarshalWorkers"
        },
        {
          "name": "StartClusterNativeListener",
          "input": "clusternativeListenAddr",
          "output": "optional TCP listener for upstream vminsert traffic",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StartClusterNativeListener"
        },
        {
          "name": "StartGraphiteListener",
          "input": "graphiteListenAddr + graphiteListenAddr.useProxyProtocol",
          "output": "optional TCP/UDP Graphite plaintext listener",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StartGraphiteListener"
        },
        {
          "name": "StartInfluxListener",
          "input": "influxListenAddr + influxListenAddr.useProxyProtocol",
          "output": "optional TCP/UDP Influx line protocol listener",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StartInfluxListener"
        },
        {
          "name": "StartOpenTSDBListener",
          "input": "opentsdbListenAddr + opentsdbListenAddr.useProxyProtocol",
          "output": "optional TCP/UDP OpenTSDB listener serving telnet put and HTTP put on the same port",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StartOpenTSDBListener"
        },
        {
          "name": "StartOpenTSDBHTTPListener",
          "input": "opentsdbHTTPListenAddr + opentsdbHTTPListenAddr.useProxyProtocol",
          "output": "optional dedicated OpenTSDB HTTP listener",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StartOpenTSDBHTTPListener"
        },
        {
          "name": "StartHTTPServer",
          "input": "httpListenAddr + httpListenAddr.useProxyProtocol",
          "output": "main HTTP listener serving builtin routes and insert endpoints",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StartHTTPServer"
        },
        {
          "name": "InitializePushMetrics",
          "input": "pushmetrics flags",
          "output": "optional metrics push loop",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.InitializePushMetrics"
        },
        {
          "name": "WaitForSigterm",
          "input": "SIGINT or SIGTERM",
          "output": "shutdown sequence trigger",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.WaitForSigterm"
        },
        {
          "name": "StopPushMetrics",
          "input": "shutdown signal",
          "output": "terminated pushmetrics loop",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StopPushMetrics"
        },
        {
          "name": "StopHTTPServer",
          "input": "httpListenAddr list",
          "output": "gracefully stopped main HTTP listeners",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StopHTTPServer"
        },
        {
          "name": "StopProtocolListeners",
          "input": "optional listener instances",
          "output": "stopped clusternative, graphite, influx, opentsdb, and opentsdbhttp listeners",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StopProtocolListeners"
        },
        {
          "name": "StopUnmarshalWorkers",
          "input": "worker pool state",
          "output": "stopped parser worker pool",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StopUnmarshalWorkers"
        },
        {
          "name": "StopNetstorage",
          "input": "storage node bucket",
          "output": "stopped vmstorage sender/health workers and unregistered RPC metrics",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StopNetstorage"
        },
        {
          "name": "StopRelabeling",
          "input": "relabel watcher state",
          "output": "stopped optional relabel config reload loop",
          "type": "local",
          "name_key": "Runtime VMinsertLifecycle.StopRelabeling"
        }
      ]
    },
    {
      "name": "VMinsertHTTP",
      "type": "http",
      "methods": [
        {
          "name": "GET /",
          "input": "none",
          "output": "vminsert info HTML",
          "path": "/",
          "type": "http",
          "name_key": "HTTP GET /"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/",
          "input": "Prometheus remote write request",
          "output": "204 No Content on success",
          "path": "/insert/{tenant}/prometheus/",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/api/v1/write",
          "input": "Prometheus remote write request",
          "output": "204 No Content on success",
          "path": "/insert/{tenant}/prometheus/api/v1/write",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/api/v1/write"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/api/v1/push",
          "input": "Prometheus push request",
          "output": "204 No Content on success",
          "path": "/insert/{tenant}/prometheus/api/v1/push",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/api/v1/push"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/api/v1/import",
          "input": "VictoriaMetrics JSON line import",
          "output": "204 No Content on success",
          "path": "/insert/{tenant}/prometheus/api/v1/import",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/api/v1/import"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/api/v1/import/csv",
          "input": "CSV import request",
          "output": "204 No Content on success",
          "path": "/insert/{tenant}/prometheus/api/v1/import/csv",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/api/v1/import/csv"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/api/v1/import/prometheus",
          "input": "Prometheus exposition import request",
          "output": "204 No Content on success",
          "path": "/insert/{tenant}/prometheus/api/v1/import/prometheus",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/api/v1/import/prometheus"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/api/v1/import/prometheus/metrics/job/*",
          "input": "Prometheus pushgateway-style exposition import request",
          "output": "200 OK on success",
          "path": "/insert/{tenant}/prometheus/api/v1/import/prometheus/metrics/job/*",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/api/v1/import/prometheus/metrics/job/*"
        },
        {
          "name": "POST /insert/{tenant}/prometheus/api/v1/import/native",
          "input": "VictoriaMetrics native binary import request",
          "output": "204 No Content on success",
          "path": "/insert/{tenant}/prometheus/api/v1/import/native",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/prometheus/api/v1/import/native"
        },
        {
          "name": "POST /insert/{tenant}/influx/write",
          "input": "InfluxDB line protocol write request",
          "output": "204 No Content with InfluxDB compatibility headers",
          "path": "/insert/{tenant}/influx/write",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/influx/write"
        },
        {
          "name": "POST /insert/{tenant}/influx/api/v2/write",
          "input": "InfluxDB v2 line protocol write request",
          "output": "204 No Content with InfluxDB compatibility headers",
          "path": "/insert/{tenant}/influx/api/v2/write",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/influx/api/v2/write"
        },
        {
          "name": "GET /insert/{tenant}/influx/query",
          "input": "InfluxDB compatibility query request",
          "output": "static database-name response",
          "path": "/insert/{tenant}/influx/query",
          "type": "http",
          "name_key": "HTTP GET /insert/{tenant}/influx/query"
        },
        {
          "name": "GET /insert/{tenant}/influx/health",
          "input": "InfluxDB compatibility health request",
          "output": "static health response",
          "path": "/insert/{tenant}/influx/health",
          "type": "http",
          "name_key": "HTTP GET /insert/{tenant}/influx/health"
        },
        {
          "name": "POST /insert/{tenant}/opentelemetry/api/v1/push",
          "input": "OpenTelemetry metrics push request",
          "output": "success response compatible with OTLP firehose mode",
          "path": "/insert/{tenant}/opentelemetry/api/v1/push",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/opentelemetry/api/v1/push"
        },
        {
          "name": "POST /insert/{tenant}/opentelemetry/v1/metrics",
          "input": "OpenTelemetry metrics request",
          "output": "success response compatible with OTLP",
          "path": "/insert/{tenant}/opentelemetry/v1/metrics",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/opentelemetry/v1/metrics"
        },
        {
          "name": "GET /insert/{tenant}/newrelic",
          "input": "New Relic check request",
          "output": "{\"status\":\"ok\"}",
          "path": "/insert/{tenant}/newrelic",
          "type": "http",
          "name_key": "HTTP GET /insert/{tenant}/newrelic"
        },
        {
          "name": "POST /insert/{tenant}/newrelic/inventory/deltas",
          "input": "New Relic inventory request",
          "output": "static accepted inventory delta payload",
          "path": "/insert/{tenant}/newrelic/inventory/deltas",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/newrelic/inventory/deltas"
        },
        {
          "name": "POST /insert/{tenant}/newrelic/infra/v2/metrics/events/bulk",
          "input": "New Relic metrics bulk request",
          "output": "{\"status\":\"ok\"} with HTTP 202",
          "path": "/insert/{tenant}/newrelic/infra/v2/metrics/events/bulk",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/newrelic/infra/v2/metrics/events/bulk"
        },
        {
          "name": "POST /insert/{tenant}/datadog/api/v1/series",
          "input": "Datadog v1 series request",
          "output": "{\"status\":\"ok\"} with HTTP 202",
          "path": "/insert/{tenant}/datadog/api/v1/series",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/datadog/api/v1/series"
        },
        {
          "name": "POST /insert/{tenant}/datadog/api/v2/series",
          "input": "Datadog v2 series request",
          "output": "{\"status\":\"ok\"} with HTTP 202",
          "path": "/insert/{tenant}/datadog/api/v2/series",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/datadog/api/v2/series"
        },
        {
          "name": "POST /insert/{tenant}/datadog/api/beta/sketches",
          "input": "Datadog sketches request",
          "output": "HTTP 202",
          "path": "/insert/{tenant}/datadog/api/beta/sketches",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/datadog/api/beta/sketches"
        },
        {
          "name": "GET /insert/{tenant}/datadog/api/v1/validate",
          "input": "Datadog validate request",
          "output": "{\"valid\":true}",
          "path": "/insert/{tenant}/datadog/api/v1/validate",
          "type": "http",
          "name_key": "HTTP GET /insert/{tenant}/datadog/api/v1/validate"
        },
        {
          "name": "POST /insert/{tenant}/datadog/api/v1/check_run",
          "input": "Datadog service check request",
          "output": "{\"status\":\"ok\"} with HTTP 202",
          "path": "/insert/{tenant}/datadog/api/v1/check_run",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/datadog/api/v1/check_run"
        },
        {
          "name": "GET /insert/{tenant}/datadog/intake",
          "input": "Datadog intake check request",
          "output": "{}",
          "path": "/insert/{tenant}/datadog/intake",
          "type": "http",
          "name_key": "HTTP GET /insert/{tenant}/datadog/intake"
        },
        {
          "name": "GET /insert/{tenant}/datadog/api/v1/metadata",
          "input": "Datadog metadata request",
          "output": "{}",
          "path": "/insert/{tenant}/datadog/api/v1/metadata",
          "type": "http",
          "name_key": "HTTP GET /insert/{tenant}/datadog/api/v1/metadata"
        },
        {
          "name": "POST /insert/{tenant}/-/reload",
          "input": "reload request",
          "output": "204 No Content after raising SIGHUP to self",
          "path": "/insert/{tenant}/-/reload",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/-/reload"
        },
        {
          "name": "GET /health",
          "input": "none",
          "output": "OK or delayed-shutdown message",
          "path": "/health",
          "type": "http",
          "name_key": "HTTP GET /health"
        },
        {
          "name": "ANY /ping",
          "input": "optional verbose query parameter",
          "output": "204 No Content or 200 OK for InfluxDB compatibility",
          "path": "/ping",
          "type": "http",
          "name_key": "HTTP ANY /ping"
        },
        {
          "name": "GET /metrics",
          "input": "optional authKey or basic auth credentials",
          "output": "Prometheus metrics exposition",
          "path": "/metrics",
          "type": "http",
          "name_key": "HTTP GET /metrics"
        },
        {
          "name": "GET /-/healthy",
          "input": "none",
          "output": "VictoriaMetrics is Healthy.",
          "path": "/-/healthy",
          "type": "http",
          "name_key": "HTTP GET /-/healthy"
        },
        {
          "name": "GET /-/ready",
          "input": "none",
          "output": "VictoriaMetrics is Ready.",
          "path": "/-/ready",
          "type": "http",
          "name_key": "HTTP GET /-/ready"
        },
        {
          "name": "GET /debug/pprof/*",
          "input": "optional authKey or basic auth credentials",
          "output": "Go pprof output",
          "path": "/debug/pprof/*",
          "type": "http",
          "name_key": "HTTP GET /debug/pprof/*"
        },
        {
          "name": "GET */favicon.ico",
          "input": "none",
          "output": "embedded favicon bytes",
          "path": "/favicon.ico",
          "type": "http",
          "name_key": "HTTP GET /favicon.ico"
        }
      ]
    },
    {
      "name": "VMinsertProtocol",
      "package": "main",
      "methods": [
        {
          "name": "TCP clusternative://{clusternativeListenAddr}",
          "input": "cluster-native metric stream from another vminsert",
          "output": "accepted metric rows forwarded to vmstorage",
          "type": "tcp",
          "name_key": "Runtime VMinsertProtocol.ClusterNativeListener"
        },
        {
          "name": "TCP/UDP graphite://{graphiteListenAddr}",
          "input": "Graphite plaintext metric stream",
          "output": "accepted metric rows forwarded to vmstorage",
          "type": "tcp",
          "name_key": "Runtime VMinsertProtocol.GraphiteListener"
        },
        {
          "name": "TCP/UDP influx://{influxListenAddr}",
          "input": "Influx line protocol stream",
          "output": "accepted metric rows forwarded to vmstorage",
          "type": "tcp",
          "name_key": "Runtime VMinsertProtocol.InfluxListener"
        },
        {
          "name": "TCP/UDP opentsdb://{opentsdbListenAddr}",
          "input": "OpenTSDB telnet put stream or HTTP put requests",
          "output": "accepted metric rows forwarded to vmstorage",
          "type": "tcp",
          "name_key": "Runtime VMinsertProtocol.OpenTSDBListener"
        },
        {
          "name": "POST opentsdbhttp://{opentsdbHTTPListenAddr}/insert/{tenant}/api/put",
          "input": "OpenTSDB HTTP put request on the dedicated listener",
          "output": "accepted metric rows forwarded to vmstorage",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/api/put"
        },
        {
          "name": "POST opentsdbhttp://{opentsdbHTTPListenAddr}/insert/{tenant}/opentsdb/api/put",
          "input": "OpenTSDB HTTP put request on the dedicated listener",
          "output": "accepted metric rows forwarded to vmstorage",
          "type": "http",
          "name_key": "HTTP POST /insert/{tenant}/opentsdb/api/put"
        }
      ]
    }
  ],
  "surface_kind": "mixed_service",
  "extensions": {
    "notes": [
      "The previous app-vminsert interface used the legacy endpoint/listener schema and collapsed all ingest paths into HTTPIngestAPI.* plus TCPListeners.*.",
      "The fresh interface models deployable-binary runtime truth: lifecycle, main HTTP listener, builtin httpserver routes, and the separately flag-gated protocol listeners are first-class method surfaces.",
      "OpenTSDB has two different runtime faces: the shared opentsdb TCP listener can accept telnet and HTTP put traffic, while opentsdbHTTPListenAddr starts a separate dedicated HTTP listener.",
      "The main HTTP listener inherits builtin routes from lib/httpserver, including /health, /ping, /metrics, /-/healthy, /-/ready, /debug/pprof/*, and */favicon.ico."
    ]
  }
}
