Skip to content

Commit

Permalink
otelloghttp: Implement Exporter.ForceFlush (#5164)
Browse files Browse the repository at this point in the history
It holds no state, already implemented.
  • Loading branch information
MrAlias authored Apr 8, 2024
1 parent 30487e1 commit d66a661
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 0 additions & 1 deletion exporters/otlp/otlplog/otlploghttp/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 20 additions & 0 deletions exporters/otlp/otlplog/otlploghttp/exporter_test.go
Original file line number Diff line number Diff line change
@@ -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")
}

0 comments on commit d66a661

Please sign in to comment.