{
  "repo": "tidbcloud/metrics-integration",
  "binary": "metrics-integration",
  "binary_path": "global/cmd/metrics-integration/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "services": [
    {
      "name": "GlobalIntegrationGateway",
      "type": "http",
      "methods": [
        {
          "name": "healthz",
          "name_key": "HTTP GET /healthz",
          "path": "/healthz",
          "method": "ANY",
          "description": "grpc-gateway health endpoint."
        },
        {
          "name": "ConsoleAPI",
          "name_key": "Runtime GlobalIntegrationGateway.ConsoleAPI",
          "path": "/api/v1/*",
          "method": "ANY",
          "description": "Console-facing integration HTTP gateway."
        },
        {
          "name": "OpenAPI",
          "name_key": "Runtime GlobalIntegrationGateway.OpenAPI",
          "path": "/v1beta1/*",
          "method": "ANY",
          "description": "OpenAPI-facing integration HTTP gateway."
        }
      ]
    },
    {
      "name": "GlobalIntegrationGRPC",
      "type": "grpc",
      "methods": [
        {
          "name": "IntegrationService",
          "name_key": "Runtime GlobalIntegrationGRPC.IntegrationService",
          "package": "global.api.integration.v1",
          "methods": [
            {
              "name": "CreateIntegration"
            },
            {
              "name": "UpdateIntegration"
            },
            {
              "name": "DeleteIntegration"
            },
            {
              "name": "ValidateDatadogAPIKey"
            },
            {
              "name": "ValidateNewrelicAPIKey"
            },
            {
              "name": "ListIntegrations"
            },
            {
              "name": "CreateMetricsKey"
            },
            {
              "name": "GetAllMetricsKey"
            },
            {
              "name": "DeleteMetricsKey"
            }
          ]
        },
        {
          "name": "OpenAPIIntegrationService",
          "name_key": "Runtime GlobalIntegrationGRPC.OpenAPIIntegrationService",
          "package": "global.api.integration.openapi.v1beta1",
          "methods": [
            {
              "name": "CreateIntegration"
            },
            {
              "name": "ListIntegrations"
            },
            {
              "name": "DeleteIntegration"
            }
          ]
        },
        {
          "name": "Health",
          "name_key": "Runtime GlobalIntegrationGRPC.Health"
        }
      ]
    },
    {
      "name": "EventBusConsumer",
      "type": "worker",
      "methods": [
        {
          "name": "RegisterHandlersAndConsumers",
          "name_key": "Runtime EventBusConsumer.RegisterHandlersAndConsumers",
          "description": "Starts event bus handlers and consumers when EnableEventBusConsumer is enabled."
        }
      ]
    }
  ],
  "extensions": {
    "notes": [
      "Global metrics integration exposes grpc-gateway entrypoints, internal gRPC services, and event bus consumers."
    ]
  }
}
