usage_trends_measurements
Gets or lists a usage_trends_measurements resource.
Overview​
| Name | usage_trends_measurements |
| Type | Resource |
| Id | gitlab.analytics.usage_trends_measurements |
Fields​
The following fields are returned by SELECT queries:
- list
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
count | integer | Object count. |
identifier | string | Type of objects being measured. (PROJECTS, USERS, ISSUES, MERGE_REQUESTS, GROUPS, PIPELINES, PIPELINES_SUCCEEDED, PIPELINES_FAILED, PIPELINES_CANCELED, PIPELINES_SKIPPED) |
recorded_at | string | Time the measurement was recorded. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | identifier, host | recorded_after, recorded_before | Get statistics on the instance. Generated from the GitLab GraphQL schema field Query.usageTrendsMeasurements (connection of UsageTrendsMeasurement nodes). |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
host | string | GitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST) |
identifier | string | Type of measurement or statistics to retrieve. |
recorded_after | string | Measurement recorded after the date. |
recorded_before | string | Measurement recorded before the date. |
SELECT examples​
- list
Get statistics on the instance. Generated from the GitLab GraphQL schema field Query.usageTrendsMeasurements (connection of UsageTrendsMeasurement nodes).
SELECT
count,
identifier,
recorded_at
FROM gitlab.analytics.usage_trends_measurements
WHERE identifier = '{{ identifier }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND recorded_after = '{{ recorded_after }}'
AND recorded_before = '{{ recorded_before }}'
;