Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
draft v2.0.0 (separate stats handlers) - 2 metrics used in testable e…
Browse files Browse the repository at this point in the history
…xample
  • Loading branch information
piotrkowalczuk committed Nov 15, 2018
1 parent 76cd2dc commit 381aceb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion draft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func ExampleDraft() {
grpc_prometheus.Server,
grpc_prometheus.NewRequestsTotalCounterVec(grpc_prometheus.Server),
),
grpc_prometheus.NewRequestsTotalStatsHandler(
grpc_prometheus.Server,
grpc_prometheus.NewRequestsTotalCounterVecV1(grpc_prometheus.Server),
),
)
srv := grpc.NewServer(grpc.StatsHandler(sts))
imp := newDemoServer()
Expand Down Expand Up @@ -56,7 +60,9 @@ func ExampleDraft() {
fmt.Println(m.GetName())
}

// Output: grpc_server_received_requests_total
// Output:
// grpc_server_received_requests_total
// grpc_server_started_total
}

func assert(err error) {
Expand Down

0 comments on commit 381aceb

Please sign in to comment.