Skip to content

Latest commit

 

History

History
108 lines (71 loc) · 4.04 KB

topologies.md

File metadata and controls

108 lines (71 loc) · 4.04 KB

Topologies

Trace4cats components can be arranged in a number of differing ways. Either in point-to-point configurations using UDP and TCP connections, or message based configurations using Kafka.

Point to Point

As mentioned above, point-to-point topologies rely on UDP and TCP connections and load balancers.

Simple

In a simple configuration the Trace4Cats library can export directly to a tracing system. Please note that this may inhibit your ability in using Graal native-image to compile your code.

simple

Multi Export

As mentioned in the readme, SpanExporters and SpanCompleters may be combined using its monoid instance. See the AllCompleters example for details.

multi-export

Agent

The Trace4Cats agent is designed to be co-located with the traced application, either on the same machine or as a Kubernetes sidecar. The agent can only forward via TCP to a collector.

agent

Collector Only

The Trace4Cats library can be configured to send directly to the collector via TCP or UDP. While not shown on the diagram, you can deploy multiple instances of the collector behind a load balancer (like in a Kubernetes deployment and service).

collector-only

Collector Forwarding

The collector can be configured forward on to other collectors. This may be useful if you have multi-region setup where the collector within a region may perform sampling before forwarding to an aggregating collector.

collector-forward

Kafka

When using Trace4Cats with Kafka, you can do a few more interesting things than with point-to-point connections. The Kafka exporter guarantees that all spans for a single trace will end up on the same topic partition, making collector load balancing and sample decisions easier.

Simple

In a simple configuration, the Trace4Cats library can export directly to Kafka.

simple-kafka

Agent

Similar to above, agent-kafka can be used as a sidecar to send spans directly to Kafka, without having to use the Kafka client within your app.

agent-kafka

Collector Only

The Trace4Cats library can be configured to send spans directly to Kafka, note this does mean that ad dependency on the Kafka client will be introduced to your app.

collector-only-kafka

Collector Forwarding

Collectors within different regions may forward to a multi-region Kafka topic, where all spans are then forwarded to a trace system by another collector, or group of collectors using the same consumer group.

collector-forward-kafka

Multi Collector

Another potential Kafka based topology is where multiple collectors all consume from the same topic with different consumer groups. Each collector could forward to a different trace system, and may have different sampling and filtering configuration.

multi-collector-kafka