mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-05 13:15:41 +02:00
otelloghttp: Implement Exporter.ForceFlush (#5164)
It holds no state, already implemented.
This commit is contained in:
parent
30487e145c
commit
d66a6618c2
@ -48,6 +48,5 @@ func (e *Exporter) Shutdown(ctx context.Context) error {
|
||||
|
||||
// ForceFlush does nothing. The Exporter holds no state.
|
||||
func (e *Exporter) ForceFlush(ctx context.Context) error {
|
||||
// TODO: implement.
|
||||
return nil
|
||||
}
|
||||
|
20
exporters/otlp/otlplog/otlploghttp/exporter_test.go
Normal file
20
exporters/otlp/otlplog/otlploghttp/exporter_test.go
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package otlploghttp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestExporterForceFlush(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
e, err := New(ctx)
|
||||
require.NoError(t, err, "New")
|
||||
|
||||
assert.NoError(t, e.ForceFlush(ctx), "ForceFlush")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user