Skip to content

Uniform defaults for exporterhelper #4455

Open
@mx-psi

Description

@mx-psi

The exporterhelper package provides certain reusable helpers for common needs like queueing, retrying with backoff or timeouts. As of e23c9d0 the timeout setting is enabled by default but the rest are not:

opts := &baseSettings{
TimeoutSettings: DefaultTimeoutSettings(),
// TODO: Enable queuing by default (call DefaultQueueSettings)
QueueSettings: QueueSettings{Enabled: false},
// TODO: Enable retry by default (call DefaultRetrySettings)
RetrySettings: RetrySettings{Enabled: false},
}

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Blocked

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions