Skip to content

Commit da329ce

Browse files
authored
Fix timeseries collections being ignored in discovery mode
The filter excluding view collections erronously also dropped collections with type "timeseries"
1 parent 06b081a commit da329ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exporter/common.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ func listCollections(ctx context.Context, client *mongo.Client, database string,
6060
}
6161

6262
if skipViews {
63-
filter = append(filter, primitive.E{Key: "type", Value: "collection"})
63+
filter = append(filter, primitive.E{Key: "type", Value: bson.D{
64+
{Key: "$in", Value: bson.A{"collection", "timeseries"}},
65+
}})
6466
}
6567

6668
collections, err := client.Database(database).ListCollectionNames(ctx, filter, opts)

0 commit comments

Comments
 (0)