Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a33b86e2
Commit
a33b86e2
authored
May 09, 2019
by
andyzhangx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix incorrect prometheus metrics
parent
ef9e794a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
68 deletions
+37
-68
azure_client.go
...g/src/k8s.io/legacy-cloud-providers/azure/azure_client.go
+34
-67
azure_metrics.go
.../src/k8s.io/legacy-cloud-providers/azure/azure_metrics.go
+3
-1
No files found.
staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go
View file @
a33b86e2
This diff is collapsed.
Click to expand it.
staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics.go
View file @
a33b86e2
...
...
@@ -50,12 +50,14 @@ func newMetricContext(prefix, request, resourceGroup, subscriptionID string) *me
}
}
func
(
mc
*
metricContext
)
Observe
(
err
error
)
{
func
(
mc
*
metricContext
)
Observe
(
err
error
)
error
{
apiMetrics
.
latency
.
WithLabelValues
(
mc
.
attributes
...
)
.
Observe
(
time
.
Since
(
mc
.
start
)
.
Seconds
())
if
err
!=
nil
{
apiMetrics
.
errors
.
WithLabelValues
(
mc
.
attributes
...
)
.
Inc
()
}
return
err
}
func
registerAPIMetrics
(
attributes
...
string
)
*
apiCallMetrics
{
...
...
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