In previous PR https://github.com/aws/aws-network-policy-agent/pull/168, we addressed failed to get caller in the metrics server. But the error still exists because rpc handler has same issue.
For our use case, we don't need to use zap.AddCallerSkip. If we remove zap.AddCallerSkip, the message is disappeared and the log includes caller.
Issue #, if available:
103
Description of changes:
The message
Logger.check error: failed to get caller
is generated by zap when call stack is empty after filtering callerSkip https://github.com/uber-go/zap/blob/v1.27.0/logger.go#L382-L388In previous PR https://github.com/aws/aws-network-policy-agent/pull/168, we addressed
failed to get caller
in the metrics server. But the error still exists because rpc handler has same issue. For our use case, we don't need to usezap.AddCallerSkip
. If we removezap.AddCallerSkip
, the message is disappeared and the log includescaller
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.