Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orbea
Tor
Commits
5de66739
Commit
5de66739
authored
4 years ago
by
David Goulet
Browse files
Options
Downloads
Patches
Plain Diff
metrics: Add tor_ namespace to all metrics
Closes #40063 Signed-off-by:
David Goulet
<
dgoulet@torproject.org
>
parent
238340ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/feature/hs/hs_metrics_entry.c
+6
-6
6 additions, 6 deletions
src/feature/hs/hs_metrics_entry.c
src/lib/metrics/metrics_common.h
+9
-0
9 additions, 0 deletions
src/lib/metrics/metrics_common.h
with
15 additions
and
6 deletions
src/feature/hs/hs_metrics_entry.c
+
6
−
6
View file @
5de66739
...
...
@@ -23,40 +23,40 @@ const hs_metrics_entry_t base_metrics[] =
{
.
key
=
HS_METRICS_NUM_INTRODUCTIONS
,
.
type
=
METRICS_TYPE_COUNTER
,
.
name
=
"
hs_intro_num_total
"
,
.
name
=
METRICS_NAME
(
hs_intro_num_total
)
,
.
help
=
"Total number of introduction received"
,
.
port_as_label
=
false
,
},
{
.
key
=
HS_METRICS_APP_WRITE_BYTES
,
.
type
=
METRICS_TYPE_COUNTER
,
.
name
=
"
hs_app_write_bytes_total
"
,
.
name
=
METRICS_NAME
(
hs_app_write_bytes_total
)
,
.
help
=
"Total number of bytes written to the application"
,
.
port_as_label
=
true
,
},
{
.
key
=
HS_METRICS_APP_READ_BYTES
,
.
type
=
METRICS_TYPE_COUNTER
,
.
name
=
"
hs_app_read_bytes_total
"
,
.
name
=
METRICS_NAME
(
hs_app_read_bytes_total
)
,
.
help
=
"Total number of bytes read from the application"
,
.
port_as_label
=
true
,
},
{
.
key
=
HS_METRICS_NUM_ESTABLISHED_RDV
,
.
type
=
METRICS_TYPE_GAUGE
,
.
name
=
"
hs_rdv_established_count
"
,
.
name
=
METRICS_NAME
(
hs_rdv_established_count
)
,
.
help
=
"Total number of established rendezvous circuit"
,
},
{
.
key
=
HS_METRICS_NUM_RDV
,
.
type
=
METRICS_TYPE_COUNTER
,
.
name
=
"
hs_rdv_num_total
"
,
.
name
=
METRICS_NAME
(
hs_rdv_num_total
)
,
.
help
=
"Total number of rendezvous circuit created"
,
},
{
.
key
=
HS_METRICS_NUM_ESTABLISHED_INTRO
,
.
type
=
METRICS_TYPE_GAUGE
,
.
name
=
"
hs_intro_established_count
"
,
.
name
=
METRICS_NAME
(
hs_intro_established_count
)
,
.
help
=
"Total number of established introduction circuit"
,
},
};
...
...
This diff is collapsed.
Click to expand it.
src/lib/metrics/metrics_common.h
+
9
−
0
View file @
5de66739
...
...
@@ -11,6 +11,15 @@
#include
"lib/cc/torint.h"
/** Prefix to every metrics exposed. This is insures that the metrics are
* always in the same namespace. */
#define METRICS_PREFIX tor_
/** Helper macro that must be used to construct the right namespaced metrics
* name. A name is a string so stringify the result. */
#define METRICS_STR(val) #val
#define METRICS_NAME(name) METRICS_STR(METRICS_PREFIX ## name)
/** Format output type. */
typedef
enum
{
/** Prometheus data output format. */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment