1
0
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:
Tyler Yahn 2024-04-08 00:47:11 -07:00 committed by GitHub
parent 30487e145c
commit d66a6618c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 1 deletions

View File

@ -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
}

View 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")
}