openzipkin / zipkin-gcp

Reporters and collectors for use in Google Cloud Platform
https://cloud.google.com/trace/docs/zipkin
Apache License 2.0
91 stars 54 forks source link

Adds STACKDRIVER_HTTP_LOGGING=headers to see grpc status #134

Closed codefromthecrypt closed 5 years ago

codefromthecrypt commented 5 years ago

This makes it easier to see grpc errors as they are in the trailers sometimes.

Use STACKDRIVER_HTTP_LOGGING=headers to see grpc status. Note this doesn't include body as it is complicated and also it is binary. You can still see grpc errors looking only at the headers.

Ex. Requested entity was not found. when you misconfigure the application name

2019-08-16 10:45:29.036  INFO 47885 --- [-worker-nio-2-4] c.l.a.c.l.LoggingClient                  : Request: {startTime=2019-08-16T02:45:29.023Z(1565923529023099), length=399B, duration=10424µs(10424447ns), scheme=none+h2, headers=[:method=POST, :path=/google.devtools.cloudtrace.v2.TraceService/BatchWriteSpans, :authority=cloudtrace.googleapis.com, :scheme=https, te=trailers, content-length=399, authorization=Bearer REDACTED, content-type=application/grpc, user-agent=armeria/0.90.0]}
2019-08-16 10:45:30.502  INFO 47885 --- [-worker-nio-2-4] c.l.a.c.l.LoggingClient                  : Response: {startTime=2019-08-16T02:45:30.498Z(1565923530498628), length=0B, duration=3806µs(3806088ns), headers=[:status=200, content-type=application/grpc, date=Fri, 16 Aug 2019 02:45:12 GMT, alt-svc=quic=":443"; ma=2592000; v="46,43,39"], trailers=[EOS, grpc-status=5, grpc-message=Requested entity was not found., google.rpc.resourceinfo-bin=EhNwcm9qZWN0cy96aXBraW4tZGV2, grpc-status-details-bin=CAUSH1JlcXVlc3RlZCBlbnRpdHkgd2FzIG5vdCBmb3VuZC4aRAordHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUucnBjLlJlc291cmNlSW5mbxIVEhNwcm9qZWN0cy96aXBraW4tZGV2]}

See #133

codefromthecrypt commented 5 years ago

I'm gonna cut and release this mostly just to help @aviau troubleshoot, especially as he's in opposite timezone and ping-pong hasn't been working