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

Commit

Permalink
add space between error and %v in gauge example. (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
rghetia committed Apr 25, 2019
1 parent 6bebf56 commit c82de26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions examples/gauges/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ allocGauge, err := r.AddInt64Gauge(
metric.WithDescription("Process heap allocation"),
metric.WithUnit(metricdata.UnitBytes))
if err != nil {
log.Fatalf("error creating heap allocation gauge, error%v\n", err)
log.Fatalf("error creating heap allocation gauge, error %v\n", err)
}
```

Expand All @@ -76,7 +76,7 @@ ratioGauge, err := r.AddFloat64Gauge(
metric.WithDescription("process heap idle to allocate ratio"),
metric.WithUnit(metricdata.UnitDimensionless))
if err != nil {
log.Fatalf("error creating process heap idle to allocate ratio gauge, error%v\n", err)
log.Fatalf("error creating process heap idle to allocate ratio gauge, error %v\n", err)
}
```

Expand All @@ -89,7 +89,7 @@ Now, create or get a unique entry (equivalent of a row in a table) for a given s
```go
allocEntry, err = allocGauge.GetEntry()
if err != nil {
log.Fatalf("error getting heap allocation gauge entry, error%v\n", err)
log.Fatalf("error getting heap allocation gauge entry, error %v\n", err)
}
```

Expand All @@ -99,7 +99,7 @@ if err != nil {
```go
ratioEntry, err = ratioGauge.GetEntry()
if err != nil {
log.Fatalf("error getting process heap idle to allocate ratio gauge entry, error%v\n", err)
log.Fatalf("error getting process heap idle to allocate ratio gauge entry, error %v\n", err)
}
```

Expand Down Expand Up @@ -269,12 +269,12 @@ func main() {
metric.WithDescription("Process heap allocation"),
metric.WithUnit(metricdata.UnitBytes))
if err != nil {
log.Fatalf("error creating heap allocation gauge, error%v\n", err)
log.Fatalf("error creating heap allocation gauge, error %v\n", err)
}

allocEntry, err = allocGauge.GetEntry()
if err != nil {
log.Fatalf("error getting heap allocation gauge entry, error%v\n", err)
log.Fatalf("error getting heap allocation gauge entry, error %v\n", err)
}

// Create Float64Gauge to report fractional cpu consumed by Garbage Collection.
Expand All @@ -283,12 +283,12 @@ func main() {
metric.WithDescription("process heap idle to allocate ratio"),
metric.WithUnit(metricdata.UnitDimensionless))
if err != nil {
log.Fatalf("error creating process heap idle to allocate ratio gauge, error%v\n", err)
log.Fatalf("error creating process heap idle to allocate ratio gauge, error %v\n", err)
}

ratioEntry, err = ratioGauge.GetEntry()
if err != nil {
log.Fatalf("error getting process heap idle to allocate ratio gauge entry, error%v\n", err)
log.Fatalf("error getting process heap idle to allocate ratio gauge entry, error %v\n", err)
}

// record gauge metrics every 5 seconds. This example records the gauges periodically. However,
Expand Down
8 changes: 4 additions & 4 deletions examples/gauges/gauge.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ func main() {
metric.WithDescription("Process heap allocation"),
metric.WithUnit(metricdata.UnitBytes))
if err != nil {
log.Fatalf("error creating heap allocation gauge, error%v\n", err)
log.Fatalf("error creating heap allocation gauge, error %v\n", err)
}
// END alloc

// START entryAlloc
allocEntry, err = allocGauge.GetEntry()
if err != nil {
log.Fatalf("error getting heap allocation gauge entry, error%v\n", err)
log.Fatalf("error getting heap allocation gauge entry, error %v\n", err)
}
// END entryAlloc

Expand All @@ -188,14 +188,14 @@ func main() {
metric.WithDescription("process heap idle to allocate ratio"),
metric.WithUnit(metricdata.UnitDimensionless))
if err != nil {
log.Fatalf("error creating process heap idle to allocate ratio gauge, error%v\n", err)
log.Fatalf("error creating process heap idle to allocate ratio gauge, error %v\n", err)
}
// END idle

// START entryIdle
ratioEntry, err = ratioGauge.GetEntry()
if err != nil {
log.Fatalf("error getting process heap idle to allocate ratio gauge entry, error%v\n", err)
log.Fatalf("error getting process heap idle to allocate ratio gauge entry, error %v\n", err)
}
// END entryIdle

Expand Down

0 comments on commit c82de26

Please sign in to comment.