Skip to content

middleware: Change method lookup warning log to debug

James Fargher requested to merge change_debug_method_lookup into master

This MR fell out of this discussion gitlab-development-kit#1704 (comment 1280197948)

Example:

{"error":"full method name not found: /grpc.health.v1.Health/Check","full_method_name":"/grpc.health.v1.Health/Check","level":"warning","msg":"error when looking up method info","time":"2023-02-15T17:25:03.631Z"}
{"correlation_id":"b929da3decd18709385b06745e5c6fdc","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-sidekiq","grpc.meta.deadline_type":"unknown","grpc.meta.method_type":"unary","grpc.method":"Check","grpc.request.deadline":"2023-02-15T10:25:13.001","grpc.request.fullMethod":"/grpc.health.v1.Health/Check","grpc.service":"grpc.health.v1.Health","grpc.start_time":"2023-02-15T10:25:03.631","grpc.time_ms":0.052,"level":"info","msg":"finished unary call with code OK","peer.address":"","pid":75366,"span.kind":"server","system":"grpc","time":"2023-02-15T17:25:03.631Z"}

The first line is this warning. The second line is the RPC succeeding despite the warning.

This log line is outputted when the given method cannot be found in praefects method registry. This registry has definitions and metadata for every method that praefect proxies for gitaly.

This error would only ever be significant to developers that are adding more RPCs to gitaly/praefect. Hence this log should actually be debug output, not warn. This warning only confuses end users who think that something has gone wrong.

Edited by James Fargher

Merge request reports