opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Uniform defaults for `exporterhelper`

Open mx-psi opened this issue 2 years ago • 1 comments

The exporterhelper package provides certain reusable helpers for common needs like queueing, retrying with backoff or timeouts. As of e23c9d0a01834a64162acb1677b7d69aa5be46f5 the timeout setting is enabled by default but the rest are not: https://github.com/open-telemetry/opentelemetry-collector/blob/e23c9d0a01834a64162acb1677b7d69aa5be46f5/exporter/exporterhelper/common.go#L102-L108

This issue is to address the TODOs in the code. The current status is a bit confusing, since the documentation does not state which settings are enabled by default and which are not.

The individual items are to

  • [ ] decide if timeout capabilities should be enabled by default and document if so,
  • [ ] decide if queue capabilities should be enabled by default and document if so and
  • [ ] decide if retry capabilities should be enabled by default and document if so.

I think timeout and queueing are safe to enable by default, while retries are a bit more doubtful: some of the exporters in contrib do several network requests per ConsumeTraces/Metrics/Logs call, so in situations of partial success (e.g. 1st request passes and the 2nd fails), it may not be safe or desirable to re-do previous requests. It may be fine to enable retries with a caveat on partial success situations.

mx-psi avatar Nov 18 '21 08:11 mx-psi

This should wait for https://github.com/open-telemetry/opentelemetry-collector/issues/6767 and https://github.com/open-telemetry/opentelemetry-collector/issues/8122 to be resolved first

dmitryax avatar Dec 20 '23 17:12 dmitryax