Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
09ef8592
Commit
09ef8592
authored
Jul 22, 2021
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update service ping metric implementation guidelines
Changelog: other
parent
03b5425f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
doc/development/service_ping/index.md
doc/development/service_ping/index.md
+13
-0
doc/development/service_ping/review_guidelines.md
doc/development/service_ping/review_guidelines.md
+2
-0
No files found.
doc/development/service_ping/index.md
View file @
09ef8592
...
@@ -1028,6 +1028,19 @@ Add the metric in one of the top level keys
...
@@ -1028,6 +1028,19 @@ Add the metric in one of the top level keys
-
`counts_monthly`
: for counters that have data for the most recent 28 days.
-
`counts_monthly`
: for counters that have data for the most recent 28 days.
-
`counts`
: for counters that have data for all time.
-
`counts`
: for counters that have data for all time.
#### How to get a metric name suggestion
The metric YAML generator can suggest a metric name for you. To generate a metric name suggestion,
first instrument the metric at the provided
`key_path`
, generate the metrics YAML definition, then
return to the instrumentation and update it.
1.
Add the metric instrumentation within
`lib/gitlab/usage_data.rb`
inside one
of the
[
top level keys
](
index.md#1-naming-and-placing-the-metrics
)
using any name you choose.
1.
Run the
[
metrics YAML generator
](
metrics_dictionary.md#metrics-definition-and-validation
)
.
1.
Use the metric name suggestion to select a suitable metric name.
1.
Update the instrumentation you created in the first step and change the metric name to the suggested name.
1.
Update the metric's YAML definition with the correct
`key_path`
.
### 2. Use your Rails console to manually test counters
### 2. Use your Rails console to manually test counters
```
ruby
```
ruby
...
...
doc/development/service_ping/review_guidelines.md
View file @
09ef8592
...
@@ -51,6 +51,8 @@ any of the following Service Ping files:
...
@@ -51,6 +51,8 @@ any of the following Service Ping files:
-
Perform a first-pass review on the merge request and suggest improvements to the author.
-
Perform a first-pass review on the merge request and suggest improvements to the author.
-
Check the
[
metrics location
](
index.md#1-naming-and-placing-the-metrics
)
in
-
Check the
[
metrics location
](
index.md#1-naming-and-placing-the-metrics
)
in
the Service Ping JSON payload.
the Service Ping JSON payload.
-
Suggest that the author checks the
[
naming suggestion
](
index.md#how-to-get-a-metric-name-suggestion
)
while
generating the metric's YAML definition.
-
Add the
`~database`
label and ask for a
[
database review
](
../database_review.md
)
for
-
Add the
`~database`
label and ask for a
[
database review
](
../database_review.md
)
for
metrics that are based on Database.
metrics that are based on Database.
-
For tracking using Redis HLL (HyperLogLog):
-
For tracking using Redis HLL (HyperLogLog):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment