Commit Graph

32 Commits

Author SHA1 Message Date
Menghan Li 3bf110cd0c fix TestServerCredsDispatch and stats test race (#1554) 2017-10-03 17:07:39 -07:00
mmukhi 6014154b60 Use the same hpack encoder on a transport and share it between RPCs. (#1536) 2017-09-28 13:37:13 -07:00
dfawley 69abda08b5 stats: add methods to allow setting grpc-trace-bin and grpc-tags-bin headers (#1404)
This is in preparation for preventing any user-supplied metadata starting with "grpc-", which is reserved.

* stats: add methods to allow setting grpc-trace-bin and grpc-tags-bin headers

Pick these up in grpc's transport when sending and fill them when receiving.

* Add tags/trace to metadata and tests for that behavior

This is temporary to maintain compatibility and provide a migration strategy.
2017-08-24 10:00:40 -07:00
dfawley 596a6acc87 metadata: Remove NewContext and FromContext for gRFC L7 (#1392) 2017-08-17 13:10:28 -07:00
Menghan Li 834dbd54e0 replace 127.0.0.1 with localhost for ipv6 only environment (#1306) 2017-06-14 15:03:04 -07:00
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
Charith Ellawala a0c3e72252 Add stats test for client streaming and server streaming RPCs (#1140) 2017-05-11 11:58:13 -07:00
Menghan Li 17760cfd5b Calling handleRPC with context derived from the original (#1227)
* Calling handleRPC with different context derived from the original context
* change comment for tagRPC and stats fields
2017-05-10 17:54:49 -07:00
Menghan Li cd8432ec07 Move handling stats.End to clientStream.finish() (#1182)
* move handling stats.End to clientStream.finish()
* add stats test for streaming RPC not calling last recv()
2017-04-12 11:55:54 -07:00
dfawley 0c1d39df28 Separate incoming and outgoing metadata in context
This will prevent the incoming RPCs' metadata from appearing in outgoing RPCs
unless it is explicitly copied, e.g.:

incomingMD, ok := metadata.FromContext(ctx)
if ok {
  ctx = metadata.NewContext(ctx, incomingMD)
}

Fixes #1148
2017-04-07 11:54:56 -07:00
Menghan Li cb653e4b61 Change stats APIs (#1030)
Change stats API from one static handler to one handler per server or client.
2017-01-09 17:11:32 -08:00
Menghan Li 7484960149 remove stats.Stop() and fix flaky stats test (#1016) 2016-12-07 17:33:01 -08:00
Menghan Li deb01f422a add stats tagger APIs and connection stats. (#992)
* add stats.tagger APIs and connection stats.

* fix comments

use ac.ctx in http2client
change name and comments
small fixes stats_tests

* add a TODO to ConnTagInfo

* rename handle to handleRPC

* modify stats comments
2016-11-30 16:25:46 -08:00
Menghan Li 524f421370 fix flaky stats test and reuse functions in stats test 2016-11-10 17:42:52 -08:00
Menghan Li 88bdb9565f fixes in test 2016-11-09 14:04:51 -08:00
Menghan Li 6445dedfbc fix wrong context when handling stats 2016-11-08 18:17:14 -08:00
Menghan Li 183e5e98ab fix comments in stats testing 2016-11-08 16:48:49 -08:00
Menghan Li 5938492b60 fix comments 2016-11-07 15:16:52 -08:00
Menghan Li 1d2a929ae5 add stats.Begin and stats.End 2016-11-07 15:16:52 -08:00
Menghan Li 8a126b020f change stats comments 2016-11-07 15:16:52 -08:00
Menghan Li c0087b3c91 add failfast option to stats 2016-11-07 15:16:52 -08:00
Menghan Li 0d345b58c0 change package stats comment 2016-11-07 15:16:52 -08:00
Menghan Li be66502802 change behavior of stats register handler and start stop 2016-11-07 15:16:52 -08:00
Menghan Li c698588285 Renaming types and variables 2016-11-07 15:16:52 -08:00
Menghan Li e42a66c81b add client stats 2016-11-07 15:16:52 -08:00
Menghan Li adaae03378 remove initStats, merge into headerStats 2016-11-07 15:16:52 -08:00
Menghan Li aa914665f0 add isclient to errorstats 2016-11-07 15:16:52 -08:00
Menghan Li 1054f1c42b add payload with original type to payload stats 2016-11-07 15:16:52 -08:00
Menghan Li 85c5e0e3b6 add errorStats 2016-11-07 15:16:52 -08:00
Menghan Li 7984a9c679 change CallBack to handler, and move ctx out of Stats. 2016-11-07 15:16:52 -08:00
Menghan Li 46e80bf1f6 fix race in test and add import comments 2016-11-07 15:16:52 -08:00
Menghan Li 17ee5a3637 Add package stats, and export stats on server side. 2016-11-07 15:16:52 -08:00