{
  "repo": "tidbcloud/VictoriaMetrics",
  "binary": "vmselect",
  "binary_path": "app/vmselect/main.go",
  "dependencies": {
    "Runtime VMSelectLifecycle.InitializeNetstorage": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "At least one storageNode is configured",
            "All storageNode addresses are non-empty and unique"
          ],
          "operations": [
            {
              "operation": "INITIALIZE RPC CLIENTS",
              "trigger": "Build the vmstorage connection pool that every query and admin request will reuse",
              "conditions": [
                "netstorage.Init(storageNodes) succeeds"
              ],
              "implementation": "main -> netutil.InitConcurrentDialLimit(...) -> netstorage.Init(storageNodes)"
            }
          ]
        }
      ]
    },
    "Runtime VMSelectLifecycle.InitializeTmpBlocksDir": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "PREPARE TEMP SEARCH DIR",
              "trigger": "Initialize the directory used for temporary search results and tmp blocks",
              "conditions": [
                "cacheDataPath may be empty or non-empty"
              ],
              "implementation": "main -> fs.RemoveDirContents(cacheDataPath + \"/tmp\") -> netstorage.InitTmpBlocksDir(...)"
            }
          ]
        }
      },
      "services": []
    },
    "Runtime VMSelectLifecycle.InitializeRollupResultCache": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "Only when cacheDataPath is non-empty"
          ],
          "operations": [
            {
              "operation": "OPEN CACHE",
              "trigger": "Persist rollup-result cache under cacheDataPath/rollupResult",
              "conditions": [
                "len(cacheDataPath) > 0"
              ],
              "implementation": "main -> promql.InitRollupResultCache(cacheDataPath + \"/rollupResult\")"
            }
          ]
        }
      },
      "services": []
    },
    "Runtime VMSelectLifecycle.InitializeConcurrencyLimiter": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.InitializeVMAlertProxy": {
      "infrastructure": {},
      "services": [
        {
          "name": "configured-vmalert-http",
          "target_interface": "vmalert HTTP API",
          "operation_type": "http_reverse_proxy",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Only when vmalert.proxyURL is configured and parses successfully"
          ],
          "operations": [
            {
              "operation": "INITIALIZE REVERSE PROXY",
              "trigger": "Create the reverse proxy used by tenant rules/alerts/notifiers and /prometheus/vmalert/* paths",
              "conditions": [
                "len(vmalert.proxyURL) > 0"
              ],
              "implementation": "main -> initVMAlertProxy() -> nethttputil.NewSingleHostReverseProxy(proxyURL)"
            }
          ]
        }
      ]
    },
    "Runtime VMSelectLifecycle.StartClusterNativeServer": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.StartHTTPServer": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.InitializePushMetrics": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.WaitForSigterm": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.StopPushMetrics": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.StopHTTPServer": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.StopClusterNativeServer": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.StopNetstorage": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.StopRollupResultCache": {
      "infrastructure": {},
      "services": []
    },
    "Runtime VMSelectLifecycle.StopDirRemover": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /health": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /ping": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /metrics": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /flags": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /-/healthy": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /-/ready": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /robots.txt": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /favicon.ico": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /debug/pprof/*": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /api/v1/status/top_queries": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /api/v1/status/active_queries": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /internal/resetRollupResultCache": {
      "infrastructure": {
        "local_cache": {
          "conditions": [
            "Only after authKey validation passes"
          ],
          "operations": [
            {
              "operation": "RESET CACHE",
              "trigger": "Clear rollup-result cache state used by future PromQL requests",
              "conditions": [
                "httpserver.CheckAuthFlag(...) == true"
              ],
              "implementation": "requestHandler -> promql.ResetRollupResultCache()"
            }
          ]
        }
      },
      "services": []
    },
    "HTTP ANY /admin/tenants": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.tenants_v1",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Prometheus tenants request succeeds"
          ],
          "operations": [
            {
              "operation": "LIST TENANTS",
              "trigger": "Return tenant IDs observed in vmstorage over the requested time range",
              "conditions": [
                "prometheus.Tenants(...) returns no error"
              ],
              "implementation": "requestHandler -> prometheus.Tenants(...) -> netstorage.Tenants(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /admin/api/v1/admin/status/metric_names_stats/reset": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.resetMetricNamesStats_v1",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Only after authKey validation passes"
          ],
          "operations": [
            {
              "operation": "RESET METRIC-NAME STATS",
              "trigger": "Clear metric-name usage statistics stored on vmstorage nodes",
              "conditions": [
                "httpserver.CheckAuthFlag(...) == true",
                "stats.ResetMetricNamesStatsHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> stats.ResetMetricNamesStatsHandler(...) -> netstorage.ResetMetricNamesStats(...)"
            }
          ]
        }
      ]
    },
    "HTTP GET /select/{tenant}/": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/static/*": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/static/*": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/vmui": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/graph": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/vmui/custom-dashboards": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/vmui/timezone": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/vmui/*": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/graphite/functions": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/graphite/functions/{func_name}": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/vmalert": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/vmalert/*": {
      "infrastructure": {},
      "services": [
        {
          "name": "configured-vmalert-http",
          "target_interface": "vmalert HTTP API",
          "operation_type": "http_reverse_proxy",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Only when vmalert.proxyURL is configured"
          ],
          "operations": [
            {
              "operation": "PROXY REQUEST",
              "trigger": "Forward the tenant-scoped vmalert request to the configured vmalert upstream",
              "conditions": [
                "len(vmalert.proxyURL) > 0"
              ],
              "implementation": "handleStaticAndSimpleRequests -> proxyVMAlertRequests(...) -> vmalertProxy.ServeHTTP(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/status/active_queries": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/status/top_queries": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/metric-relabel-debug": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/target-relabel-debug": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/expand-with-exprs": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/prettify-query": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/rules": {
      "infrastructure": {},
      "services": [
        {
          "name": "configured-vmalert-http",
          "target_interface": "vmalert HTTP API",
          "operation_type": "http_reverse_proxy",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Only when vmalert.proxyURL is configured; otherwise vmselect returns a placeholder response locally"
          ],
          "operations": [
            {
              "operation": "PROXY RULES",
              "trigger": "Forward Prometheus rules requests to vmalert when configured",
              "conditions": [
                "len(vmalert.proxyURL) > 0"
              ],
              "implementation": "handleStaticAndSimpleRequests -> proxyVMAlertRequests(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/alerts": {
      "infrastructure": {},
      "services": [
        {
          "name": "configured-vmalert-http",
          "target_interface": "vmalert HTTP API",
          "operation_type": "http_reverse_proxy",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Only when vmalert.proxyURL is configured; otherwise vmselect returns a placeholder response locally"
          ],
          "operations": [
            {
              "operation": "PROXY ALERTS",
              "trigger": "Forward Prometheus alerts requests to vmalert when configured",
              "conditions": [
                "len(vmalert.proxyURL) > 0"
              ],
              "implementation": "handleStaticAndSimpleRequests -> proxyVMAlertRequests(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/notifiers": {
      "infrastructure": {},
      "services": [
        {
          "name": "configured-vmalert-http",
          "target_interface": "vmalert HTTP API",
          "operation_type": "http_reverse_proxy",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Only when vmalert.proxyURL is configured; otherwise vmselect returns a placeholder response locally"
          ],
          "operations": [
            {
              "operation": "PROXY NOTIFIERS",
              "trigger": "Forward Prometheus notifiers requests to vmalert when configured",
              "conditions": [
                "len(vmalert.proxyURL) > 0"
              ],
              "implementation": "handleStaticAndSimpleRequests -> proxyVMAlertRequests(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/metadata": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/status/buildinfo": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/query_exemplars": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/label/{label_name}/values": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.labelValues_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully",
            "Label-values handler returns no error"
          ],
          "operations": [
            {
              "operation": "FETCH LABEL VALUES",
              "trigger": "Resolve label values for a tenant-scoped Prometheus label-values request",
              "conditions": [
                "prometheus.LabelValuesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.LabelValuesHandler(...) -> netstorage.LabelValues(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/query": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully",
            "Concurrency slot is acquired"
          ],
          "operations": [
            {
              "operation": "EXECUTE INSTANT QUERY",
              "trigger": "Fetch raw blocks needed for an instant PromQL query",
              "conditions": [
                "prometheus.QueryHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.QueryHandler(...) -> promql.Exec(...) -> netstorage.ProcessSearchQuery(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/query_range": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully",
            "Concurrency slot is acquired"
          ],
          "operations": [
            {
              "operation": "EXECUTE RANGE QUERY",
              "trigger": "Fetch raw blocks needed for a range PromQL query",
              "conditions": [
                "prometheus.QueryRangeHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.QueryRangeHandler(...) -> promql.Exec(...) -> netstorage.ProcessSearchQuery(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/series": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.searchMetricNames_v3",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully",
            "Concurrency slot is acquired"
          ],
          "operations": [
            {
              "operation": "SEARCH SERIES",
              "trigger": "Resolve matching series names for a Prometheus /series request",
              "conditions": [
                "prometheus.SeriesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.SeriesHandler(...) -> netstorage.SearchMetricNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/series/count": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.seriesCount_v4",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully"
          ],
          "operations": [
            {
              "operation": "COUNT SERIES",
              "trigger": "Return the number of series for the tenant",
              "conditions": [
                "prometheus.SeriesCountHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.SeriesCountHandler(...) -> netstorage.SeriesCount(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/labels": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.labelNames_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully",
            "Concurrency slot is acquired"
          ],
          "operations": [
            {
              "operation": "FETCH LABEL NAMES",
              "trigger": "Resolve label names for the tenant-scoped labels API",
              "conditions": [
                "prometheus.LabelsHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.LabelsHandler(...) -> netstorage.LabelNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/status/tsdb": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.tsdbStatus_v6",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully",
            "Concurrency slot is acquired"
          ],
          "operations": [
            {
              "operation": "FETCH TSDB STATUS",
              "trigger": "Build TSDB status for the tenant",
              "conditions": [
                "prometheus.TSDBStatusHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.TSDBStatusHandler(...) -> netstorage.TSDBStatus(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/export": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully"
          ],
          "operations": [
            {
              "operation": "EXPORT TIMESERIES",
              "trigger": "Stream time series for the generic export endpoint",
              "conditions": [
                "prometheus.ExportHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.ExportHandler(...) -> netstorage.ProcessSearchQuery(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/export/csv": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully"
          ],
          "operations": [
            {
              "operation": "EXPORT CSV",
              "trigger": "Stream time series and format them as CSV",
              "conditions": [
                "prometheus.ExportCSVHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.ExportCSVHandler(...) -> netstorage.ProcessSearchQuery(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/export/native": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully"
          ],
          "operations": [
            {
              "operation": "EXPORT NATIVE",
              "trigger": "Stream time series in VictoriaMetrics native export format",
              "conditions": [
                "prometheus.ExportNativeHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.ExportNativeHandler(...) -> netstorage.ProcessSearchQuery(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/federate": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully"
          ],
          "operations": [
            {
              "operation": "FEDERATE METRICS",
              "trigger": "Stream time series in Prometheus federate format",
              "conditions": [
                "prometheus.FederateHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> prometheus.FederateHandler(...) -> netstorage.ProcessSearchQuery(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/-/healthy": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/prometheus/-/ready": {
      "infrastructure": {},
      "services": []
    },
    "HTTP ANY /select/{tenant}/graphite/metrics/find": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.tagValueSuffixes_v4",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "FIND GRAPHITE METRICS",
              "trigger": "Resolve Graphite path suffixes and tree nodes",
              "conditions": [
                "graphite.MetricsFindHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.MetricsFindHandler(...) -> metricsFind(...) -> netstorage.TagValueSuffixes(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/metrics/expand": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.tagValueSuffixes_v4",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "EXPAND GRAPHITE METRICS",
              "trigger": "Resolve matching Graphite paths for one or more expressions",
              "conditions": [
                "graphite.MetricsExpandHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.MetricsExpandHandler(...) -> metricsFind(...) -> netstorage.TagValueSuffixes(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/metrics/index.json": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.labelValues_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "LIST GRAPHITE METRIC NAMES",
              "trigger": "Return __name__ values for Graphite metrics index",
              "conditions": [
                "graphite.MetricsIndexHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.MetricsIndexHandler(...) -> netstorage.LabelValues(..., \"__name__\", ...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags/tagSeries": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.registerMetricNames_v3",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "REGISTER METRIC NAMES",
              "trigger": "Register a single Graphite tagged series path",
              "conditions": [
                "graphite.TagsTagSeriesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagsTagSeriesHandler(...) -> registerMetrics(...) -> netstorage.RegisterMetricNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags/tagMultiSeries": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.registerMetricNames_v3",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "REGISTER METRIC NAMES",
              "trigger": "Register multiple Graphite tagged series paths",
              "conditions": [
                "graphite.TagsTagMultiSeriesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagsTagMultiSeriesHandler(...) -> registerMetrics(...) -> netstorage.RegisterMetricNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "vmstorage graphite tag lookup",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "LIST TAG KEYS",
              "trigger": "Return Graphite tag keys via the fast GraphiteTags path or the filtered SearchMetricNames path",
              "conditions": [
                "graphite.TagsHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagsHandler(...) -> netstorage.GraphiteTags(...) or netstorage.SearchMetricNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags/{tag_name}": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "vmstorage graphite tag-value lookup",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "LIST TAG VALUES",
              "trigger": "Return Graphite values for a specific tag via the fast GraphiteTagValues path",
              "conditions": [
                "graphite.TagValuesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagValuesHandler(...) -> netstorage.GraphiteTagValues(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags/findSeries": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.searchMetricNames_v3",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "FIND TAGGED SERIES",
              "trigger": "Resolve Graphite tagged series matching expr filters",
              "conditions": [
                "graphite.TagsFindSeriesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagsFindSeriesHandler(...) -> netstorage.SearchMetricNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags/autoComplete/tags": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "vmstorage graphite tags lookup",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "AUTOCOMPLETE TAG KEYS",
              "trigger": "Resolve Graphite tag keys via GraphiteTags or SearchMetricNames depending on expr filters",
              "conditions": [
                "graphite.TagsAutoCompleteTagsHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagsAutoCompleteTagsHandler(...) -> netstorage.GraphiteTags(...) or netstorage.SearchMetricNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags/autoComplete/values": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "vmstorage graphite tag-value lookup",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "AUTOCOMPLETE TAG VALUES",
              "trigger": "Resolve Graphite tag values via GraphiteTagValues or SearchMetricNames depending on expr filters",
              "conditions": [
                "graphite.TagsAutoCompleteValuesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagsAutoCompleteValuesHandler(...) -> netstorage.GraphiteTagValues(...) or netstorage.SearchMetricNames(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/tags/delSeries": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.deleteSeries_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token",
            "deleteAuthKey validation succeeds"
          ],
          "operations": [
            {
              "operation": "DELETE GRAPHITE SERIES",
              "trigger": "Delete tagged Graphite series from vmstorage",
              "conditions": [
                "graphite.TagsDelSeriesHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.TagsDelSeriesHandler(...) -> netstorage.DeleteSeries(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/graphite/render": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Graphite endpoints require a non-nil tenant token"
          ],
          "operations": [
            {
              "operation": "RENDER GRAPHITE SERIES",
              "trigger": "Execute Graphite render expressions against vmstorage data",
              "conditions": [
                "graphite.RenderHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> graphite.RenderHandler(...) -> execExpr(...) -> netstorage.ProcessSearchQuery(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /select/{tenant}/prometheus/api/v1/status/metric_names_stats": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.metricNamesUsageStats_v1",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Status request parses successfully"
          ],
          "operations": [
            {
              "operation": "FETCH METRIC-NAME USAGE STATS",
              "trigger": "Return tenant-scoped metric-name usage statistics",
              "conditions": [
                "stats.MetricNamesStatsHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> selectHandler -> stats.MetricNamesStatsHandler(...) -> netstorage.GetMetricNamesStats(...)"
            }
          ]
        }
      ]
    },
    "HTTP ANY /delete/{tenant}/prometheus/api/v1/admin/tsdb/delete_series": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.deleteSeries_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Tenant auth token parses successfully",
            "deleteAuthKey validation succeeds"
          ],
          "operations": [
            {
              "operation": "DELETE SERIES",
              "trigger": "Delete Prometheus series for the tenant",
              "conditions": [
                "prometheus.DeleteHandler(...) returns no error"
              ],
              "implementation": "requestHandler -> deleteHandler -> prometheus.DeleteHandler(...) -> netstorage.DeleteSeries(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.search_v7": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.search_v7",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "clusternativeListenAddr is enabled",
            "Incoming rpcName == search_v7"
          ],
          "operations": [
            {
              "operation": "FORWARD SEARCH RPC",
              "trigger": "Serve multi-level cluster search requests by delegating to vmstorage",
              "conditions": [
                "processSearch(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"search_v7\") -> clusternative.vmstorageAPI.InitSearch(...) -> netstorage.ProcessBlocks(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.searchMetricNames_v3": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.searchMetricNames_v3",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == searchMetricNames_v3"
          ],
          "operations": [
            {
              "operation": "FORWARD METRIC-NAMES RPC",
              "trigger": "Serve metric-name searches for upstream vmselect nodes",
              "conditions": [
                "processSearchMetricNames(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"searchMetricNames_v3\") -> clusternative.vmstorageAPI.SearchMetricNames(...) -> netstorage.SearchMetricNames(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.labelValues_v5": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.labelValues_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == labelValues_v5"
          ],
          "operations": [
            {
              "operation": "FORWARD LABEL-VALUES RPC",
              "trigger": "Serve label-values searches for upstream vmselect nodes",
              "conditions": [
                "processLabelValues(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"labelValues_v5\") -> clusternative.vmstorageAPI.LabelValues(...) -> netstorage.LabelValues(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.tagValueSuffixes_v4": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.tagValueSuffixes_v4",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == tagValueSuffixes_v4"
          ],
          "operations": [
            {
              "operation": "FORWARD TAG-SUFFIX RPC",
              "trigger": "Serve Graphite path suffix lookups for upstream vmselect nodes",
              "conditions": [
                "processTagValueSuffixes(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"tagValueSuffixes_v4\") -> clusternative.vmstorageAPI.TagValueSuffixes(...) -> netstorage.TagValueSuffixes(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.labelNames_v5": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.labelNames_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == labelNames_v5"
          ],
          "operations": [
            {
              "operation": "FORWARD LABEL-NAMES RPC",
              "trigger": "Serve label-name searches for upstream vmselect nodes",
              "conditions": [
                "processLabelNames(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"labelNames_v5\") -> clusternative.vmstorageAPI.LabelNames(...) -> netstorage.LabelNames(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.seriesCount_v4": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.seriesCount_v4",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == seriesCount_v4"
          ],
          "operations": [
            {
              "operation": "FORWARD SERIES-COUNT RPC",
              "trigger": "Serve series-count requests for upstream vmselect nodes",
              "conditions": [
                "processSeriesCount(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"seriesCount_v4\") -> clusternative.vmstorageAPI.SeriesCount(...) -> netstorage.SeriesCount(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.tsdbStatus_v6": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.tsdbStatus_v6",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == tsdbStatus_v6"
          ],
          "operations": [
            {
              "operation": "FORWARD TSDB-STATUS RPC",
              "trigger": "Serve TSDB status requests for upstream vmselect nodes",
              "conditions": [
                "processTSDBStatus(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"tsdbStatus_v6\") -> clusternative.vmstorageAPI.TSDBStatus(...) -> netstorage.TSDBStatus(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.deleteSeries_v5": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.deleteSeries_v5",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == deleteSeries_v5"
          ],
          "operations": [
            {
              "operation": "FORWARD DELETE-SERIES RPC",
              "trigger": "Serve delete-series requests for upstream vmselect nodes",
              "conditions": [
                "processDeleteSeries(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"deleteSeries_v5\") -> clusternative.vmstorageAPI.DeleteSeries(...) -> netstorage.DeleteSeries(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.registerMetricNames_v3": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.registerMetricNames_v3",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == registerMetricNames_v3"
          ],
          "operations": [
            {
              "operation": "FORWARD REGISTER-METRIC-NAMES RPC",
              "trigger": "Register metric names on behalf of upstream vmselect nodes",
              "conditions": [
                "processRegisterMetricNames(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"registerMetricNames_v3\") -> clusternative.vmstorageAPI.RegisterMetricNames(...) -> netstorage.RegisterMetricNames(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.tenants_v1": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.tenants_v1",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == tenants_v1"
          ],
          "operations": [
            {
              "operation": "FORWARD TENANTS RPC",
              "trigger": "Serve tenant-list requests for upstream vmselect nodes",
              "conditions": [
                "processTenants(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"tenants_v1\") -> clusternative.vmstorageAPI.Tenants(...) -> netstorage.Tenants(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.metricNamesUsageStats_v1": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.metricNamesUsageStats_v1",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == metricNamesUsageStats_v1"
          ],
          "operations": [
            {
              "operation": "FORWARD METRIC-NAME-STATS RPC",
              "trigger": "Serve metric-name usage stats requests for upstream vmselect nodes",
              "conditions": [
                "processMetricNamesUsageStats(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"metricNamesUsageStats_v1\") -> clusternative.vmstorageAPI.GetMetricNamesUsageStats(...) -> netstorage.GetMetricNamesStats(...)"
            }
          ]
        }
      ]
    },
    "VMSelectClusterNativeRPC.resetMetricNamesStats_v1": {
      "infrastructure": {},
      "services": [
        {
          "name": "vmstorage",
          "target_interface": "VMStorageVMSelectRPC.resetMetricNamesStats_v1",
          "operation_type": "tcp_rpc",
          "target_repo": "tidbcloud/VictoriaMetrics",
          "conditions": [
            "Incoming rpcName == resetMetricNamesStats_v1"
          ],
          "operations": [
            {
              "operation": "FORWARD RESET-METRIC-NAME-STATS RPC",
              "trigger": "Reset metric-name usage stats on behalf of upstream vmselect nodes",
              "conditions": [
                "processResetMetricUsageStats(...) returns no error"
              ],
              "implementation": "vmselectapi.Server.processRPC(\"resetMetricNamesStats_v1\") -> clusternative.vmstorageAPI.ResetMetricNamesUsageStats(...) -> netstorage.ResetMetricNamesStats(...)"
            }
          ]
        }
      ]
    }
  }
}
