Skip to main content

usage_trends_measurements

Gets or lists a usage_trends_measurements resource.

Overview​

Nameusage_trends_measurements
TypeResource
Idgitlab.analytics.usage_trends_measurements

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
countintegerObject count.
identifierstringType of objects being measured. (PROJECTS, USERS, ISSUES, MERGE_REQUESTS, GROUPS, PIPELINES, PIPELINES_SUCCEEDED, PIPELINES_FAILED, PIPELINES_CANCELED, PIPELINES_SKIPPED)
recorded_atstringTime the measurement was recorded.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectidentifier, hostrecorded_after, recorded_beforeGet 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.

NameDatatypeDescription
hoststringGitLab 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)
identifierstringType of measurement or statistics to retrieve.
recorded_afterstringMeasurement recorded after the date.
recorded_beforestringMeasurement recorded before the date.

SELECT examples​

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 }}'
;