File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
# This Dockerfile builds an image for a client_golang example.
2
2
#
3
3
# Use as (from the root for the client_golang repository):
4
- # docker build -f examples/$name/Dockerfile -t prometheus/golang-example-$name .
4
+ # docker build -f Dockerfile -t prometheus/golang-example .
5
+
6
+ # Run as
7
+ # docker run -P prometheus/golang-example /random
8
+ # or
9
+ # docker run -P prometheus/golang-example /simple
10
+
11
+ # Test as
12
+ # curl $ip:$port/metrics
5
13
6
14
# Builder image, where we build the example.
7
15
FROM golang:1 AS builder
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import (
26
26
"time"
27
27
28
28
"github.com/prometheus/client_golang/prometheus"
29
+ "github.com/prometheus/client_golang/prometheus/collectors"
29
30
"github.com/prometheus/client_golang/prometheus/promhttp"
30
31
)
31
32
@@ -67,7 +68,7 @@ func main() {
67
68
prometheus .MustRegister (rpcDurations )
68
69
prometheus .MustRegister (rpcDurationsHistogram )
69
70
// Add Go module build info.
70
- prometheus .MustRegister (prometheus .NewBuildInfoCollector ())
71
+ prometheus .MustRegister (collectors .NewBuildInfoCollector ())
71
72
72
73
start := time .Now ()
73
74
You can’t perform that action at this time.
0 commit comments