Skip to content

Commit

Permalink
fix examples_test output and various opts comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vesari committed Nov 26, 2023
1 parent 6d75da8 commit df2dcf4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion prometheus/desc.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type Desc struct {
fqName string
// help provides some helpful information about this metric.
help string
// unit provides the unit of this metric
// unit provides the unit of this metric.
unit string
// constLabelPairs contains precalculated DTO label pairs based on
// the constant labels.
Expand Down
4 changes: 2 additions & 2 deletions prometheus/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ func ExampleRegister() {

// Output:
// taskCounter registered.
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", unit: "", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
// taskCounter unregistered.
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", unit: "", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
// taskCounterVec registered.
// Worker initialization failed: inconsistent label cardinality: expected 1 label values but got 2 in []string{"42", "spurious arg"}
// notMyCounter is nil.
Expand Down
2 changes: 1 addition & 1 deletion prometheus/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ type HistogramOpts struct {
// string.
Help string

//Unit provides the unit of this Histogram
//Unit provides the unit of this Histogram.
Unit string

// ConstLabels are used to attach fixed labels to this metric. Metrics
Expand Down
2 changes: 1 addition & 1 deletion prometheus/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type Opts struct {
// string.
Help string

// Unit provides the unit of this metric
// Unit provides the unit of this metric.
Unit string

// ConstLabels are used to attach fixed labels to this metric. Metrics
Expand Down
2 changes: 1 addition & 1 deletion prometheus/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type SummaryOpts struct {
// string.
Help string

// Unit provides the unit of the metric
// Unit provides the unit of this Summary.
Unit string

// ConstLabels are used to attach fixed labels to this metric. Metrics
Expand Down

0 comments on commit df2dcf4

Please sign in to comment.