@@ -31,10 +31,6 @@ func TestValidateRouteType(t *testing.T) {
3131 {"logs" , nil },
3232 {"metrics" , nil },
3333 {"traces" , nil },
34- {"logs+metrics" , nil },
35- {"logs+traces" , nil },
36- {"metrics+traces" , nil },
37- {"logs+metrics+traces" , nil },
3834 {"invalid" , errors .New ("invalid route type: invalid" )},
3935 }
4036
@@ -79,11 +75,11 @@ func TestParseRoutes(t *testing.T) {
7975 map [string ]any {
8076 "route_id" : "logs-otlp" ,
8177 "components" : []any {"destinations/otlp" },
82- "telemetry_type" : "logs+metrics+traces " ,
78+ "telemetry_type" : "logs" ,
8379 },
8480 },
8581 & model.Routes {
86- LogsMetricsTraces : []model.Route {
82+ Logs : []model.Route {
8783 {
8884 ID : "logs-otlp" ,
8985 Components : []model.ComponentPath {"destinations/otlp" },
@@ -110,26 +106,6 @@ func TestParseRoutes(t *testing.T) {
110106 "components" : []any {"destinations/jaeger" },
111107 "telemetry_type" : "traces" ,
112108 },
113- map [string ]any {
114- "route_id" : "logs-metrics" ,
115- "components" : []any {"destinations/otlp" , "processors/batcher" },
116- "telemetry_type" : "logs+metrics" ,
117- },
118- map [string ]any {
119- "route_id" : "logs-traces" ,
120- "components" : []any {"destinations/otlp" , "processors/batcher" },
121- "telemetry_type" : "logs+traces" ,
122- },
123- map [string ]any {
124- "route_id" : "metrics-traces" ,
125- "components" : []any {"destinations/otlp" , "processors/batcher" },
126- "telemetry_type" : "metrics+traces" ,
127- },
128- map [string ]any {
129- "route_id" : "all" ,
130- "components" : []any {"destinations/otlp" , "processors/batcher" , "connectors/router" },
131- "telemetry_type" : "logs+metrics+traces" ,
132- },
133109 },
134110 & model.Routes {
135111 Logs : []model.Route {
@@ -150,30 +126,6 @@ func TestParseRoutes(t *testing.T) {
150126 Components : []model.ComponentPath {"destinations/jaeger" },
151127 },
152128 },
153- LogsMetrics : []model.Route {
154- {
155- ID : "logs-metrics" ,
156- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
157- },
158- },
159- LogsTraces : []model.Route {
160- {
161- ID : "logs-traces" ,
162- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
163- },
164- },
165- MetricsTraces : []model.Route {
166- {
167- ID : "metrics-traces" ,
168- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
169- },
170- },
171- LogsMetricsTraces : []model.Route {
172- {
173- ID : "all" ,
174- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" , "connectors/router" },
175- },
176- },
177129 },
178130 false ,
179131 },
@@ -182,7 +134,7 @@ func TestParseRoutes(t *testing.T) {
182134 []any {
183135 map [string ]any {
184136 "components" : []any {"dest/otlp" },
185- "telemetry_type" : "logs+metrics+ traces" ,
137+ "telemetry_type" : "traces" ,
186138 },
187139 },
188140 nil ,
@@ -272,78 +224,6 @@ func TestRoutesToState(t *testing.T) {
272224 },
273225 },
274226 },
275- {
276- "logs+metrics route" ,
277- & model.Routes {
278- LogsMetrics : []model.Route {
279- {
280- ID : "all-types" ,
281- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
282- },
283- },
284- },
285- []map [string ]any {
286- {
287- "route_id" : "all-types" ,
288- "telemetry_type" : "logs+metrics" ,
289- "components" : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
290- },
291- },
292- },
293- {
294- "logs+traces route" ,
295- & model.Routes {
296- LogsTraces : []model.Route {
297- {
298- ID : "logs-traces" ,
299- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
300- },
301- },
302- },
303- []map [string ]any {
304- {
305- "route_id" : "logs-traces" ,
306- "telemetry_type" : "logs+traces" ,
307- "components" : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
308- },
309- },
310- },
311- {
312- "metrics+traces route" ,
313- & model.Routes {
314- MetricsTraces : []model.Route {
315- {
316- ID : "metrics-traces" ,
317- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
318- },
319- },
320- },
321- []map [string ]any {
322- {
323- "route_id" : "metrics-traces" ,
324- "telemetry_type" : "metrics+traces" ,
325- "components" : []model.ComponentPath {"destinations/otlp" , "processors/batcher" },
326- },
327- },
328- },
329- {
330- "logs+metrics+traces route" ,
331- & model.Routes {
332- LogsMetricsTraces : []model.Route {
333- {
334- ID : "all" ,
335- Components : []model.ComponentPath {"destinations/otlp" , "processors/batcher" , "connectors/router" },
336- },
337- },
338- },
339- []map [string ]any {
340- {
341- "route_id" : "all" ,
342- "telemetry_type" : "logs+metrics+traces" ,
343- "components" : []model.ComponentPath {"destinations/otlp" , "processors/batcher" , "connectors/router" },
344- },
345- },
346- },
347227 }
348228
349229 for _ , tc := range cases {
0 commit comments