Skip to content

Commit

Permalink
[pkg/stanza/adapter] Deprecate ConvertFrom (#17494)
Browse files Browse the repository at this point in the history
Similar to Convert, the API is not being used and shouldn't be exported.
  • Loading branch information
dmitryax authored Jan 10, 2023
1 parent 6138996 commit 481e524
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/stanza/adapter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func convert(ent *entry.Entry) plog.LogRecord {
// Convert converts one entry.Entry into plog.Logs.
// To be used in a stateless setting like tests where ease of use is more
// important than performance or throughput.
// Deprecated: [v0.68.0] Unnecessary exported API.
// Deprecated: [v0.68.0] Unnecessarily exported API.
// Please add a comment in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/17429
// if you use it.
func Convert(ent *entry.Entry) plog.Logs {
Expand Down
3 changes: 3 additions & 0 deletions pkg/stanza/adapter/frompdataconverter.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ func convertFromLogs(workerItem fromConverterWorkerItem) []*entry.Entry {
// ConvertFrom converts plog.Logs into a slice of entry.Entry
// To be used in a stateless setting like tests where ease of use is more
// important than performance or throughput.
// Deprecated: [v0.69.0] Unnecessarily exported API.
// Please add a comment in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/17429
// if you use it.
func ConvertFrom(pLogs plog.Logs) []*entry.Entry {
result := make([]*entry.Entry, 0, pLogs.LogRecordCount())
for i := 0; i < pLogs.ResourceLogs().Len(); i++ {
Expand Down

0 comments on commit 481e524

Please sign in to comment.