1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-03 22:52:30 +02:00

Code Improvement - Error strings should not be capitalized (#1488)

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
Leon Wang 2021-02-05 03:32:43 +08:00 committed by GitHub
parent 6b340501b3
commit 38efc875cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -193,10 +193,10 @@ func (d *driver) send(ctx context.Context, rawRequest []byte, urlPath string) er
return ctx.Err() return ctx.Err()
} }
default: 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 { func (d *driver) getScheme() string {

View File

@ -63,7 +63,7 @@ func (p *MeterProvider) Meter(instrumentationName string, opts ...metric.MeterOp
// ErrMetricKindMismatch is the standard error for mismatched metric // ErrMetricKindMismatch is the standard error for mismatched metric
// instrument definitions. // instrument definitions.
var ErrMetricKindMismatch = fmt.Errorf( 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 // NewUniqueInstrumentMeterImpl returns a wrapped metric.MeterImpl with
// the addition of uniqueness checking. // the addition of uniqueness checking.
@ -90,7 +90,7 @@ func keyOf(descriptor metric.Descriptor) key {
// NewMetricKindMismatchError formats an error that describes a // NewMetricKindMismatchError formats an error that describes a
// mismatched metric instrument definition. // mismatched metric instrument definition.
func NewMetricKindMismatchError(desc metric.Descriptor) error { 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.Name(),
desc.InstrumentationName(), desc.InstrumentationName(),
desc.InstrumentationVersion(), desc.InstrumentationVersion(),