Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New singletonreceivercreator #7

Closed
a-thaler opened this issue Jun 10, 2024 · 1 comment
Closed

New singletonreceivercreator #7

a-thaler opened this issue Jun 10, 2024 · 1 comment
Assignees
Labels
area/singletonreceivercreator singleton-receiver-creator kind/feature New feature or request
Milestone

Comments

@a-thaler
Copy link
Collaborator

a-thaler commented Jun 10, 2024

Description
Have a first implementation of a decorating receiver, which will activate a nested receiver on if it got selected as leader in a leader election mechanism, see also https://github.com/kyma-project/telemetry-manager/blob/main/docs/contributor/arch/012-leader-receiver-creator.md
A dummy implementation can be found here: https://github.com/skhalash/leaderreceivercreator

Criterias

  • Have the new receiver buildable
  • The receiver can be configured with the typical lease configuration (see https://github.com/kyma-project/telemetry-manager/blob/main/docs/contributor/arch/012-leader-receiver-creator.md)
  • The receiver can be configured with a nested receiver configuration
  • If the instance is able to acquire the lease, the nested receiver will be enabled
  • If the instance is cannot renew the lease, the nested receiver will be destroyed and is not active
  • Have a readme comparable to the upstream readme's, summarizing the API and usage pattern
  • Understand what metrics are available already and define what should be added in a follow-up

Reasons

Attachments

@rakesh-garimella
Copy link
Contributor

rakesh-garimella commented Jun 20, 2024

Following has been implemented:

  • new receiver is buildable.
  • leader election receiver takes the input from the defined config file
  • When the leader election is won the sub-receiver starts and when it looses the sub-receiver stops
  • The sub-receiver that has been added is k8s cluster receiver
  • Readme has been updated
  • unit tests have been added
  • Sub receiver metrics are present out of box eg:
otelcol_receiver_accepted_metric_points{receiver="k8s_cluster//singleton_receiver_creator",service_instance_id="d35b0935-4f95-4f7e-8074-89dee76a698a",service_name="kyma-otelcol",service_version="0.102.1",transport="http"} 1218
# HELP otelcol_receiver_refused_metric_points Number of metric points that could not be pushed into the pipeline.
# TYPE otelcol_receiver_refused_metric_points counter
otelcol_receiver_refused_metric_points{receiver="k8s_cluster//singleton_receiver_creator",service_instance_id="d35b0935-4f95-4f7e-8074-89dee76a698a",service_name="kyma-otelcol",service_version="0.102.1",transport="http"} 0

What is missing is metrics from singleton receiver. We can have following custom metrics:

  • lease_holder

@a-thaler a-thaler changed the title New leader-election-receiver New singletonreceivercreator Jun 24, 2024
@a-thaler a-thaler added this to the 1.20.0 milestone Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/singletonreceivercreator singleton-receiver-creator kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants