InfoGrab DocsInfoGrab Docs

Service Ping 개발 가이드라인

요약

Service Ping은 GitLab이 주간 페이로드를 수집하여 GitLab에 전송하는 프로세스입니다. 월별(또는 주별) 수치를 비교하여 인스턴스가 다양한 제품 기능을 어떻게 사용하는지 대략적으로 파악합니다. GitLab 설치를 분류하고 이해하는 데 도움이 되는 기타 사실을 수집합니다.

Service Ping은 GitLab이 주간 페이로드를 수집하여 GitLab에 전송하는 프로세스입니다. 이 페이로드는 제품, 지원, 영업 팀이 GitLab의 사용 방식을 이해하는 데 도움이 되는 중요한 고수준 데이터를 제공합니다. 이 데이터는 다음과 같은 용도로 사용됩니다:

  • 월별(또는 주별) 수치를 비교하여 인스턴스가 다양한 제품 기능을 어떻게 사용하는지 대략적으로 파악합니다.

  • GitLab 설치를 분류하고 이해하는 데 도움이 되는 기타 사실을 수집합니다.

  • Stage 월간 활성 사용자(SMAU)를 계산하여 Stage 및 기능의 성공 여부를 측정합니다.

Service Ping 정보는 익명이 아닙니다. 인스턴스의 호스트명에 연결되지만, 프로젝트명, 사용자명 또는 기타 특정 데이터는 포함하지 않습니다.

Service Ping은 기본적으로 활성화되어 있습니다. 하지만 GitLab Self-Managed 인스턴스에서 특정 메트릭을 비활성화할 수 있습니다. Service Ping이 활성화되면 GitLab은 다른 인스턴스에서 데이터를 수집하고 사용자에게 인스턴스의 사용 통계를 표시할 수 있습니다.

Service Ping 용어#

Service Ping 구성 요소를 설명하기 위해 다음 용어를 사용합니다:

  • Service Ping: JSON 페이로드를 수집하고 생성하는 프로세스입니다.

  • Service Data: Service Ping JSON 페이로드의 내용입니다. 여기에는 메트릭이 포함됩니다.

  • Metrics: 주로 인스턴스 데이터베이스의 여러 테이블에 대한 행 수로 구성됩니다. 각 메트릭에는 YAML 파일에 해당하는 메트릭 정의가 있습니다.

  • MAU: 월간 활성 사용자(Monthly Active Users).

  • WAU: 주간 활성 사용자(Weekly Active Users).

알려진 문제#

  • Service Ping은 개별 이벤트가 아닌 메트릭만 전달합니다.

  • 메트릭은 GitLab 버전의 코드베이스에 존재하고 계측되어 있어야 해당 버전의 Service Ping에서 전달됩니다.

Service Ping 요청 흐름#

다음 예시는 GitLab 인스턴스, Versions Application, License Application, Salesforce, GitLab GCP Bucket, GitLab Snowflake Data Warehouse, Tableau 간의 기본 요청/응답 흐름을 보여줍니다:

sequenceDiagram participant GitLab Instance participant Versions Application participant Licenses Application participant Salesforce participant GCP Bucket participant Snowflake DW participant Tableau Dashboards GitLab Instance->>Versions Application: Send Service Ping loop Process usage data Versions Application->>Versions Application: Parse usage data Versions Application->>Versions Application: Write to database Versions Application->>Versions Application: Update license ping time end loop Process data for Salesforce Versions Application-xLicenses Application: Request Zuora subscription id Licenses Application-xVersions Application: Zuora subscription id Versions Application-xSalesforce: Request Zuora account id by Zuora subscription id Salesforce-xVersions Application: Zuora account id Versions Application-xSalesforce: Usage data for the Zuora account end Versions Application->>GCP Bucket: Export Versions database GCP Bucket->>Snowflake DW: Import data Snowflake DW->>Snowflake DW: Transform data using dbt Snowflake DW->>Tableau Dashboards: Data available for querying Versions Application->>GitLab Instance: DevOps Score (Conversational Development Index)

Service Ping 작동 방식#

Service Ping cron job은 주간 실행되도록 Sidekiq에 설정됩니다.

cron job이 실행되면 Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values)를 호출합니다.

Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values)는 400개 이상의 다른 카운터 메서드 호출로 연쇄적으로 내려갑니다.

모든 메서드 호출의 응답은 단일 JSON 페이로드로 병합됩니다.

그런 다음 JSON 페이로드는 Versions 애플리케이션에 게시됩니다. 방화벽 예외가 필요한 경우, 필요한 URL은 여러 가지에 따라 달라집니다. 호스트명이 version.gitlab.com이고, 프로토콜이 TCP이며, 포트 번호가 443인 경우, 필요한 URL은 https://version.gitlab.com/입니다.

오류가 발생한 경우, 다음 정보와 함께 Version 애플리케이션에 보고됩니다:

uuid - GitLab 인스턴스 고유 식별자

hostname - GitLab 인스턴스 호스트명

version - GitLab 인스턴스 현재 버전

elapsed - Service Ping 보고 프로세스 시작부터 오류 발생 시점까지 경과된 시간

message - 오류 메시지

{
  "uuid"=>"02333324-1cd7-4c3b-a45b-a4993f05fb1d",
  "hostname"=>"127.0.0.1",
  "version"=>"14.7.0-pre",
  "elapsed"=>0.006946,
  "message"=>'PG::UndefinedColumn: ERROR:  column \"non_existent_attribute\" does not exist\nLINE 1: SELECT COUNT(non_existent_attribute) FROM \"issues\" /*applica...'
}

마지막으로, 진단 목적으로 사용되는 타이밍 메타데이터 정보가 Versions 애플리케이션에 제출됩니다. 이 정보는 메트릭 식별자 목록과 메트릭 계산에 소요된 시간으로 구성됩니다:

GitLab 15.0에서 도입됨. 플래그 사용, 기본적으로 활성화됨.

    {
      "metadata"=>
      {
        "uuid"=>"0000000-0000-0000-0000-000000000000",
        "metrics"=>
        [{"name"=>"version", "time_elapsed"=>1.1811964213848114e-05},
         {"name"=>"installation_type", "time_elapsed"=>0.00017242692410945892},
         {"name"=>"license_billable_users", "time_elapsed"=>0.009520471096038818},
         ....
         {"name"=>"counts.clusters_platforms_eks",
          "time_elapsed"=>0.05638605775311589},
         {"name"=>"counts.clusters_platforms_gke",
          "time_elapsed"=>0.40995341585949063},
         {"name"=>"counts.clusters_platforms_user",
          "time_elapsed"=>0.06410990096628666},
         {"name"=>"counts.clusters_management_project",
          "time_elapsed"=>0.24020783510059118}
        ]
      }
    }

Geo 보조 사이트에서#

Geo 보조 사이트에 특화된 메트릭도 수집하여 Service Ping과 함께 전송합니다.

Geo 보조 서비스 ping cron job은 주간 실행되도록 Sidekiq에 설정됩니다.

cron job이 실행되면 SecondaryUsageData.update_metrics!를 호출합니다. 이 메서드는 Prometheus에서 관련 메트릭을 수집하고, Geo 노드 상태 업데이트 시 기본 사이트로 전송하기 위해 Geo 보조 추적 데이터베이스에 데이터를 저장합니다.

Geo 노드 상태 데이터는 위에서 설명한 프로세스의 JSON 페이로드와 함께 전송됩니다. 다음은 배열의 각 객체가 Geo 노드를 나타내는 페이로드의 예시입니다:

[
  {
    "git_fetch_event_count_weekly"=>nil,
    "git_push_event_count_weekly"=>nil,
    ... other geo node status fields
  }
]

Service Ping 페이로드 예시#

다음은 Service Ping 페이로드의 예시 내용입니다.

{
  "uuid": "0000000-0000-0000-0000-000000000000",
  "hostname": "example.com",
  "version": "12.10.0-pre",
  "installation_type": "omnibus-gitlab",
  "active_user_count": 999,
  "recorded_at": "2020-04-17T07:43:54.162+00:00",
  "edition": "EEU",
  "license_md5": "00000000000000000000000000000000",
  "license_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
  "license_id": null,
  "historical_max_users": 999,
  "licensee": {
    "Name": "ABC, Inc.",
    "Email": "email@example.com",
    "Company": "ABC, Inc."
  },
  "license_user_count": 999,
  "license_starts_at": "2020-01-01",
  "license_expires_at": "2021-01-01",
  "license_plan": "ultimate",
  "license_add_ons": {
  },
  "license_trial": false,
  "counts": {
    "assignee_lists": 999,
    "boards": 999,
    "ci_builds": 999,
    ...
  },
  "container_registry_enabled": true,
  "dependency_proxy_enabled": false,
  "gitlab_shared_runners_enabled": true,
  "gravatar_enabled": true,
  "influxdb_metrics_enabled": true,
  "ldap_enabled": false,
  "mattermost_enabled": false,
  "omniauth_enabled": true,
  "prometheus_enabled": false,
  "prometheus_metrics_enabled": false,
  "reply_by_email_enabled": "incoming+%{key}@incoming.gitlab.com",
  "signup_enabled": true,
  "projects_with_expiration_policy_disabled": 999,
  "projects_with_expiration_policy_enabled": 999,
  ...
  "elasticsearch_enabled": true,
  "license_trial_ends_on": null,
  "geo_enabled": false,
  "git": {
    "version": {
      "major": 2,
      "minor": 26,
      "patch": 1
    }
  },
  "gitaly": {
    "version": "12.10.0-rc1-93-g40980d40",
    "servers": 56,
    "clusters": 14,
    "filesystems": [
      "EXT_2_3_4"
    ]
  },
  "gitlab_pages": {
    "enabled": true,
    "version": "1.17.0"
  },
  "container_registry_server": {
    "vendor": "gitlab",
    "version": "2.9.1-gitlab",
    "db_enabled": false
  },
  "database": {
    "adapter": "postgresql",
    "version": "9.6.15",
    "pg_system_id": 6842684531675334351,
    "flavor": "Cloud SQL for PostgreSQL"
  },
  "analytics_unique_visits": {
    "g_analytics_contribution": 999,
    ...
  },
  "usage_activity_by_stage": {
    "configure": {
      "project_clusters_enabled": 999,
      ...
    },
    "create": {
      "merge_requests": 999,
      ...
    },
    "manage": {
      "events": 999,
      ...
    },
    "monitor": {
      "clusters": 999,
      ...
    },
    "package": {
      "projects_with_packages": 999
    },
    "plan": {
      "issues": 999,
      ...
    },
    "release": {
      "deployments": 999,
      ...
    },
    "secure": {
      "user_container_scanning_jobs": 999,
      ...
    },
    "verify": {
      "ci_builds": 999,
      ...
    }
  },
  "usage_activity_by_stage_monthly": {
    "configure": {
      "project_clusters_enabled": 999,
      ...
    },
    "create": {
      "merge_requests": 999,
      ...
    },
    "manage": {
      "events": 999,
      ...
    },
    "monitor": {
      "clusters": 999,
      ...
    },
    "package": {
      "projects_with_packages": 999
    },
    "plan": {
      "issues": 999,
      ...
    },
    "release": {
      "deployments": 999,
      ...
    },
    "secure": {
      "user_container_scanning_jobs": 999,
      ...
    },
    "verify": {
      "ci_builds": 999,
      ...
    }
  },
  "topology": {
    "duration_s": 0.013836685999194742,
    "application_requests_per_hour": 4224,
    "query_apdex_weekly_average": 0.996,
    "failures": [],
    "nodes": [
      {
        "node_memory_total_bytes": 33269903360,
        "node_memory_utilization": 0.35,
        "node_cpus": 16,
        "node_cpu_utilization": 0.2,
        "node_uname_info": {
          "machine": "x86_64",
          "sysname": "Linux",
          "release": "4.19.76-linuxkit"
        },
        "node_services": [
          {
            "name": "web",
            "process_count": 16,
            "process_memory_pss": 233349888,
            "process_memory_rss": 788220927,
            "process_memory_uss": 195295487,
            "server": "puma"
          },
          {
            "name": "sidekiq",
            "process_count": 1,
            "process_memory_pss": 734080000,
            "process_memory_rss": 750051328,
            "process_memory_uss": 731533312
          },
          ...
        ],
        ...
      },
      ...
    ]
  }
}

Service Ping 데이터 내보내기#

Rake 태스크를 사용하여 Service Ping 데이터를 다양한 형식으로 내보낼 수 있습니다.

  • Rake 태스크는 count, distinct_count, sum에 대한 원시 SQL 쿼리를 내보냅니다.

  • Rake 태스크는 redis_usage_data에 대한 Redis 카운터 클래스 또는 Redis 블록의 줄을 내보냅니다.

  • Rake 태스크는 alt_usage_data 메트릭을 계산합니다.

로컬 GitLab 설치의 홈 디렉터리에서 YAML 또는 JSON 버전에 대해 다음 Rake 태스크를 실행합니다:

# for YAML export of SQL queries
bin/rake gitlab:usage_data:dump_sql_in_yaml

# for JSON export of SQL queries
bin/rake gitlab:usage_data:dump_sql_in_json

# for JSON export of Non SQL data
bin/rake gitlab:usage_data:dump_non_sql_in_json

# You may pipe the output into a file
bin/rake gitlab:usage_data:dump_sql_in_yaml > ~/Desktop/usage-metrics-2020-09-02.yaml

Service Ping의 폴백 값#

다음과 같은 경우에 폴백 값을 반환합니다:

경우
더 이상 사용되지 않는 메트릭 (버전 14.3에서 제거됨) -1000
타임아웃, 일반 오류 -1
카운터의 표준 오류 -2
히스토그램 메트릭 오류 { '-1' => -1 }

모니터링#

Service Ping 보고 프로세스 상태는 Tableau 대시보드로 모니터링됩니다.

관련 주제#

Service Ping 개발 가이드라인

GitLab v19.1
원문 보기
요약

Service Ping은 GitLab이 주간 페이로드를 수집하여 GitLab에 전송하는 프로세스입니다. 월별(또는 주별) 수치를 비교하여 인스턴스가 다양한 제품 기능을 어떻게 사용하는지 대략적으로 파악합니다. GitLab 설치를 분류하고 이해하는 데 도움이 되는 기타 사실을 수집합니다.

Service Ping은 GitLab이 주간 페이로드를 수집하여 GitLab에 전송하는 프로세스입니다. 이 페이로드는 제품, 지원, 영업 팀이 GitLab의 사용 방식을 이해하는 데 도움이 되는 중요한 고수준 데이터를 제공합니다. 이 데이터는 다음과 같은 용도로 사용됩니다:

  • 월별(또는 주별) 수치를 비교하여 인스턴스가 다양한 제품 기능을 어떻게 사용하는지 대략적으로 파악합니다.

  • GitLab 설치를 분류하고 이해하는 데 도움이 되는 기타 사실을 수집합니다.

  • Stage 월간 활성 사용자(SMAU)를 계산하여 Stage 및 기능의 성공 여부를 측정합니다.

Service Ping 정보는 익명이 아닙니다. 인스턴스의 호스트명에 연결되지만, 프로젝트명, 사용자명 또는 기타 특정 데이터는 포함하지 않습니다.

Service Ping은 기본적으로 활성화되어 있습니다. 하지만 GitLab Self-Managed 인스턴스에서 특정 메트릭을 비활성화할 수 있습니다. Service Ping이 활성화되면 GitLab은 다른 인스턴스에서 데이터를 수집하고 사용자에게 인스턴스의 사용 통계를 표시할 수 있습니다.

Service Ping 용어#

Service Ping 구성 요소를 설명하기 위해 다음 용어를 사용합니다:

  • Service Ping: JSON 페이로드를 수집하고 생성하는 프로세스입니다.

  • Service Data: Service Ping JSON 페이로드의 내용입니다. 여기에는 메트릭이 포함됩니다.

  • Metrics: 주로 인스턴스 데이터베이스의 여러 테이블에 대한 행 수로 구성됩니다. 각 메트릭에는 YAML 파일에 해당하는 메트릭 정의가 있습니다.

  • MAU: 월간 활성 사용자(Monthly Active Users).

  • WAU: 주간 활성 사용자(Weekly Active Users).

알려진 문제#

  • Service Ping은 개별 이벤트가 아닌 메트릭만 전달합니다.

  • 메트릭은 GitLab 버전의 코드베이스에 존재하고 계측되어 있어야 해당 버전의 Service Ping에서 전달됩니다.

Service Ping 요청 흐름#

다음 예시는 GitLab 인스턴스, Versions Application, License Application, Salesforce, GitLab GCP Bucket, GitLab Snowflake Data Warehouse, Tableau 간의 기본 요청/응답 흐름을 보여줍니다:

sequenceDiagram participant GitLab Instance participant Versions Application participant Licenses Application participant Salesforce participant GCP Bucket participant Snowflake DW participant Tableau Dashboards GitLab Instance->>Versions Application: Send Service Ping loop Process usage data Versions Application->>Versions Application: Parse usage data Versions Application->>Versions Application: Write to database Versions Application->>Versions Application: Update license ping time end loop Process data for Salesforce Versions Application-xLicenses Application: Request Zuora subscription id Licenses Application-xVersions Application: Zuora subscription id Versions Application-xSalesforce: Request Zuora account id by Zuora subscription id Salesforce-xVersions Application: Zuora account id Versions Application-xSalesforce: Usage data for the Zuora account end Versions Application->>GCP Bucket: Export Versions database GCP Bucket->>Snowflake DW: Import data Snowflake DW->>Snowflake DW: Transform data using dbt Snowflake DW->>Tableau Dashboards: Data available for querying Versions Application->>GitLab Instance: DevOps Score (Conversational Development Index)

Service Ping 작동 방식#

Service Ping cron job은 주간 실행되도록 Sidekiq에 설정됩니다.

cron job이 실행되면 Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values)를 호출합니다.

Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values)는 400개 이상의 다른 카운터 메서드 호출로 연쇄적으로 내려갑니다.

모든 메서드 호출의 응답은 단일 JSON 페이로드로 병합됩니다.

그런 다음 JSON 페이로드는 Versions 애플리케이션에 게시됩니다. 방화벽 예외가 필요한 경우, 필요한 URL은 여러 가지에 따라 달라집니다. 호스트명이 version.gitlab.com이고, 프로토콜이 TCP이며, 포트 번호가 443인 경우, 필요한 URL은 https://version.gitlab.com/입니다.

오류가 발생한 경우, 다음 정보와 함께 Version 애플리케이션에 보고됩니다:

uuid - GitLab 인스턴스 고유 식별자

hostname - GitLab 인스턴스 호스트명

version - GitLab 인스턴스 현재 버전

elapsed - Service Ping 보고 프로세스 시작부터 오류 발생 시점까지 경과된 시간

message - 오류 메시지

{
  "uuid"=>"02333324-1cd7-4c3b-a45b-a4993f05fb1d",
  "hostname"=>"127.0.0.1",
  "version"=>"14.7.0-pre",
  "elapsed"=>0.006946,
  "message"=>'PG::UndefinedColumn: ERROR:  column \"non_existent_attribute\" does not exist\nLINE 1: SELECT COUNT(non_existent_attribute) FROM \"issues\" /*applica...'
}

마지막으로, 진단 목적으로 사용되는 타이밍 메타데이터 정보가 Versions 애플리케이션에 제출됩니다. 이 정보는 메트릭 식별자 목록과 메트릭 계산에 소요된 시간으로 구성됩니다:

GitLab 15.0에서 도입됨. 플래그 사용, 기본적으로 활성화됨.

    {
      "metadata"=>
      {
        "uuid"=>"0000000-0000-0000-0000-000000000000",
        "metrics"=>
        [{"name"=>"version", "time_elapsed"=>1.1811964213848114e-05},
         {"name"=>"installation_type", "time_elapsed"=>0.00017242692410945892},
         {"name"=>"license_billable_users", "time_elapsed"=>0.009520471096038818},
         ....
         {"name"=>"counts.clusters_platforms_eks",
          "time_elapsed"=>0.05638605775311589},
         {"name"=>"counts.clusters_platforms_gke",
          "time_elapsed"=>0.40995341585949063},
         {"name"=>"counts.clusters_platforms_user",
          "time_elapsed"=>0.06410990096628666},
         {"name"=>"counts.clusters_management_project",
          "time_elapsed"=>0.24020783510059118}
        ]
      }
    }

Geo 보조 사이트에서#

Geo 보조 사이트에 특화된 메트릭도 수집하여 Service Ping과 함께 전송합니다.

Geo 보조 서비스 ping cron job은 주간 실행되도록 Sidekiq에 설정됩니다.

cron job이 실행되면 SecondaryUsageData.update_metrics!를 호출합니다. 이 메서드는 Prometheus에서 관련 메트릭을 수집하고, Geo 노드 상태 업데이트 시 기본 사이트로 전송하기 위해 Geo 보조 추적 데이터베이스에 데이터를 저장합니다.

Geo 노드 상태 데이터는 위에서 설명한 프로세스의 JSON 페이로드와 함께 전송됩니다. 다음은 배열의 각 객체가 Geo 노드를 나타내는 페이로드의 예시입니다:

[
  {
    "git_fetch_event_count_weekly"=>nil,
    "git_push_event_count_weekly"=>nil,
    ... other geo node status fields
  }
]

Service Ping 페이로드 예시#

다음은 Service Ping 페이로드의 예시 내용입니다.

{
  "uuid": "0000000-0000-0000-0000-000000000000",
  "hostname": "example.com",
  "version": "12.10.0-pre",
  "installation_type": "omnibus-gitlab",
  "active_user_count": 999,
  "recorded_at": "2020-04-17T07:43:54.162+00:00",
  "edition": "EEU",
  "license_md5": "00000000000000000000000000000000",
  "license_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
  "license_id": null,
  "historical_max_users": 999,
  "licensee": {
    "Name": "ABC, Inc.",
    "Email": "email@example.com",
    "Company": "ABC, Inc."
  },
  "license_user_count": 999,
  "license_starts_at": "2020-01-01",
  "license_expires_at": "2021-01-01",
  "license_plan": "ultimate",
  "license_add_ons": {
  },
  "license_trial": false,
  "counts": {
    "assignee_lists": 999,
    "boards": 999,
    "ci_builds": 999,
    ...
  },
  "container_registry_enabled": true,
  "dependency_proxy_enabled": false,
  "gitlab_shared_runners_enabled": true,
  "gravatar_enabled": true,
  "influxdb_metrics_enabled": true,
  "ldap_enabled": false,
  "mattermost_enabled": false,
  "omniauth_enabled": true,
  "prometheus_enabled": false,
  "prometheus_metrics_enabled": false,
  "reply_by_email_enabled": "incoming+%{key}@incoming.gitlab.com",
  "signup_enabled": true,
  "projects_with_expiration_policy_disabled": 999,
  "projects_with_expiration_policy_enabled": 999,
  ...
  "elasticsearch_enabled": true,
  "license_trial_ends_on": null,
  "geo_enabled": false,
  "git": {
    "version": {
      "major": 2,
      "minor": 26,
      "patch": 1
    }
  },
  "gitaly": {
    "version": "12.10.0-rc1-93-g40980d40",
    "servers": 56,
    "clusters": 14,
    "filesystems": [
      "EXT_2_3_4"
    ]
  },
  "gitlab_pages": {
    "enabled": true,
    "version": "1.17.0"
  },
  "container_registry_server": {
    "vendor": "gitlab",
    "version": "2.9.1-gitlab",
    "db_enabled": false
  },
  "database": {
    "adapter": "postgresql",
    "version": "9.6.15",
    "pg_system_id": 6842684531675334351,
    "flavor": "Cloud SQL for PostgreSQL"
  },
  "analytics_unique_visits": {
    "g_analytics_contribution": 999,
    ...
  },
  "usage_activity_by_stage": {
    "configure": {
      "project_clusters_enabled": 999,
      ...
    },
    "create": {
      "merge_requests": 999,
      ...
    },
    "manage": {
      "events": 999,
      ...
    },
    "monitor": {
      "clusters": 999,
      ...
    },
    "package": {
      "projects_with_packages": 999
    },
    "plan": {
      "issues": 999,
      ...
    },
    "release": {
      "deployments": 999,
      ...
    },
    "secure": {
      "user_container_scanning_jobs": 999,
      ...
    },
    "verify": {
      "ci_builds": 999,
      ...
    }
  },
  "usage_activity_by_stage_monthly": {
    "configure": {
      "project_clusters_enabled": 999,
      ...
    },
    "create": {
      "merge_requests": 999,
      ...
    },
    "manage": {
      "events": 999,
      ...
    },
    "monitor": {
      "clusters": 999,
      ...
    },
    "package": {
      "projects_with_packages": 999
    },
    "plan": {
      "issues": 999,
      ...
    },
    "release": {
      "deployments": 999,
      ...
    },
    "secure": {
      "user_container_scanning_jobs": 999,
      ...
    },
    "verify": {
      "ci_builds": 999,
      ...
    }
  },
  "topology": {
    "duration_s": 0.013836685999194742,
    "application_requests_per_hour": 4224,
    "query_apdex_weekly_average": 0.996,
    "failures": [],
    "nodes": [
      {
        "node_memory_total_bytes": 33269903360,
        "node_memory_utilization": 0.35,
        "node_cpus": 16,
        "node_cpu_utilization": 0.2,
        "node_uname_info": {
          "machine": "x86_64",
          "sysname": "Linux",
          "release": "4.19.76-linuxkit"
        },
        "node_services": [
          {
            "name": "web",
            "process_count": 16,
            "process_memory_pss": 233349888,
            "process_memory_rss": 788220927,
            "process_memory_uss": 195295487,
            "server": "puma"
          },
          {
            "name": "sidekiq",
            "process_count": 1,
            "process_memory_pss": 734080000,
            "process_memory_rss": 750051328,
            "process_memory_uss": 731533312
          },
          ...
        ],
        ...
      },
      ...
    ]
  }
}

Service Ping 데이터 내보내기#

Rake 태스크를 사용하여 Service Ping 데이터를 다양한 형식으로 내보낼 수 있습니다.

  • Rake 태스크는 count, distinct_count, sum에 대한 원시 SQL 쿼리를 내보냅니다.

  • Rake 태스크는 redis_usage_data에 대한 Redis 카운터 클래스 또는 Redis 블록의 줄을 내보냅니다.

  • Rake 태스크는 alt_usage_data 메트릭을 계산합니다.

로컬 GitLab 설치의 홈 디렉터리에서 YAML 또는 JSON 버전에 대해 다음 Rake 태스크를 실행합니다:

# for YAML export of SQL queries
bin/rake gitlab:usage_data:dump_sql_in_yaml

# for JSON export of SQL queries
bin/rake gitlab:usage_data:dump_sql_in_json

# for JSON export of Non SQL data
bin/rake gitlab:usage_data:dump_non_sql_in_json

# You may pipe the output into a file
bin/rake gitlab:usage_data:dump_sql_in_yaml > ~/Desktop/usage-metrics-2020-09-02.yaml

Service Ping의 폴백 값#

다음과 같은 경우에 폴백 값을 반환합니다:

경우
더 이상 사용되지 않는 메트릭 (버전 14.3에서 제거됨) -1000
타임아웃, 일반 오류 -1
카운터의 표준 오류 -2
히스토그램 메트릭 오류 { '-1' => -1 }

모니터링#

Service Ping 보고 프로세스 상태는 Tableau 대시보드로 모니터링됩니다.

관련 주제#