Skip to content

Commit 5c765a3

Browse files
authored
[pkg/stanza] remove deprecated code (#33519)
This change removes: - adapter.LogEmitter, use helper.LogEmitter instead - adapter.NewLogEmitter, use helper.NewLogEmitter instead - fileconsumer.Manager's SugaredLogger struct member - pipeline.DirectedPipeline's SugaredLogger struct member - testutil.Logger, use zaptest.NewLogger instead --------- Signed-off-by: Alex Boten <[email protected]>
1 parent d3873bb commit 5c765a3

File tree

5 files changed

+33
-35
lines changed

5 files changed

+33
-35
lines changed

.chloggen/codeboten_rm-deprecate.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: stanza
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: remove deprecated code
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [33519]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
This change removes:
20+
- adapter.LogEmitter, use helper.LogEmitter instead
21+
- adapter.NewLogEmitter, use helper.NewLogEmitter instead
22+
- fileconsumer.Manager's SugaredLogger struct member
23+
- pipeline.DirectedPipeline's SugaredLogger struct member
24+
- testutil.Logger, use zaptest.NewLogger instead
25+
26+
# If your change doesn't affect end users or the exported elements of any package,
27+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
28+
# Optional: The change log or logs in which this entry should be included.
29+
# e.g. '[user]' or '[user, api]'
30+
# Include 'user' if the change is relevant to end users.
31+
# Include 'api' if there is a change to a library API.
32+
# Default: '[user]'
33+
change_logs: [api]

pkg/stanza/adapter/emitter.go

Lines changed: 0 additions & 19 deletions
This file was deleted.

pkg/stanza/fileconsumer/file.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ import (
2323
)
2424

2525
type Manager struct {
26-
// Deprecated [v0.101.0]
27-
*zap.SugaredLogger
28-
2926
set component.TelemetrySettings
3027
wg sync.WaitGroup
3128
cancel context.CancelFunc

pkg/stanza/pipeline/directed.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"sync"
1111

1212
"go.uber.org/multierr"
13-
"go.uber.org/zap"
1413
"gonum.org/v1/gonum/graph/encoding/dot"
1514
"gonum.org/v1/gonum/graph/simple"
1615
"gonum.org/v1/gonum/graph/topo"
@@ -26,8 +25,6 @@ var alreadyStopped = stanzaerrors.NewError("pipeline already stopped", "")
2625

2726
// DirectedPipeline is a pipeline backed by a directed graph
2827
type DirectedPipeline struct {
29-
// Deprecated [v0.101.0]
30-
*zap.SugaredLogger
3128
Graph *simple.DirectedGraph
3229
startOnce sync.Once
3330
stopOnce sync.Once

pkg/stanza/testutil/util.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,10 @@ import (
77
"context"
88
"strings"
99
"sync"
10-
"testing"
11-
12-
"go.uber.org/zap"
13-
"go.uber.org/zap/zapcore"
14-
"go.uber.org/zap/zaptest"
1510

1611
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator"
1712
)
1813

19-
// Deprecated [v0.101.0] Use zaptest.NewLogger directly instead
20-
func Logger(t testing.TB) *zap.SugaredLogger {
21-
return zaptest.NewLogger(t, zaptest.Level(zapcore.ErrorLevel)).Sugar()
22-
}
23-
2414
type mockPersister struct {
2515
data map[string][]byte
2616
dataMux sync.Mutex

0 commit comments

Comments
 (0)