@@ -90,7 +90,7 @@ func (n *connectorNode) buildTraces(
90
90
for _ , next := range nexts {
91
91
consumers [next .(* capabilitiesNode ).pipelineID ] = obsconsumer .NewTraces (
92
92
next .(consumer.Traces ),
93
- tb .ConnectorProducedItems ,
93
+ tb .ConnectorProducedItems , tb . ConnectorProducedSize ,
94
94
obsconsumer .WithStaticDataPointAttribute (
95
95
otelattr .String (
96
96
pipelineIDAttrKey ,
@@ -107,32 +107,33 @@ func (n *connectorNode) buildTraces(
107
107
if err != nil {
108
108
return err
109
109
}
110
+
110
111
// Connectors which might pass along data must inherit capabilities of all nexts
111
112
n .consumer = obsconsumer .NewTraces (
112
113
capabilityconsumer .NewTraces (
113
114
n .Component .(consumer.Traces ),
114
115
aggregateCap (n .Component .(consumer.Traces ), nexts ),
115
116
),
116
- tb .ConnectorConsumedItems ,
117
+ tb .ConnectorConsumedItems , tb . ConnectorConsumedSize ,
117
118
)
118
119
case pipeline .SignalMetrics :
119
120
n .Component , err = builder .CreateMetricsToTraces (ctx , set , next )
120
121
if err != nil {
121
122
return err
122
123
}
123
- n .consumer = obsconsumer .NewMetrics (n .Component .(consumer.Metrics ), tb .ConnectorConsumedItems )
124
+ n .consumer = obsconsumer .NewMetrics (n .Component .(consumer.Metrics ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
124
125
case pipeline .SignalLogs :
125
126
n .Component , err = builder .CreateLogsToTraces (ctx , set , next )
126
127
if err != nil {
127
128
return err
128
129
}
129
- n .consumer = obsconsumer .NewLogs (n .Component .(consumer.Logs ), tb .ConnectorConsumedItems )
130
+ n .consumer = obsconsumer .NewLogs (n .Component .(consumer.Logs ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
130
131
case xpipeline .SignalProfiles :
131
132
n .Component , err = builder .CreateProfilesToTraces (ctx , set , next )
132
133
if err != nil {
133
134
return err
134
135
}
135
- n .consumer = obsconsumer .NewProfiles (n .Component .(xconsumer.Profiles ), tb .ConnectorConsumedItems )
136
+ n .consumer = obsconsumer .NewProfiles (n .Component .(xconsumer.Profiles ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
136
137
}
137
138
return nil
138
139
}
@@ -152,7 +153,7 @@ func (n *connectorNode) buildMetrics(
152
153
for _ , next := range nexts {
153
154
consumers [next .(* capabilitiesNode ).pipelineID ] = obsconsumer .NewMetrics (
154
155
next .(consumer.Metrics ),
155
- tb .ConnectorProducedItems ,
156
+ tb .ConnectorProducedItems , tb . ConnectorProducedSize ,
156
157
obsconsumer .WithStaticDataPointAttribute (
157
158
otelattr .String (
158
159
pipelineIDAttrKey ,
@@ -169,32 +170,33 @@ func (n *connectorNode) buildMetrics(
169
170
if err != nil {
170
171
return err
171
172
}
173
+
172
174
// Connectors which might pass along data must inherit capabilities of all nexts
173
175
n .consumer = obsconsumer .NewMetrics (
174
176
capabilityconsumer .NewMetrics (
175
177
n .Component .(consumer.Metrics ),
176
178
aggregateCap (n .Component .(consumer.Metrics ), nexts ),
177
179
),
178
- tb .ConnectorConsumedItems ,
180
+ tb .ConnectorConsumedItems , tb . ConnectorConsumedSize ,
179
181
)
180
182
case pipeline .SignalTraces :
181
183
n .Component , err = builder .CreateTracesToMetrics (ctx , set , next )
182
184
if err != nil {
183
185
return err
184
186
}
185
- n .consumer = obsconsumer .NewTraces (n .Component .(consumer.Traces ), tb .ConnectorConsumedItems )
187
+ n .consumer = obsconsumer .NewTraces (n .Component .(consumer.Traces ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
186
188
case pipeline .SignalLogs :
187
189
n .Component , err = builder .CreateLogsToMetrics (ctx , set , next )
188
190
if err != nil {
189
191
return err
190
192
}
191
- n .consumer = obsconsumer .NewLogs (n .Component .(consumer.Logs ), tb .ConnectorConsumedItems )
193
+ n .consumer = obsconsumer .NewLogs (n .Component .(consumer.Logs ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
192
194
case xpipeline .SignalProfiles :
193
195
n .Component , err = builder .CreateProfilesToMetrics (ctx , set , next )
194
196
if err != nil {
195
197
return err
196
198
}
197
- n .consumer = obsconsumer .NewProfiles (n .Component .(xconsumer.Profiles ), tb .ConnectorConsumedItems )
199
+ n .consumer = obsconsumer .NewProfiles (n .Component .(xconsumer.Profiles ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
198
200
}
199
201
return nil
200
202
}
@@ -214,7 +216,7 @@ func (n *connectorNode) buildLogs(
214
216
for _ , next := range nexts {
215
217
consumers [next .(* capabilitiesNode ).pipelineID ] = obsconsumer .NewLogs (
216
218
next .(consumer.Logs ),
217
- tb .ConnectorProducedItems ,
219
+ tb .ConnectorProducedItems , tb . ConnectorProducedSize ,
218
220
obsconsumer .WithStaticDataPointAttribute (
219
221
otelattr .String (
220
222
pipelineIDAttrKey ,
@@ -231,32 +233,33 @@ func (n *connectorNode) buildLogs(
231
233
if err != nil {
232
234
return err
233
235
}
236
+
234
237
// Connectors which might pass along data must inherit capabilities of all nexts
235
238
n .consumer = obsconsumer .NewLogs (
236
239
capabilityconsumer .NewLogs (
237
240
n .Component .(consumer.Logs ),
238
241
aggregateCap (n .Component .(consumer.Logs ), nexts ),
239
242
),
240
- tb .ConnectorConsumedItems ,
243
+ tb .ConnectorConsumedItems , tb . ConnectorConsumedSize ,
241
244
)
242
245
case pipeline .SignalTraces :
243
246
n .Component , err = builder .CreateTracesToLogs (ctx , set , next )
244
247
if err != nil {
245
248
return err
246
249
}
247
- n .consumer = obsconsumer .NewTraces (n .Component .(consumer.Traces ), tb .ConnectorConsumedItems )
250
+ n .consumer = obsconsumer .NewTraces (n .Component .(consumer.Traces ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
248
251
case pipeline .SignalMetrics :
249
252
n .Component , err = builder .CreateMetricsToLogs (ctx , set , next )
250
253
if err != nil {
251
254
return err
252
255
}
253
- n .consumer = obsconsumer .NewMetrics (n .Component .(consumer.Metrics ), tb .ConnectorConsumedItems )
256
+ n .consumer = obsconsumer .NewMetrics (n .Component .(consumer.Metrics ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
254
257
case xpipeline .SignalProfiles :
255
258
n .Component , err = builder .CreateProfilesToLogs (ctx , set , next )
256
259
if err != nil {
257
260
return err
258
261
}
259
- n .consumer = obsconsumer .NewProfiles (n .Component .(xconsumer.Profiles ), tb .ConnectorConsumedItems )
262
+ n .consumer = obsconsumer .NewProfiles (n .Component .(xconsumer.Profiles ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
260
263
}
261
264
return nil
262
265
}
@@ -276,7 +279,7 @@ func (n *connectorNode) buildProfiles(
276
279
for _ , next := range nexts {
277
280
consumers [next .(* capabilitiesNode ).pipelineID ] = obsconsumer .NewProfiles (
278
281
next .(xconsumer.Profiles ),
279
- tb .ConnectorProducedItems ,
282
+ tb .ConnectorProducedItems , tb . ConnectorProducedSize ,
280
283
obsconsumer .WithStaticDataPointAttribute (
281
284
otelattr .String (
282
285
pipelineIDAttrKey ,
@@ -293,32 +296,33 @@ func (n *connectorNode) buildProfiles(
293
296
if err != nil {
294
297
return err
295
298
}
299
+
296
300
// Connectors which might pass along data must inherit capabilities of all nexts
297
301
n .consumer = obsconsumer .NewProfiles (
298
302
capabilityconsumer .NewProfiles (
299
303
n .Component .(xconsumer.Profiles ),
300
304
aggregateCap (n .Component .(xconsumer.Profiles ), nexts ),
301
305
),
302
- tb .ConnectorConsumedItems ,
306
+ tb .ConnectorConsumedItems , tb . ConnectorConsumedSize ,
303
307
)
304
308
case pipeline .SignalTraces :
305
309
n .Component , err = builder .CreateTracesToProfiles (ctx , set , next )
306
310
if err != nil {
307
311
return err
308
312
}
309
- n .consumer = obsconsumer .NewTraces (n .Component .(consumer.Traces ), tb .ConnectorConsumedItems )
313
+ n .consumer = obsconsumer .NewTraces (n .Component .(consumer.Traces ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
310
314
case pipeline .SignalMetrics :
311
315
n .Component , err = builder .CreateMetricsToProfiles (ctx , set , next )
312
316
if err != nil {
313
317
return err
314
318
}
315
- n .consumer = obsconsumer .NewMetrics (n .Component .(consumer.Metrics ), tb .ConnectorConsumedItems )
319
+ n .consumer = obsconsumer .NewMetrics (n .Component .(consumer.Metrics ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
316
320
case pipeline .SignalLogs :
317
321
n .Component , err = builder .CreateLogsToProfiles (ctx , set , next )
318
322
if err != nil {
319
323
return err
320
324
}
321
- n .consumer = obsconsumer .NewLogs (n .Component .(consumer.Logs ), tb .ConnectorConsumedItems )
325
+ n .consumer = obsconsumer .NewLogs (n .Component .(consumer.Logs ), tb .ConnectorConsumedItems , tb . ConnectorConsumedSize )
322
326
}
323
327
return nil
324
328
}
0 commit comments