Skip to content

Proposal: expose WithCollapsedCount to the public package #1877

@zliang-min

Description

@zliang-min

The Problem

There are two built-in output metrics output_sent and output_batch_sent that show how many messages and message batches have been sent by the output component. Showing the differences is important especially when using an aggreator processor like archive. However, this is not doable when implementing a processor like archive with the bethos library, because this relies on the WithCollapsedCount (or CtxWithCollapsedCount), and these functions are all in the internal package.

The Proposal

There are two simple solutions:

  1. move the whole internal/batch/count.go to public/service, or
  2. only expose the WithCollapsedCount to the public/service package.

Solution 2 is probably the better option because it only exposes the very limited interface needed for plugin development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions