Age | Commit message (Collapse) | Author |
|
|
|
This class really is an internal helper class for the implementation.
|
|
|
|
|
|
This class is not stable API.
|
|
|
|
|
|
|
|
BinaryLog.java is the class that is responsible for intercepting
client and server calls. It now requires a CallId to be passed
in. The BinaryLogProviderImpl is responsible for generating a
CallId and passing it in.
|
|
- final classes should have toString()
- fix arg name mismatch
|
|
|
|
Pull the TLS info from the SSLSession object for TLS, and AltsContext for ALTS.
|
|
|
|
The code that uses this will create an instance.
|
|
Then channelz GUI will take this into account. This is particularly
useful for InProcessTransport, where I have decided we do not need
special support for in channelz. The server and channel stats are
already sufficient.
|
|
This fixes listen sockets. It is ok to have no data but report socket
options.
|
|
Right now this is inaccessible to services.
|
|
NettySocketSupport is responsible for making the low level calls to
get and populate the TcpInfo structure.
|
|
Fix linter complaint because comment does not match arg name.
|
|
The peer socket is read from TRANSPORT_ATTR_REMOTE_ADDR from the
stream attributes. We only log the peer on receive initial metadata.
The call id assumes census is available. The call ID read from the
context via SERVER_CALL_ID_CONTEXT_KEY on server side, and read from
CallOptions via CLIENT_CALL_ID_CALLOPTION_KEY on client side. The
value is copied from CONTEXT_SPAN_KEY which is set by census.
Pass around CallId with two longs, not a byte[].
|
|
Server listen sockets differ from normal sockets in that they do not
have a remote address, do not have stats on calls started/failed/etc,
and do not have security info.
|
|
For okhttp, expose the standard options from the Socket object.
For netty, expose all the `io.netty.channel.ChannelOption`s of the
`channel.config()`.
|
|
|
|
This update automatically adds generated sources and proto IDLs to the
`idea` plugin.
|
|
This fixes a serial warning that breaks the build when building
_without_ ErrorProne. I have no clue why _disabling_ ErrorProne makes
the warning pop up, but whatever, the warning is legit.
I also gave it a name, since the anonymous $1 seems weird if we're
providing a serialVersionUID. Not to say we're actually supporting
serializing this object. But if we ever see a serialized form show up in
the future, having a more clear name would make it obvious what it is.
|
|
Fixes #4176
|
|
- To make unit tests easier, added the BinaryLogSinkWriter abstract
class, which allows verifying high level arguments rather than low
level protobufs.
- remove InputStream based marshaller (IDENTITY_MARSHALLER) in favor
of byte[] because retries will need to call serialize multiple
times. This is achieved with a special InputStream that lets us
access the internal byte[] without copying.
- Change ByteBuffer based internal methods to use byte[]
- Update unit tests to reflect the above
|
|
Rather than querying the ServerImpl for its sockets, we register them
into channelz as with all the other entities, for consistency.
Error conditions are checked with `assert` statements, so we throw in
tests.
|
|
For context:
https://github.com/grpc/proposal/pull/71
|
|
|
|
Fix NPE and refactor tests to make it more obvious whether tests
assume empty or non empty metadata.
Add null checks to applicable places in binary log.
|
|
This implements the methods to expose the stats as a gRPC
service. GetServerSockets is still unimplemented and will require a
follow up change.
|
|
This is more consistent with the other fields.
|
|
This adds the proto and generated output.
These options are used:
option java_multiple_files = true;
option java_package = "io.grpc.channelz.v1";
option java_outer_classname = "ChannelzProto";
|
|
A band aid for #3284, to make its symptoms less noticeable.
|
|
- The unsafe operation was reverted in code, so the test should not
use it either
- The variable naming is tripping internal linters
|
|
- This class should not be a part of the public API
- Update ServiceProvidersTest to verify package private services can be
loaded with the utility.
|
|
The `BinaryLog` will write `GrpcLogEntry`s to the sink, which is
intended as a pluggable interface. It is the sink's
responsibility to send the binlog protos to disk, to a remote
logging service, etc.
|
|
|
|
|
|
The fixes could have subtle side-effects, but I did take care when making them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This moves away from the global String-based Span name registry which
is not as flexible as we desire.
Also renamed the option name to be more accurate. This is not
API-breaking because the origianl addition to MethodDescriptor and
code-gen didn't make it into the 1.7.0 release.
|
|
|