Closed jack-berg closed 1 year ago
its a bit confusing / awkward to configure an exporter with these options for a signal that will ignore them.
What do you think about introducing the signal type for the exporters config? Something like this
exporters:
span:
otlp/exporterA:
endpoint: http://localhost:4317
otlp/exporterB:
endpoint: http://remote-host:4317
headers:
api-key: 12345
metric:
otlp/exporterC:
endpoint: http://localhost:4317
temporality_preference: delta
log:
otlp/exporterD:
endpoint: http://localhost:4317
I think that could work if those sections are nested under the respective providers:
sdk:
tracer_provider:
exporters:
otlp:
endpoint: http://localhost:4317
span_processors:
- name: batch
args:
exporter: otlp
meter_provider:
exporters:
otlp:
endpoint: http://localhost:4317
temporality_preference: delta
metric_readers:
- name: periodic
args:
exporter: otlp
I wonder if having exporters separate would cause confusion for users that don't understand that they need to be paired with a batch span processor / batch log record processor / periodic metric reader.
Maybe for first-time users, but I think people who have some exposure the configuring the SDK would already know that processors and exporters are paired together.
Related to #10, but specifically for exporters. Exporters could be defined at the top level and referenced by name, or could be expressed as nested arguments to the processors / metric readers which ultimately use them.
Let's talk about this!
Option 1: Exporters live at top level and are referenced by name
Advantages:
Disadvantages:
Example:
Option 2: Exporters are nested under the components that use them
Advantages:
Disadvantages:
Example: