Include set of feature flags into the log entry for RPC invocation
Currently there is no way to distinct if an RPC was called with or without a particular feature flag: https://gitlab.slack.com/archives/C3ER3TQBT/p1603249862360200.
It would be useful to have them as part of the log entry as we log each RPC request with:
{
"tier": "stor",
"grpc.code": "OK",
"system": "grpc",
"grpc.request.glRepository": "project-11513622",
"grpc.request.repoPath": "@hashed/3d/48/3d48ae537e5da760e1ed9726202ad1111d187094306c0d63ae310044d4fb05a5.git",
"grpc.request.glProjectPath": "gearheart.io/smartsuite",
"type": "gitaly",
"environment": "gprd",
"msg": "finished unary call with code OK",
"grpc.method": "FindCommit",
"grpc.request.topLevelGroup": "@hashed",
"grpc.meta.deadline_type": "unknown",
"grpc.time_ms": 0.336,
"pid": 31986,
"grpc.start_time": "2020-10-30T10:49:59Z",
"stage": "main",
"grpc.request.fullMethod": "/gitaly.CommitService/FindCommit",
"time": "2020-10-30T10:49:59.728Z",
"span.kind": "server",
"level": "info",
"correlation_id": "rh3mUC942B",
"grpc.meta.auth_version": "v2",
"hostname": "file-32-stor-gprd",
"grpc.request.repoStorage": "nfs-file32",
"fqdn": "file-32-stor-gprd.c.gitlab-production.internal",
"shard": "default",
"grpc.service": "gitaly.CommitService",
"tag": "gitaly",
"grpc.request.deadline": "2020-10-30T10:50:29Z",
"peer.address": "10.222.60.6:42878",
"grpc.meta.client_name": "gitlab-sidekiq"
}
so adding something like: "feature_flags": "gitaly_go_some_feature:1,gitaly_go_another_feature:0" would be pretty useful to distinct the RPC based on the feature flags used.
/cc @zj-gitlab @wchandler