Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
11094409
Commit
11094409
authored
Jun 24, 2016
by
Miek Gieben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
middleware/metrics: proto in size response as well
parent
4c00e444
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
middleware/metrics/README.md
middleware/metrics/README.md
+1
-0
middleware/metrics/handler.go
middleware/metrics/handler.go
+1
-1
middleware/metrics/metrics.go
middleware/metrics/metrics.go
+1
-1
No files found.
middleware/metrics/README.md
View file @
11094409
...
@@ -17,6 +17,7 @@ Each counter has a label `zone` which is the zonename used for the request/respo
...
@@ -17,6 +17,7 @@ Each counter has a label `zone` which is the zonename used for the request/respo
holds the transport of the response ("udp" or "tcp") and the address family of the transport (1
holds the transport of the response ("udp" or "tcp") and the address family of the transport (1
= IP (IP version 4), 2 = IP6 (IP version 6)).
= IP (IP version 4), 2 = IP6 (IP version 6)).
The
`response_rcode_count_total`
has an extra label
`rcode`
which holds the rcode of the response.
The
`response_rcode_count_total`
has an extra label
`rcode`
which holds the rcode of the response.
The
`*_size_bytes`
counters also hold the protocol in the
`proto`
label ("udp" or "tcp").
If monitoring is enabled queries that do not enter the middleware chain are exported under the fake
If monitoring is enabled queries that do not enter the middleware chain are exported under the fake
domain "dropped" (without a closing dot).
domain "dropped" (without a closing dot).
...
...
middleware/metrics/handler.go
View file @
11094409
...
@@ -49,6 +49,6 @@ func Report(state middleware.State, zone, rcode string, size int, start time.Tim
...
@@ -49,6 +49,6 @@ func Report(state middleware.State, zone, rcode string, size int, start time.Tim
requestDo
.
WithLabelValues
(
zone
)
.
Inc
()
requestDo
.
WithLabelValues
(
zone
)
.
Inc
()
}
}
responseSize
.
WithLabelValues
(
zone
)
.
Observe
(
float64
(
size
))
responseSize
.
WithLabelValues
(
zone
,
net
)
.
Observe
(
float64
(
size
))
responseRcode
.
WithLabelValues
(
zone
,
rcode
)
.
Inc
()
responseRcode
.
WithLabelValues
(
zone
,
rcode
)
.
Inc
()
}
}
middleware/metrics/metrics.go
View file @
11094409
...
@@ -103,7 +103,7 @@ func define() {
...
@@ -103,7 +103,7 @@ func define() {
Name
:
"response_size_bytes"
,
Name
:
"response_size_bytes"
,
Help
:
"Size of the returns response in bytes."
,
Help
:
"Size of the returns response in bytes."
,
Buckets
:
[]
float64
{
0
,
100
,
200
,
300
,
400
,
511
,
1023
,
2047
,
4095
,
8291
,
16e3
,
32e3
,
48e3
,
64e3
},
Buckets
:
[]
float64
{
0
,
100
,
200
,
300
,
400
,
511
,
1023
,
2047
,
4095
,
8291
,
16e3
,
32e3
,
48e3
,
64e3
},
},
[]
string
{
"zone"
})
},
[]
string
{
"zone"
,
"proto"
})
responseRcode
=
prometheus
.
NewCounterVec
(
prometheus
.
CounterOpts
{
responseRcode
=
prometheus
.
NewCounterVec
(
prometheus
.
CounterOpts
{
Namespace
:
middleware
.
Namespace
,
Namespace
:
middleware
.
Namespace
,
...
...
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