Skip to content

Commit

Permalink
Code Improvement - Error strings should not be capitalized (#1488)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
wgliang and MrAlias authored Feb 4, 2021
1 parent 6b34050 commit 38efc87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions exporters/otlp/otlphttp/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ func (d *driver) send(ctx context.Context, rawRequest []byte, urlPath string) er
return ctx.Err()
}
default:
return fmt.Errorf("Failed with HTTP status %s", response.Status)
return fmt.Errorf("failed with HTTP status %s", response.Status)
}
}
return fmt.Errorf("Failed to send data to %s after %d tries", address, d.cfg.maxAttempts)
return fmt.Errorf("failed to send data to %s after %d tries", address, d.cfg.maxAttempts)
}

func (d *driver) getScheme() string {
Expand Down
4 changes: 2 additions & 2 deletions metric/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (p *MeterProvider) Meter(instrumentationName string, opts ...metric.MeterOp
// ErrMetricKindMismatch is the standard error for mismatched metric
// instrument definitions.
var ErrMetricKindMismatch = fmt.Errorf(
"A metric was already registered by this name with another kind or number type")
"a metric was already registered by this name with another kind or number type")

// NewUniqueInstrumentMeterImpl returns a wrapped metric.MeterImpl with
// the addition of uniqueness checking.
Expand All @@ -90,7 +90,7 @@ func keyOf(descriptor metric.Descriptor) key {
// NewMetricKindMismatchError formats an error that describes a
// mismatched metric instrument definition.
func NewMetricKindMismatchError(desc metric.Descriptor) error {
return fmt.Errorf("Metric was %s (%s %s)registered as a %s %s: %w",
return fmt.Errorf("metric was %s (%s %s)registered as a %s %s: %w",
desc.Name(),
desc.InstrumentationName(),
desc.InstrumentationVersion(),
Expand Down

0 comments on commit 38efc87

Please sign in to comment.