It'd be nice to be able to generate metrics for additional commands, beyond "insert", "update", and "delete" [0]. We could just add a bunch of new commands to this hardcoded list, but that has a few problems:
- It's not future-proof against new MongoDB releases adding new commands.
- Our MongoDB deployment contains some custom diagnostic or administrative commands that wouldn't make sense to upstream.
Assuming this seems reasonable, I'm happy to provide a patch for this functionality.
[0] https://github.com/envoyproxy/envoy/blob/master/source/extensions/filters/network/mongo_proxy/mongo_stats.cc#L31