Receiver: Logically split router and ingestor mode

Summary of Open Issue: Receiver - Logically Split Router and Ingestor Mode

Issue Identification Initiated by collaborator matej-g on 2022-08-25. The issue highlights the challenge of having tightly coupled ingestion and routing code within the same receiver source file, leading to code complexity and maintainability issues. Current implementations rely on numerous conditionals, making it challenging to follow the codebase. Additionally, the router mode is instantiated with both multi TSDB and store API, though it does not utilize metrics from these nodes, which are not meant to be queryable or expose tenant statistics (#5623).

Proposed Solution The primary goal is to refactor the code to separate the ingestor and router receivers logically, thereby improving code readability and maintainability. This separation suggests that the receiver in router mode should operate without the store API overhead, aligning functionality more closely with expected behavior.

Alternatives Considered Maintaining the current structure with intermingled modes, though this is not favorable due to the identified complexity.

Progress Updates

  • 2022-08-26: Contributor haanhvu expressed intent to work on this issue.
  • 2022-11-13: A stale bot prompted for status, to which haanhvu confirmed the necessity of the issue.
  • 2023-02-08: Contributor Kartik-Garg submitted a working pull request to address the issue.

Labels: This issue has been categorized under component: receive, feature request/improvement, and marked as a good first issue, indicating potential for contributions from new developers.