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

[kafkareceiver] support session timeout configs (and maybe more) in kafka receiver. #28630

Closed
ben-childs-docusign opened this issue Oct 25, 2023 · 9 comments

Comments

@ben-childs-docusign
Copy link
Contributor

Component(s)

receiver/kafka

Is your feature request related to a problem? Please describe.

We are trying to configure our kafka receiver based on the azure event hub recommendations but some of the configuration values are not available. We were seeing unecessary consumer failovers in our collector. The default session timeout is 10s but eventhub recommends a timeout of 30 seconds for event hub consumers.

These are the recommended settings from Azure: https://learn.microsoft.com/en-us/azure/event-hubs/apache-kafka-configurations

Describe the solution you'd like

Add consumer.group.session.timeout config. E,g,

image

Describe alternatives you've considered

N/A

Additional context

No response

@ben-childs-docusign ben-childs-docusign added enhancement New feature or request needs triage New item requiring triage labels Oct 25, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@VihasMakwana
Copy link
Contributor

Hi @ben-childs-docusign, thanks for raising this request!
Sounds like a valid ask. Let's see what owners have to say on this.
Also, would you be willing to raise a PR, as you already shared a snippet?

@github-actions
Copy link
Contributor

Pinging code owners for receiver/kafka: @pavolloffay @MovieStoreGuy. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@ben-childs-docusign
Copy link
Contributor Author

@VihasMakwana I can potentially contribute a change it just might take me a few weeks. My local change just hard codes the setting it doesn't fully connect the dots on the config.

@strawgate
Copy link
Contributor

@ben-childs-docusign I've linked a PR that adds these settings

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Oct 30, 2023
Copy link
Contributor

github-actions bot commented Jan 1, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

github-actions bot commented Mar 4, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

github-actions bot commented May 3, 2024

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
@strawgate
Copy link
Contributor

Can we reopen this? I have an active pr

MovieStoreGuy added a commit that referenced this issue Jul 23, 2024
…agement facilities (#33082)

Previous PR was closed due to inactivity waiting for review by
maintainer:
#32393

**Description:** 

To address #28630 i've wired in the session timeout and heartbeat
interval settings. I would have exposed max.poll.interval as well but it
appears Sarama doesn't make that setting available. It has a similar
setting called `MaxProcessingTime` that we could implement if desired
but behavior is different. Something to note is that Kafka recommends a
45s session timeout for consumers but Samara actually defaults to 10s so
I've also defaulted to 10s to keep behavior consistent.

**Link to tracking Issue:** #28630

**Testing:**

I started the OTel collector with the following configuration and
verified via debugger that the settings were applied to the Sarama
client.
```
receivers:
  kafka:
    topic: test
    session_timeout: 15s
    heartbeat_interval: 5s

exporters:
  debug:

service:
  pipelines:
    logs:  # a pipeline of “traces” type
      receivers: [kafka]
      exporters: [debug]

```

I then added a test to `config_test` that tests the default values and
tests providing the values via config.

**Documentation:** <Describe the documentation added.>

I modified the readme to reference the new settings.

---------

Co-authored-by: Sean Marciniak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants