opentelemetry-js
opentelemetry-js copied to clipboard
Document the difference between spanProcessor and traceExporter
- [x] This only affects the JavaScript OpenTelemetry library
- [ ] This may affect other libraries, but I would like to get opinions here first
The difference and the fact that either spanProcessor or traceExporter are used (but not both, see the current implementation here) leads to confusion on how to use it correctly (for example see this issue). The README does not mention what happens when bothspanProcessor (or spanProcessors) and traceExporter are defined and to be more specific it doesn't mention that traceExporter will be completely ignored if processor is provided which seems important.
To provide more context - I've run into this issue when trying to enable tracing in Prisma following their documentation after having configured basic instrumentation based on "getting started" guide. Perhaps I was confused because I'm still new to the library but I think making it clearer would be beneficial.