Commit Graph

16 Commits

Author SHA1 Message Date
Chris K 03e76b3d2a
grpc: add ability to compile with or without tracing (#6954)
golang.org/x/net/trace is the only dependency of gRPC Go that depends --
through html/template and text/template -- on reflect's MethodByName.
Binaries with MethodByName are not eligible for Go dead code
elimination.

As of protobuf v1.32.0 combined with Go 1.22, Go protobufs support
compilation with dead code elimination. This commit allows users of gRPC
Go to also make use of dead code elimination for smaller binary sizes.

Signed-off-by: Chris Koch <chrisko@google.com>
2024-02-02 13:49:23 -08:00
Doug Fawley fbff2abb0f
*: update `interface{}` to `any` and `go.mod` version to `go 1.19` (#6544) 2023-08-14 09:04:46 -07:00
Ning Xie f42dee19bb trace: fix getting family for the method (#3216) 2019-12-19 13:23:11 -08:00
David Symonds 9a2caafd93 client: restore remote address in traces (#2718)
The client-side traces were otherwise only showing `RPC: to <nil>`,
which is not helpful.

Also clean up construction of traceInfo and firstLine in a few places.
2019-03-27 09:52:40 -07:00
Menghan Li 3214f767e5 Truncate payload trace string, and turn trace off by default (#1509) 2017-09-08 11:13:41 -07:00
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
Menghan Li fc590f40e9 Fix golint errors 2016-06-01 16:40:26 -07:00
iamqizhao bc49d12737 refactor servier side trace again 2015-10-05 17:49:53 -07:00
iamqizhao b4aa9eae10 fix methodFamily breakage 2015-10-02 15:38:37 -07:00
Sameer Ajmani ee98c48bb4 Incorporate dsymonds' comments.
Fix another bug: cancel the Context provided to an RPC server handler
as soon as that handler returns, so that goroutines started by that
handler can detect that the handler is done and exit. Without this
fix, goroutines started by a handler will keep running, unless the
handler itself arranges to cancel the context.
2015-09-23 22:17:37 -04:00
yangzhouhan e79ac3cb4b remove duplicate nil check separate var 2015-07-24 16:36:12 -07:00
yangzhouhan 6cfd2022af add a bool in payload struct 2015-07-24 11:30:14 -07:00
yangzhouhan 58dcee7526 add tracing for streaming rpc 2015-06-17 19:30:57 -07:00
yangzhouhan 4782e693c2 Revert "add tracing for streaming rpc"
This reverts commit 8071e421ab.
2015-06-17 19:21:04 -07:00
yangzhouhan 8071e421ab add tracing for streaming rpc 2015-06-17 19:04:54 -07:00
David Symonds c2bdf96033 Add gRPC client-side integration with golang.org/x/net/trace.
This will make client (outgoing) traces appear on /debug/requests.
There's some information lacking, but it's enough for now.
2015-06-09 06:57:52 -07:00