Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide what configuration lives in "root" of schema #10

Closed
jack-berg opened this issue Nov 18, 2022 · 1 comment
Closed

Decide what configuration lives in "root" of schema #10

jack-berg opened this issue Nov 18, 2022 · 1 comment

Comments

@jack-berg
Copy link
Collaborator

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 and log_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:

resource: ...
limits: ...
propagators: ...
logging:
  level: info
exporters: # Array of named exporters to be referenced in processors / readers
  - ...
  - ...
span_processors:
  - ...
  - ...
span_limits: ...
metric_readers:
 - ...
 - ...
metric_views:
  - ...
  - ...
log_record_processors:
  - ...
  - ...
log_limits: ...
http_client_request_headers: ...
http_client_response_headers: ...
...

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:

sdk:
  resource: ...
  logging:
    level: info
  limits: ...
  exporters: # Array of named exporters to be referenced in processors / readers
    - ...
    - ....
  tracer_provider:
    span_processors:
      - ...
      - ...
    span_limits: ...  
  meter_provider:
    metric_readers:
      - ...
      - ...
    views:
       - ...
       - ....  
  logger_provider:
    log_record_processors:
      - ...
      - ...
    span_limits: ...  
instrumentation:
  http:
     client:
       request_headers: ...
       response_headers: ...

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:

sdk:
  resource: ...
  logging:
    level: info
  limits: ...
  exporters: # Array of named exporters to be referenced in processors / readers
  span_processors:
    - ...
    - ...
  span_limits: ...  
  metric_readers:
    - ...
    - ...
  metric_views:
     - ...
     - ....  
  log_record_processors:
    - ...
    - ...
  span_limits: ...  
instrumentation:
  http_client_request_headers: ...
  http_client_response_headers: ...
@codeboten
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants