{
  "repo": "tidbcloud/VictoriaMetrics",
  "binary": "vminsert",
  "binary_path": "app/vminsert/main.go",
  "dependencies": {
    "Runtime VMinsertLifecycle.Startup": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.InitializeNetstorage": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "len(storageNode) > 0",
            "all -storageNode values are non-empty and unique"
          ],
          "operations": [
            {
              "operation": "INITIALIZE RPC DIALERS",
              "trigger": "Build the vmstorage dialers, hash ring, and background sender/health goroutines used by every ingest path",
              "conditions": [
                "storageNode validation succeeds"
              ],
              "implementation": "netstorage.Init(storageNodes, hashSeed) -> initStorageNodes(...) -> netutil.NewTCPDialer(...) + go sn.run(...)"
            }
          ]
        }
      ]
    },
    "Runtime VMinsertLifecycle.InitializeRelabeling": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "Only when relabelConfig is set to a local file path"
          ],
          "operations": [
            {
              "operation": "READ FILE",
              "trigger": "Load relabel rules from a local file before ingest traffic is accepted",
              "conditions": [
                "relabelConfig != \"\"",
                "relabelConfig points to a local file"
              ],
              "implementation": "relabel.Init -> loadRelabelConfig -> promrelabel.LoadRelabelConfigs -> fscore.ReadFileOrHTTP(path)"
            }
          ]
        },
        "http": {
          "conditions": [
            "Only when relabelConfig is set to an HTTP URL"
          ],
          "operations": [
            {
              "operation": "GET CONFIG",
              "trigger": "Fetch relabel rules over HTTP before ingest traffic is accepted or when SIGHUP/check interval reload fires",
              "conditions": [
                "relabelConfig != \"\"",
                "relabelConfig is an HTTP URL"
              ],
              "implementation": "relabel.Init -> loadRelabelConfig -> promrelabel.LoadRelabelConfigs -> fscore.ReadFileOrHTTP(path)"
            }
          ]
        }
      },
      "services": []
    },
    "Runtime VMinsertLifecycle.InitializeTimeSeriesLimits": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StartUnmarshalWorkers": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StartClusterNativeListener": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StartGraphiteListener": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StartInfluxListener": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StartOpenTSDBListener": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StartOpenTSDBHTTPListener": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StartHTTPServer": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.InitializePushMetrics": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.WaitForSigterm": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StopPushMetrics": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StopHTTPServer": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StopProtocolListeners": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StopUnmarshalWorkers": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StopNetstorage": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertLifecycle.StopRelabeling": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /": {
      "infrastructure": {},
      "services": []
    },
    "HTTP POST /insert/{tenant}/prometheus/": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "httpserver.ParsePath(r.URL.Path) succeeds",
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "VM protocol handshake path does not consume the request",
            "promremotewrite.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Prometheus remote write payload and flush rows to the selected vmstorage node buffers",
              "conditions": [
                "HandleVMProtoServerHandshake(w, r) == false"
              ],
              "implementation": "promremotewrite.InsertHandler -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/prometheus/api/v1/write": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "httpserver.ParsePath(r.URL.Path) succeeds",
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "VM protocol handshake path does not consume the request",
            "promremotewrite.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Prometheus remote write payload and flush rows to vmstorage",
              "conditions": [
                "HandleVMProtoServerHandshake(w, r) == false"
              ],
              "implementation": "promremotewrite.InsertHandler -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/prometheus/api/v1/push": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "httpserver.ParsePath(r.URL.Path) succeeds",
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "VM protocol handshake path does not consume the request",
            "promremotewrite.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Prometheus push payload and flush rows to vmstorage",
              "conditions": [
                "HandleVMProtoServerHandshake(w, r) == false"
              ],
              "implementation": "promremotewrite.InsertHandler -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/prometheus/api/v1/import": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "vmimport.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse vmimport rows and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, encoding, ...) succeeds"
              ],
              "implementation": "vmimport.InsertHandler -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/prometheus/api/v1/import/csv": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "csvimport.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse CSV rows and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req, ...) succeeds"
              ],
              "implementation": "csvimport.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/prometheus/api/v1/import/prometheus": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "prometheusimport.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Prometheus exposition rows and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "GetTimestamp(req) succeeds",
                "stream.Parse(req.Body, defaultTimestamp, encoding, true, ...) succeeds"
              ],
              "implementation": "prometheusimport.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/prometheus/api/v1/import/prometheus/metrics/job/*": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "suffix has prefix prometheus/api/v1/import/prometheus",
            "auth.NewTokenPossibleMultitenant succeeds",
            "prometheusimport.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Handle pushgateway-style Prometheus import and return 200 instead of 204",
              "conditions": [
                "request path starts with prometheus/api/v1/import/prometheus/metrics/job/"
              ],
              "implementation": "prometheusimport.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/prometheus/api/v1/import/native": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "native.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse native blocks and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, encoding, ...) succeeds"
              ],
              "implementation": "native.InsertHandler -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/influx/write": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "influx.InsertHandlerForHTTP returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Influx HTTP writes and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, encoding, isStreamMode, precision, db, ...) succeeds"
              ],
              "implementation": "influx.InsertHandlerForHTTP -> insertRows -> getPushCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/influx/api/v2/write": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "influx.InsertHandlerForHTTP returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Influx v2 HTTP writes and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, encoding, isStreamMode, precision, db, ...) succeeds"
              ],
              "implementation": "influx.InsertHandlerForHTTP -> insertRows -> getPushCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP GET /insert/{tenant}/influx/query": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /insert/{tenant}/influx/health": {
      "infrastructure": {},
      "services": []
    },
    "HTTP POST /insert/{tenant}/opentelemetry/api/v1/push": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "opentelemetry.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse OpenTelemetry metrics and flush them to vmstorage",
              "conditions": [
                "Content-Type is protobuf, or it is JSON with X-Amz-Firehose-Protocol-Version set"
              ],
              "implementation": "opentelemetry.InsertHandler -> stream.ParseStream -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/opentelemetry/v1/metrics": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "opentelemetry.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse OpenTelemetry metrics and flush them to vmstorage",
              "conditions": [
                "Content-Type is protobuf, or it is JSON with X-Amz-Firehose-Protocol-Version set"
              ],
              "implementation": "opentelemetry.InsertHandler -> stream.ParseStream -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP GET /insert/{tenant}/newrelic": {
      "infrastructure": {},
      "services": []
    },
    "HTTP POST /insert/{tenant}/newrelic/inventory/deltas": {
      "infrastructure": {},
      "services": []
    },
    "HTTP POST /insert/{tenant}/newrelic/infra/v2/metrics/events/bulk": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "newrelic.InsertHandlerForHTTP returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse New Relic metrics bulk payload and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, encoding, ...) succeeds"
              ],
              "implementation": "newrelic.InsertHandlerForHTTP -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/datadog/api/v1/series": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "datadogv1.InsertHandlerForHTTP returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Datadog v1 series and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, contentEncoding, ...) succeeds"
              ],
              "implementation": "datadogv1.InsertHandlerForHTTP -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/datadog/api/v2/series": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "datadogv2.InsertHandlerForHTTP returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Datadog v2 series and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, contentEncoding, contentType, ...) succeeds"
              ],
              "implementation": "datadogv2.InsertHandlerForHTTP -> insertRows -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/datadog/api/beta/sketches": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "prefix == insert",
            "auth.NewTokenPossibleMultitenant succeeds",
            "datadogsketches.InsertHandlerForHTTP returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Convert Datadog sketches to summary points and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req.Body, contentEncoding, ...) succeeds"
              ],
              "implementation": "datadogsketches.InsertHandlerForHTTP -> insertRows -> sketch.ToSummary -> netstorage.GetInsertCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP GET /insert/{tenant}/datadog/api/v1/validate": {
      "infrastructure": {},
      "services": []
    },
    "HTTP POST /insert/{tenant}/datadog/api/v1/check_run": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /insert/{tenant}/datadog/intake": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /insert/{tenant}/datadog/api/v1/metadata": {
      "infrastructure": {},
      "services": []
    },
    "HTTP POST /insert/{tenant}/-/reload": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /health": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /ping": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /metrics": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /-/healthy": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /-/ready": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /debug/pprof/*": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /favicon.ico": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMinsertProtocol.ClusterNativeListener": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "clusternativeListenAddr != \"\"",
            "cluster-native handshake succeeds and is not just a TCP healthcheck",
            "clusternative.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Accept upstream vminsert rows and re-fan them out to local vmstorage targets",
              "conditions": [
                "handshake.VMInsertServer(c, 0) succeeds"
              ],
              "implementation": "clusternative.InsertHandler -> stream.Parse -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "Runtime VMinsertProtocol.GraphiteListener": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "graphiteListenAddr != \"\"",
            "graphite.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Graphite plaintext rows and flush them to vmstorage",
              "conditions": [
                "stream.Parse(r, \"\", ...) succeeds"
              ],
              "implementation": "graphite.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "Runtime VMinsertProtocol.InfluxListener": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "influxListenAddr != \"\"",
            "influx.InsertHandlerForReader returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse Influx line protocol over the raw socket listener and flush rows to vmstorage",
              "conditions": [
                "stream.Parse(r, \"\", true, \"\", \"\", ...) succeeds"
              ],
              "implementation": "influx.InsertHandlerForReader -> insertRows -> getPushCtx / GetStorageNodeIdx / WriteDataPointExt / FlushBufs"
            }
          ]
        }
      ]
    },
    "Runtime VMinsertProtocol.OpenTSDBListener": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "opentsdbListenAddr != \"\"",
            "either the telnet row handler or the embedded HTTP put handler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse OpenTSDB telnet rows on the shared listener and flush them to vmstorage",
              "conditions": [
                "opentsdb.InsertHandler(nil, r) path is selected",
                "stream.Parse(r, ...) succeeds"
              ],
              "implementation": "opentsdb.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            },
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse OpenTSDB HTTP put requests on the shared listener and flush them to vmstorage",
              "conditions": [
                "opentsdbhttp.InsertHandler(req) path is selected",
                "path suffix is api/put or opentsdb/api/put"
              ],
              "implementation": "opentsdbhttp.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/api/put": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "opentsdbHTTPListenAddr != \"\"",
            "ParsePath(req.URL.Path) succeeds",
            "prefix == insert",
            "suffix == api/put",
            "auth.NewTokenPossibleMultitenant succeeds",
            "opentsdbhttp.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse dedicated OpenTSDB HTTP put requests and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req, ...) succeeds"
              ],
              "implementation": "opentsdbhttp.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    },
    "HTTP POST /insert/{tenant}/opentsdb/api/put": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage-rpc",
          "target_interface": "vmstorage RPC ingest connections",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "opentsdbHTTPListenAddr != \"\"",
            "ParsePath(req.URL.Path) succeeds",
            "prefix == insert",
            "suffix == opentsdb/api/put",
            "auth.NewTokenPossibleMultitenant succeeds",
            "opentsdbhttp.InsertHandler returns no error"
          ],
          "operations": [
            {
              "operation": "PUSH METRIC ROWS",
              "trigger": "Parse dedicated OpenTSDB compatibility HTTP put requests and flush them to vmstorage",
              "conditions": [
                "GetExtraLabels(req) succeeds",
                "stream.Parse(req, ...) succeeds"
              ],
              "implementation": "opentsdbhttp.InsertHandler -> insertRows -> netstorage.GetInsertCtx / WriteDataPoint / FlushBufs"
            }
          ]
        }
      ]
    }
  },
  "notes": [
    "The legacy mapping collapsed all HTTP ingest handlers into HTTPIngestAPI.* and all socket listeners into TCPListeners.*; the fresh mapping rebuilds them as distinct runtime method keys.",
    "All data-ingest surfaces eventually fan into netstorage.InsertCtx and vmstorage RPC buffering, but their preconditions differ by parser, auth path, transport, and listener flag.",
    "Some endpoints are intentionally side-effect free compatibility shims: influx query/health, New Relic status probes, and multiple Datadog metadata/validate endpoints return static responses without touching vmstorage."
  ]
}
