mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
to allow adding more experimental data types. Updates https://github.com/open-telemetry/opentelemetry-collector/issues/11778
26 lines
783 B
Go
26 lines
783 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package xconsumererror // import "go.opentelemetry.io/collector/consumer/consumererror/xconsumererror"
|
|
|
|
import (
|
|
"go.opentelemetry.io/collector/consumer/consumererror/internal"
|
|
"go.opentelemetry.io/collector/pdata/pprofile"
|
|
)
|
|
|
|
// Profiles is an error that may carry associated Profile data for a subset of received data
|
|
// that failed to be processed or sent.
|
|
type Profiles struct {
|
|
internal.Retryable[pprofile.Profiles]
|
|
}
|
|
|
|
// NewProfiles creates a Profiles that can encapsulate received data that failed to be processed or sent.
|
|
func NewProfiles(err error, data pprofile.Profiles) error {
|
|
return Profiles{
|
|
Retryable: internal.Retryable[pprofile.Profiles]{
|
|
Err: err,
|
|
Value: data,
|
|
},
|
|
}
|
|
}
|