Commit
**Description:** fix #9688 The batchprocessor use a `batchProcessor` as a common struct which implements `consumer.Traces`, `consumer.Metrics`, `consumer.Logs` in the meantime. As a result, the generated lifecycle test will fail, since when it create a metrics, traces processor object, it will still fall to the case `consumer.Logs` and panic. ``` === RUN TestComponentLifecycle/metrics-shutdown === RUN TestComponentLifecycle/metrics-lifecycle panic: interface conversion: interface {} is plog.Logs, not pmetric.Metrics goroutine 37 [running]: go.opentelemetry.io/collector/processor/batchprocessor.(*batchMetrics).add(0x14000208120?, {0x10572aae0?, 0x1400029c3f0?}) /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:450 +0x208 go.opentelemetry.io/collector/processor/batchprocessor.(*shard).processItem(0x14000292200, {0x10572aae0?, 0x1400029c3f0?}) /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:226 +0x38 go.opentelemetry.io/collector/processor/batchprocessor.(*shard).start(0x14000292200) /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:199 +0x1a0 created by go.opentelemetry.io/collector/processor/batchprocessor.(*batchProcessor).newShard in goroutine 36 /Users/zhaoziqi/Documents/go/src/go.opentelemetry.io/opentelemetry-collector/processor/batchprocessor/batch_processor.go:160 +0x1a4 exit status 2 FAIL go.opentelemetry.io/collector/processor/batchprocessor 0.594s ``` **Link to tracking Issue:** <Issue number if applicable> fix #9688 --------- Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) | ||
component: cmd/mdatagen | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: optimiz the mdatagen for the case like batchprocessor which use a common struct to implement consumer.Traces, consumer.Metrics, consumer.Logs in the meantime. | ||
|
||
# One or more tracking issues or pull requests related to the change | ||
issues: [9688] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | ||
|
||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.