grpc: remove ptypes references (#3078)

This commit is contained in:
Caleb Doxsey 2022-02-24 08:37:59 -07:00 committed by GitHub
parent 35f697e491
commit 1342523cda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 83 additions and 177 deletions

View file

@ -4,7 +4,6 @@ import (
"strings"
envoy_service_accesslog_v3 "github.com/envoyproxy/go-control-plane/envoy/service/accesslog/v3"
"github.com/golang/protobuf/ptypes"
"github.com/rs/zerolog"
"github.com/pomerium/pomerium/internal/log"
@ -43,7 +42,7 @@ func (srv *Server) StreamAccessLogs(stream envoy_service_accesslog_v3.AccessLogS
evt = evt.Str("forwarded-for", entry.GetRequest().GetForwardedFor())
evt = evt.Str("request-id", entry.GetRequest().GetRequestId())
// response properties
dur, _ := ptypes.Duration(entry.CommonProperties.TimeToLastDownstreamTxByte)
dur := entry.CommonProperties.TimeToLastDownstreamTxByte.AsDuration()
evt = evt.Dur("duration", dur)
evt = evt.Uint64("size", entry.Response.ResponseBodyBytes)
evt = evt.Uint32("response-code", entry.GetResponse().GetResponseCode().GetValue())