Skip to content

Commit

Permalink
README: Add more specification on the first message. (census-instrume…
Browse files Browse the repository at this point in the history
…ntation#55)

* README: Add more specification on the first message.

* Update wording.

* Fix typos
  • Loading branch information
songy23 committed Oct 2, 2018
1 parent 548f5d4 commit 8897b9f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ Allows open source binary projects (e.g. web servers like Caddy or Istio Mixer)
to adopt OpenCensus without having to link any exporters into their binary.
* Easier to scale the exporter development. Not every language has to
implement support for each backend.
* Custom daemons containing only the required exporters compiled in can be created.
* Custom daemons containing only the required exporters compiled in can be created.

## Future goals
* Providing cluster-wide collections and cluster-wide z-pages.
* Currently we provide no ways to push configuration changes such as the
default sampling rate. It might be a problem at troubleshooting time.
default sampling rate. It might be a problem at troubleshooting time.
We are planning to address this problem in the future.

## Usage
Expand Down Expand Up @@ -114,17 +114,20 @@ receiving configuration updates from Agent.

### Communication

Communication between Library and Agent should user a bi-directional gRPC stream. Library should
Communication between Library and Agent should use a bi-directional gRPC stream. Library should
initiate the connection, since there’s only one dedicated port for Agent, while there could be
multiple processes with Library running.
By default, Agent is available on port 55678.

### Protocol Workflow

1. Library will try to directly establish connections for Config and Export streams.
2. As the first message in each stream, Library must sent its identifier. Each identifier should
uniquely identify Library within the VM/container. Identifier is no longer needed once the streams
are established.
2. As the first message in each stream, Library must send its identifier. Each identifier should
uniquely identify Library within the VM/container. If there is no identifier in the first message,
Agent should drop the whole message and return an error to the client. In addition, the first
message MAY contain additional data (such as `Span`s). As long as it has a valid identifier
assoicated, Agent should handle the data properly, as if they were sent in a subsequent message.
Identifier is no longer needed once the streams are established.
3. If streams were disconnected and retries failed, the Library identifier would be considered
expired on Agent side. Library needs to start a new connection with a unique identifier
(MAY be different than the previous one).
Expand Down

0 comments on commit 8897b9f

Please sign in to comment.