Closed jack-berg closed 1 year ago
As a starting point, I would suggest we use option #2. More nesting makes it a little bit more clunky to use, but i also think it removes some ambiguity as to what should and shouldn't be nested. This should allow us to move forward without getting hung up on implementation details for the initial version of this work.
We can always re-iterate in future versions.
Let's try to get consensus on a small piece of the initial target configuration conversation by talking about whether configuration should lean towards being more nested or flat.
Option 1: Everything in root Put everything in root and use prefixes to keys to disambiguate where similar concepts exist (i.e. both traces and logs have processors so call them
span_processors
andlog_record_processors
. Results in flatter configuration that is less organized because configuration for a signal isn't necessarily grouped together (i.e. I can configure span processors, then metric views, then span limits). Not clear where configuration of SDK starts / stops versus instrumentation.Example:
Option 2: Nest everything
The opposite of option 1. Nest everything under respective sections. Results in more nesting but clear organization and boundaries (i.e. all trace configuration will always be grouped together, all metric configuration will be grouped together, etc).
Example:
Option 3: Something in between
Separate SDK configuration from instrumentation, but minimize nesting within those sections. Try to strike a balance between organizing related concepts without excessive nesting.
Example: