// Code generated by gotmpl. DO NOT MODIFY.// source: internal/shared/otlp/partialsuccess.go// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"import// PartialSuccess represents the underlying error for all handling// OTLP partial success messages. Use `errors.Is(err,// PartialSuccess{})` to test whether an error passed to the OTel// error handler belongs to this category.typePartialSuccessstruct { ErrorMessage string RejectedItems int64 RejectedKind string}var _ error = PartialSuccess{}// Error implements the error interface.func ( PartialSuccess) () string { := .ErrorMessageif == "" { = "empty message" }returnfmt.Sprintf("OTLP partial success: %s (%d %s rejected)", , .RejectedItems, .RejectedKind)}// Is supports the errors.Is() interface.func ( PartialSuccess) ( error) bool { , := .(PartialSuccess)return}// TracePartialSuccessError returns an error describing a partial success// response for the trace signal.func ( int64, string) error {returnPartialSuccess{ErrorMessage: ,RejectedItems: ,RejectedKind: "spans", }}// MetricPartialSuccessError returns an error describing a partial success// response for the metric signal.func ( int64, string) error {returnPartialSuccess{ErrorMessage: ,RejectedItems: ,RejectedKind: "metric data points", }}
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.