mirror of
https://github.com/distribution/distribution.git
synced 2025-09-26 22:53:53 +00:00
Bump otel dependencies
We want to be consistent in our deps so tracking down issue does not end up in a murder mystery hunt. This commit picks a specific otel versions that are unified in this codebase. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
57
vendor/go.opentelemetry.io/otel/sdk/log/processor.go
generated
vendored
Normal file
57
vendor/go.opentelemetry.io/otel/sdk/log/processor.go
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package log // import "go.opentelemetry.io/otel/sdk/log"
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// Processor handles the processing of log records.
|
||||
//
|
||||
// Any of the Processor's methods may be called concurrently with itself
|
||||
// or with other methods. It is the responsibility of the Processor to manage
|
||||
// this concurrency.
|
||||
//
|
||||
// See [go.opentelemetry.io/otel/sdk/log/internal/x] for information about how
|
||||
// a Processor can be extended to support experimental features.
|
||||
type Processor interface {
|
||||
// OnEmit is called when a Record is emitted.
|
||||
//
|
||||
// OnEmit will be called independent of Enabled. Implementations need to
|
||||
// validate the arguments themselves before processing.
|
||||
//
|
||||
// Implementation should not interrupt the record processing
|
||||
// if the context is canceled.
|
||||
//
|
||||
// All retry logic must be contained in this function. The SDK does not
|
||||
// implement any retry logic. All errors returned by this function are
|
||||
// considered unrecoverable and will be reported to a configured error
|
||||
// Handler.
|
||||
//
|
||||
// The SDK invokes the processors sequentially in the same order as
|
||||
// they were registered using [WithProcessor].
|
||||
// Implementations may synchronously modify the record so that the changes
|
||||
// are visible in the next registered processor.
|
||||
// Notice that [Record] is not concurrent safe. Therefore, asynchronous
|
||||
// processing may cause race conditions. Use [Record.Clone]
|
||||
// to create a copy that shares no state with the original.
|
||||
OnEmit(ctx context.Context, record *Record) error
|
||||
|
||||
// Shutdown is called when the SDK shuts down. Any cleanup or release of
|
||||
// resources held by the exporter should be done in this call.
|
||||
//
|
||||
// The deadline or cancellation of the passed context must be honored. An
|
||||
// appropriate error should be returned in these situations.
|
||||
//
|
||||
// After Shutdown is called, calls to Export, Shutdown, or ForceFlush
|
||||
// should perform no operation and return nil error.
|
||||
Shutdown(ctx context.Context) error
|
||||
|
||||
// ForceFlush exports log records to the configured Exporter that have not yet
|
||||
// been exported.
|
||||
//
|
||||
// The deadline or cancellation of the passed context must be honored. An
|
||||
// appropriate error should be returned in these situations.
|
||||
ForceFlush(ctx context.Context) error
|
||||
}
|
Reference in New Issue
Block a user