open-telemetry / opentelemetry-collector

@@ -157,7 +157,7 @@
Loading
157 157
}
158 158
159 159
type rawMetricsServer struct {
160 -
	srv Server
160 +
	srv GRPCServer
161 161
}
162 162
163 163
func (s rawMetricsServer) Export(ctx context.Context, request *otlpcollectormetrics.ExportMetricsServiceRequest) (*otlpcollectormetrics.ExportMetricsServiceResponse, error) {

@@ -69,7 +69,9 @@
Loading
69 69
	// the incoming data to a mutating consumer is used that may change the incoming data before
70 70
	// cloning.
71 71
	for _, mc := range msc.clone {
72 -
		errs = multierr.Append(errs, mc.ConsumeMetrics(ctx, md.Clone()))
72 +
		clonedMetrics := pmetric.NewMetrics()
73 +
		md.CopyTo(clonedMetrics)
74 +
		errs = multierr.Append(errs, mc.ConsumeMetrics(ctx, clonedMetrics))
73 75
	}
74 76
	for _, mc := range msc.pass {
75 77
		errs = multierr.Append(errs, mc.ConsumeMetrics(ctx, md))

@@ -69,7 +69,9 @@
Loading
69 69
	// the incoming data to a mutating consumer is used that may change the incoming data before
70 70
	// cloning.
71 71
	for _, tc := range tsc.clone {
72 -
		errs = multierr.Append(errs, tc.ConsumeTraces(ctx, td.Clone()))
72 +
		clonedTraces := ptrace.NewTraces()
73 +
		td.CopyTo(clonedTraces)
74 +
		errs = multierr.Append(errs, tc.ConsumeTraces(ctx, clonedTraces))
73 75
	}
74 76
	for _, tc := range tsc.pass {
75 77
		errs = multierr.Append(errs, tc.ConsumeTraces(ctx, td))

@@ -71,7 +71,9 @@
Loading
71 71
	// the incoming data to a mutating consumer is used that may change the incoming data before
72 72
	// cloning.
73 73
	for _, lc := range lsc.clone {
74 -
		errs = multierr.Append(errs, lc.ConsumeLogs(ctx, ld.Clone()))
74 +
		clonedLogs := plog.NewLogs()
75 +
		ld.CopyTo(clonedLogs)
76 +
		errs = multierr.Append(errs, lc.ConsumeLogs(ctx, clonedLogs))
75 77
	}
76 78
	for _, lc := range lsc.pass {
77 79
		errs = multierr.Append(errs, lc.ConsumeLogs(ctx, ld))
Files Coverage
cmd 55.60%
component 95.51%
config 93.46%
confmap 96.14%
consumer 100.00%
exporter 90.38%
extension 84.17%
featuregate 100.00%
internal 88.38%
obsreport 97.26%
pdata 94.82%
processor 94.01%
receiver 84.43%
service 85.71%
client/client.go 100.00%
Project Totals (218 files) 91.77%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading