34 Commits

Author SHA1 Message Date
Paul Bellamy
0379fc4cf3 generate an ID for each memoiser so they can share cache
Makes cache clearing easier, and then we don't need to add
`ResetCache()` to the Renderer interface.
2016-02-17 17:10:14 +00:00
Paul Bellamy
a0a60ca079 Remove pointer math (comparison) from render caching, as it is unreliable 2016-02-17 15:41:16 +00:00
Paul Bellamy
9bd818174c Removing dead EdgeMetadata rendering code 2015-12-07 15:34:01 +00:00
Tom Wilkie
a89c0b9b88 Make an empty StringSet nil. 2015-11-09 16:25:49 +00:00
Tom Wilkie
43d0ce986f Add 'latest' CRDT; use it to store container state.
Also use same technique to merge the controls, returning the latest
set of controls instead of the union.
2015-11-06 18:26:38 +00:00
Tom Wilkie
5c0555ae39 Report number of filtered nodes in topology stats.
Include filtered psuedo nodes in stats.
2015-09-29 08:51:38 +00:00
Tom Wilkie
50e20b1a34 When flattening edge metadata and propagating to the server end of the edge, reverse the direction of the metadata. 2015-09-24 05:28:40 +00:00
Tom Wilkie
9e72ef1a1f Remove pseudo nodes that are made unconnected by filtering. 2015-09-23 07:02:55 +00:00
Peter Bourgon
208abfa34a rm Sterilize, use Prune 2015-09-08 12:00:10 +02:00
Peter Bourgon
1dfc725706 Filter system containers from topologies; add API to control filters. 2015-09-07 14:24:15 +00:00
Tom Wilkie
57f7b4f2e6 Rename NodeMetadata -> Node 2015-09-03 16:18:54 +00:00
Tom Wilkie
9ba38d71cc Review feedback 2015-09-03 10:19:27 +00:00
Tom Wilkie
21675f3000 Remove LeafMap - have a generic function which converts a Topology to a RenderableNodes. 2015-09-02 15:03:57 +00:00
Tom Wilkie
144a798602 Review Feedback 2015-09-02 14:32:47 +00:00
Tom Wilkie
afc2788777 Move EdgeMetadata into the NodeMetadata struct. 2015-09-02 14:32:44 +00:00
Tom Wilkie
405c4c4cd7 Move sterilze to expect package; reuse in app. 2015-09-01 12:07:43 +00:00
Tom Wilkie
1f6b3d4a45 Move Adjacency info inside the NodeMetadata struct; move pseudo node generation to the probes. 2015-08-28 15:20:27 +00:00
Tom Wilkie
e4970f9214 Give mapping functions the ability to return multiple nodes. 2015-08-27 16:29:32 +00:00
Tom Wilkie
e7dc258119 Only group processes not in containers AND doing network IO into uncontained nodes. 2015-08-27 15:26:49 +00:00
Peter Bourgon
775f0ede90 render: fixes for new merge semantics 2015-08-26 12:02:11 +01:00
Peter Bourgon
e1f7752a34 Split PacketCount to Egress and Ingress
Also, 1 packet may be counted in N topologies, so you can't rely on the
sum of all packet counts across topologies having any relation to the
sampling data.
2015-08-03 14:58:41 +02:00
Peter Bourgon
0aadf6447b Revert to correct edge construction
Another implicit invariant in the data model is that edges are always of the
form (local -> remote). That is, the source of an edge must always be a node
that originates from within Scope's domain of visibility. This was evident by
the presence of ingress and egress fields in edge/aggregate metadata.

When building the sniffer, I accidentally and incorrectly violated this
invariant, by constructing distinct edges for (local -> remote) and (remote ->
local), and collapsing ingress and egress byte counts to a single scalar. I
experienced a variety of subtle undefined behavior as a result. See #339.

This change reverts to the old, correct methodology. Consequently the sniffer
needs to be able to find out which side of the sniffed packet is local v.
remote, and to do that it needs access to local networks. I moved the
discovery from the probe/host package into probe/main.go.

As part of that work I discovered that package report also maintains its own,
independent "cache" of local networks. Except it contains only the (optional)
Docker bridge network, if it's been populated by the probe, and it's only used
by the report.Make{Endpoint,Address}NodeID constructors to scope local
addresses. Normally, scoping happens during rendering, and only for pseudo
nodes -- see current LeafMap Render localNetworks. This is pretty convoluted
and should be either be made consistent or heavily commented.
2015-08-03 10:55:59 +02:00
Peter Bourgon
b9afa67ad6 gopacket-based traffic sniffing 2015-08-03 10:55:59 +02:00
Peter Bourgon
3dd59c8b9b Fixes to NodeMetadata
NewNodeMetadata -> MakeNodeMetadata. It doesn't return a pointer, so
Make is more idiomatic.

Invoke MakeNodeMetadata when necessary. The zero value for a
NodeMetadata is no longer valid.

Split MakeNodeMetadata to two constructors. MakeNodeMetadata when you
don't have anything to prepopulate; MakeNodeMetadataWith when you do.

Also, a fix to the tests in app. We unmarshal a RenderableNode struct,
which has a JSON-ignored NodeMetadata field. The zero value is invalid,
so we need to fix that before performing comparisons.
2015-07-30 17:20:44 +02:00
Tom Wilkie
f85195308c report.Metadata -> map[string]string 2015-07-16 12:06:05 +00:00
Tom Wilkie
c2065836e2 Make NodeMetadata a struct, move existing map[string]string to NodeMetadata.Metadata 2015-07-15 10:06:36 +00:00
Tom Wilkie
f971ac12bf Move AggregateMetadata into render package. 2015-06-17 19:26:13 +00:00
Tom Wilkie
18c544701a Review feedback 2015-06-17 17:23:33 +00:00
Tom Wilkie
546f336fef Add FilterUnconnected Renderer, wire up Process and ProcessName Renderers. 2015-06-17 17:23:21 +00:00
Tom Wilkie
16e2ccd2be Produce the container topology by way of the process topology. 2015-06-17 17:23:20 +00:00
Tom Wilkie
a759db8931 Rename Map -> LeafMap, introduce Map (with tests) 2015-06-17 17:23:19 +00:00
Tom Wilkie
2a4a33f30a Move RenderableNode and DetailedNode into render/ 2015-06-16 15:37:08 +00:00
Tom Wilkie
ae9ea5c97f Move mapping functions and main render function in render package. 2015-06-16 14:23:56 +00:00
Tom Wilkie
1e92e7dcbd Introduce renderers; allow them to recurse. 2015-06-16 10:54:30 +00:00