Increasing the transparency of work auditing in Gitlab

/var/log/gitlab/gitlab-workhorse/current:{"content_type":"text/html; charset=utf-8","correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","duration_ms":854,"host":"192.168.138.10","level":"info","method":"POST","msg":"access","proto":"HTTP/1.1","referrer":"https://192.168.138.10/test/my-test/-/edit/main/date.text","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","route":"","status":302,"system":"http","time":"2023-05-16T12:54:38+03:00","ttfb_ms":854,"uri":"/test/my-test/-/update/main/date.text","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0","written_bytes":127}
/var/log/gitlab/gitlab-rails/production_json.log:{"method":"PUT","path":"/test/my-test/-/update/main/date.text","format":"html","controller":"Projects::BlobController","action":"update","status":302,"location":"https://192.168.138.10/test/my-test/-/blob/main/date.text","time":"2023-05-16T09:54:38.229Z","params":[{"key":"_method","value":"put"},{"key":"authenticity_token","value":"[FILTERED]"},{"key":"file_path","value":"date.text"},{"key":"commit_message","value":"Update date.text"},{"key":"branch_name","value":"main"},{"key":"original_branch","value":"main"},{"key":"last_commit_sha","value":"d9bf7a90a552922b393be5968989b0769245108f"},{"key":"content","value":"[FILTERED]"},{"key":"from_merge_request_iid","value":""},{"key":"namespace_id","value":"test"},{"key":"project_id","value":"my-test"},{"key":"id","value":"main/date.text"}],"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","meta.caller_id":"Projects::BlobController#update","meta.remote_ip":"192.168.23.128","meta.feature_category":"source_code_management","meta.user":"v.pupkin","meta.user_id":18,"meta.project":"test/my-test","meta.root_namespace":"test","meta.client_id":"user/18","meta.subscription_plan":"default","remote_ip":"192.168.23.128","user_id":18,"username":"v.pupkin","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0","queue_duration_s":0.011339,"request_urgency":"low","target_duration_s":5,"gitaly_calls":6,"gitaly_duration_s":0.760967,"redis_calls":20,"redis_allowed_cross_slot_calls":1,"redis_duration_s":0.003534,"redis_read_bytes":2143,"redis_write_bytes":2001,"redis_cache_calls":9,"redis_cache_duration_s":0.001519,"redis_cache_read_bytes":1625,"redis_cache_write_bytes":563,"redis_repository_cache_calls":7,"redis_repository_cache_duration_s":0.00077,"redis_repository_cache_read_bytes":337,"redis_repository_cache_write_bytes":290,"redis_sessions_calls":3,"redis_sessions_allowed_cross_slot_calls":1,"redis_sessions_duration_s":0.001098,"redis_sessions_read_bytes":181,"redis_sessions_write_bytes":1094,"redis_shared_state_calls":1,"redis_shared_state_duration_s":0.000147,"redis_shared_state_write_bytes":54,"db_count":24,"db_write_count":0,"db_cached_count":4,"db_replica_count":0,"db_primary_count":24,"db_main_count":24,"db_main_replica_count":0,"db_replica_cached_count":0,"db_primary_cached_count":4,"db_main_cached_count":4,"db_main_replica_cached_count":0,"db_replica_wal_count":0,"db_primary_wal_count":0,"db_main_wal_count":0,"db_main_replica_wal_count":0,"db_replica_wal_cached_count":0,"db_primary_wal_cached_count":0,"db_main_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.013,"db_main_duration_s":0.013,"db_main_replica_duration_s":0.0,"cpu_s":0.084794,"mem_objects":36833,"mem_bytes":4723032,"mem_mallocs":10611,"mem_total_bytes":6196352,"pid":357535,"worker_id":"puma_2","rate_limiting_gates":[],"db_duration_s":0.00923,"view_duration_s":0.0,"duration_s":0.8232}
/var/log/gitlab/gitaly/current:{"catfile.duration_ms":0,"catfile.flush_count":1,"catfile.flush_ms":0,"catfile.read_object_count":1,"catfile.read_object_ms":0,"catfile.request_object_count":1,"catfile.request_object_ms":0,"command.count":1,"command.cpu_time_ms":1,"command.inblock":0,"command.majflt":0,"command.maxrss":363712,"command.minflt":156,"command.oublock":0,"command.real_time_ms":1,"command.spawn_token_wait_ms":0,"command.system_time_ms":1,"command.user_time_ms":0,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"FindCommit","grpc.request.deadline":"2023-05-16T12:55:07.036","grpc.request.fullMethod":"/gitaly.CommitService/FindCommit","grpc.request.glProjectPath":"test/my-test","grpc.request.glRepository":"project-347","grpc.request.payload_bytes":133,"grpc.request.repoPath":"@hashed/22/89/2289b221b39605c3494e7290856218e931c00af556cf7a07827108193b276511.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":384,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-05-16T12:54:37.436","grpc.time_ms":2.52,"level":"info","limit.concurrency_queue_ms":0,"msg":"finished unary call with code OK","peer.address":"@","pid":1137,"remote_ip":"192.168.23.128","span.kind":"server","system":"grpc","time":"2023-05-16T09:54:37.439Z","user_id":"18","username":"v.pupkin"}
/var/log/gitlab/gitaly/current:{"catfile.duration_ms":0,"catfile.flush_count":4,"catfile.flush_ms":0,"catfile.read_info_count":2,"catfile.read_info_ms":0,"catfile.read_object_count":2,"catfile.read_object_ms":0,"catfile.request_info_count":2,"catfile.request_info_ms":0,"catfile.request_object_count":2,"catfile.request_object_ms":0,"command.count":1,"command.cpu_time_ms":0,"command.inblock":0,"command.majflt":0,"command.maxrss":363712,"command.minflt":155,"command.oublock":0,"command.real_time_ms":1,"command.spawn_token_wait_ms":0,"command.system_time_ms":0,"command.user_time_ms":0,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"server_stream","grpc.method":"TreeEntry","grpc.request.deadline":"2023-05-16T12:55:07.040","grpc.request.fullMethod":"/gitaly.CommitService/TreeEntry","grpc.request.glProjectPath":"test/my-test","grpc.request.glRepository":"project-347","grpc.request.payload_bytes":185,"grpc.request.repoPath":"@hashed/22/89/2289b221b39605c3494e7290856218e931c00af556cf7a07827108193b276511.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":2374,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-05-16T12:54:37.440","grpc.time_ms":2.257,"level":"info","limit.concurrency_queue_ms":0,"msg":"finished streaming call with code OK","peer.address":"@","pid":1137,"remote_ip":"192.168.23.128","span.kind":"server","system":"grpc","time":"2023-05-16T09:54:37.442Z","user_id":"18","username":"v.pupkin"}
/var/log/gitlab/gitaly/current:{"catfile.duration_ms":0,"catfile.flush_count":1,"catfile.flush_ms":0,"catfile.read_object_count":1,"catfile.read_object_ms":0,"catfile.request_object_count":1,"catfile.request_object_ms":0,"command.count":1,"command.cpu_time_ms":0,"command.inblock":0,"command.majflt":0,"command.maxrss":363712,"command.minflt":152,"command.oublock":0,"command.real_time_ms":1,"command.spawn_token_wait_ms":0,"command.system_time_ms":0,"command.user_time_ms":0,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"server_stream","grpc.method":"FindCommits","grpc.request.deadline":"2023-05-16T12:55:07.044","grpc.request.fullMethod":"/gitaly.CommitService/FindCommits","grpc.request.glProjectPath":"test/my-test","grpc.request.glRepository":"project-347","grpc.request.payload_bytes":152,"grpc.request.repoPath":"@hashed/22/89/2289b221b39605c3494e7290856218e931c00af556cf7a07827108193b276511.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":384,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-05-16T12:54:37.444","grpc.time_ms":3.245,"level":"info","limit.concurrency_queue_ms":0,"msg":"finished streaming call with code OK","peer.address":"@","pid":1137,"remote_ip":"192.168.23.128","span.kind":"server","system":"grpc","time":"2023-05-16T09:54:37.448Z","user_id":"18","username":"v.pupkin"}
/var/log/gitlab/gitaly/current:{"catfile.duration_ms":0,"catfile.flush_count":1,"catfile.flush_ms":0,"catfile.read_object_count":1,"catfile.read_object_ms":0,"catfile.request_object_count":1,"catfile.request_object_ms":0,"command.spawn_token_wait_ms":0,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"server_stream","grpc.method":"FindCommits","grpc.request.deadline":"2023-05-16T12:55:07.069","grpc.request.fullMethod":"/gitaly.CommitService/FindCommits","grpc.request.glProjectPath":"test/my-test","grpc.request.glRepository":"project-347","grpc.request.payload_bytes":152,"grpc.request.repoPath":"@hashed/22/89/2289b221b39605c3494e7290856218e931c00af556cf7a07827108193b276511.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":384,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-05-16T12:54:37.469","grpc.time_ms":1.674,"level":"info","limit.concurrency_queue_ms":0,"msg":"finished streaming call with code OK","peer.address":"@","pid":1137,"remote_ip":"192.168.23.128","span.kind":"server","system":"grpc","time":"2023-05-16T09:54:37.471Z","user_id":"18","username":"v.pupkin"}
/var/log/gitlab/gitaly/current:{"catfile.duration_ms":0,"catfile.flush_count":1,"catfile.flush_ms":0,"catfile.read_object_count":1,"catfile.read_object_ms":0,"catfile.request_object_count":1,"catfile.request_object_ms":0,"command.spawn_token_wait_ms":0,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"server_stream","grpc.method":"FindCommits","grpc.request.deadline":"2023-05-16T12:55:07.072","grpc.request.fullMethod":"/gitaly.CommitService/FindCommits","grpc.request.glProjectPath":"test/my-test","grpc.request.glRepository":"project-347","grpc.request.payload_bytes":188,"grpc.request.repoPath":"@hashed/22/89/2289b221b39605c3494e7290856218e931c00af556cf7a07827108193b276511.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":384,"grpc.service":"gitaly.CommitService","grpc.start_time":"2023-05-16T12:54:37.472","grpc.time_ms":1.538,"level":"info","limit.concurrency_queue_ms":0,"msg":"finished streaming call with code OK","peer.address":"@","pid":1137,"remote_ip":"192.168.23.128","span.kind":"server","system":"grpc","time":"2023-05-16T09:54:37.474Z","user_id":"18","username":"v.pupkin"}
/var/log/gitlab/gitaly/current:{"command.name":"gitaly-git2go","command.subcommand":"commit","correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","disabled_feature_flags":null,"enabled_feature_flags":null,"level":"info","msg":"starting commit command","pid":371582,"time":"2023-05-16T09:54:37.489Z"}
/var/log/gitlab/gitaly/current:{"command.name":"gitaly-git2go","command.subcommand":"commit","correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","disabled_feature_flags":null,"enabled_feature_flags":null,"level":"info","msg":"commit command finished","pid":371582,"time":"2023-05-16T09:54:37.493Z"}
/var/log/gitlab/gitaly/current:{"content_length_bytes":679,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","duration_ms":80,"level":"info","method":"POST","msg":"Finished HTTP request","status":200,"time":"2023-05-16T09:54:37.578Z","url":"http://unix/api/v4/internal/allowed"}
/var/log/gitlab/gitaly/current:{"content_length_bytes":36,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","duration_ms":17,"level":"info","method":"POST","msg":"Finished HTTP request","status":200,"time":"2023-05-16T09:54:37.736Z","url":"http://unix/api/v4/internal/pre_receive"}
/var/log/gitlab/gitaly/current:{"content_length_bytes":50,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","duration_ms":33,"level":"info","method":"POST","msg":"Finished HTTP request","status":200,"time":"2023-05-16T09:54:38.188Z","url":"http://unix/api/v4/internal/post_receive"}
/var/log/gitlab/gitaly/current:{"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","diskcache":"7ae890e5-dc93-4db4-bed3-e4aa224899c1","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"client_stream","grpc.method":"UserCommitFiles","grpc.request.deadline":"2023-05-16T12:55:32.075","grpc.request.fullMethod":"/gitaly.OperationService/UserCommitFiles","grpc.service":"gitaly.OperationService","grpc.start_time":"2023-05-16T12:54:37.475","level":"info","msg":"diskcache state change","peer.address":"@","pid":1137,"remote_ip":"192.168.23.128","span.kind":"server","system":"grpc","time":"2023-05-16T09:54:38.217Z","user_id":"18","username":"v.pupkin"}
/var/log/gitlab/gitaly/current:{"command.count":12,"command.cpu_time_ms":602,"command.inblock":0,"command.majflt":0,"command.maxrss":363712,"command.minflt":19408,"command.oublock":248,"command.real_time_ms":660,"command.spawn_token_wait_ms":0,"command.system_time_ms":360,"command.user_time_ms":242,"correlation_id":"01H0HZQC62ED3N4ZX6SK7R31KM","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"client_stream","grpc.method":"UserCommitFiles","grpc.request.deadline":"2023-05-16T12:55:32.075","grpc.request.fullMethod":"/gitaly.OperationService/UserCommitFiles","grpc.request.payload_bytes":2958,"grpc.response.payload_bytes":44,"grpc.service":"gitaly.OperationService","grpc.start_time":"2023-05-16T12:54:37.475","grpc.time_ms":741.281,"level":"info","limit.concurrency_queue_ms":0,"msg":"finished streaming call with code OK","peer.address":"@","pid":1137,"remote_ip":"192.168.23.128","span.kind":"server","system":"grpc","time":"2023-05-16T09:54:38.217Z","user_id":"18","username":"v.pupkin"}

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *