Conversation
| //! Unlike the random-string-based generator in [`super::trace`], this generator lets users define a | ||
| //! distributed system topology — services, their operations, and the call graph between them — and | ||
| //! produces traces that walk that topology. All string data comes from the user configuration or | ||
| //! built-in dictionaries, producing output that resembles real distributed system traffic. |
There was a problem hiding this comment.
I'm really liking where this is going. I'd even be interested in swapping this for the other implementation.
There was a problem hiding this comment.
🙇🏻
Yeah, it's working well so far. It's still a little verbose for my taste, and I want to explore how we might shrink down how we define the operations/links.
8522550 to
8bd1c7f
Compare
|
Very cool! Looking forward to seeing this generator in action. |
blt
left a comment
There was a problem hiding this comment.
This is cool. Very different from what we had previously, like you point out, but I find this approach compelling. I have some netflow work coming up soon and I'll build on this notion.
| // --------------------------------------------------------------------------- | ||
| // Validation | ||
| // --------------------------------------------------------------------------- |
There was a problem hiding this comment.
We don't have a convention for this yet but I could buy a opentelemetry::trace::validation module, just to keep things tidy.
bcdf20a to
0b75207
Compare
What does this PR do?
This PR introduces a new service topology-based OpenTelemetry Traces generator, aimed at generating more realistic workload outputs.
Motivation
The current OpenTelemetry Traces generator resembles many of the existing payload generators in
lading: specification-driven and fuzzer-esque. This is perfectly acceptable for some payload formats, but OpenTelemetry traces, and traces in general, aren't well served by this model. Principally, while we can (and do) generate valid traces/spans with the current generator, the traces it generates are not particularly useful for benchmarking. Given their fuzzer-esque qualities, they aren't suitable for exercising certain behaviors or codepaths in trace receivers, such as evaluating optimizations for handling repetitive attributes, or exercising rare code paths by controlling the frequency of emission of those rare traces/spans.This PR introduces a new OpenTelemetry Traces generator that's geared towards generating traces/spans based on a user-defined "service topology." Traces are ultimately designed for representing spans within a distributed systems, so why shouldn't we also define our trace/span generation in terms of what the hypothetical distributed system that we're simulating looks like?
Our new generator requires users to specify the catalog of services that traces/spans will be generated for, the operations those services expose, and the suboperations (calls to other service operations) that each operation will make. Services can be one of three fixed types: HTTP, gRPC, or database. This allows us to provide reasonable, out-of-the-box shortcuts for quickly scaffolding a service definition, and also lets us provide out-of-the-box resource attributes that map to the correct OpenTelemetry Semantic Conventions for the given service. Services, and operations defined for those services, can be extended to add additional resource attributes. Attributes defined at any level are able to succinctly describe their value using either fixed values, randomly-generated values, or randomly-selected values from a set pre-defined dictionaries: cloud regions, environments, HTTP methods/status codes, and gRPC status codes. Again, the goal is to make scaffolding these service definitions quick and easy, with a structure that is self-describing.
Below is an example configuration with a three-tiered system, demonstrating how services are defined, linked together, as well as things like randomly-generated and pre-defined dictionary values, and also randomized suboperation selection:
Related issues
Additional Notes