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

[confighttp] Add support for cookies #10176

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented May 18, 2024

Description

Add support for cookies in HTTP clients with cookies::enabled.

Link to tracking issue

Fixes #10175

Testing

Unit test

Documentation

Added to README

@atoulme atoulme requested a review from a team as a code owner May 18, 2024 07:37
@atoulme atoulme requested a review from mx-psi May 18, 2024 07:37
Copy link

codecov bot commented May 18, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.39%. Comparing base (0d6e6bf) to head (0658220).
Report is 29 commits behind head on main.

Files Patch % Lines
config/confighttp/confighttp.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10176      +/-   ##
==========================================
- Coverage   92.56%   92.39%   -0.17%     
==========================================
  Files         387      387              
  Lines       18254    18329      +75     
==========================================
+ Hits        16896    16935      +39     
- Misses       1014     1047      +33     
- Partials      344      347       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.chloggen/cookie_support.yaml Show resolved Hide resolved
config/confighttp/confighttp.go Outdated Show resolved Hide resolved
@atoulme
Copy link
Contributor Author

atoulme commented May 29, 2024

@mx-psi are we good to go?

@mx-psi
Copy link
Member

mx-psi commented Jun 3, 2024

@mx-psi are we good to go?

I'd like to have more context on what the use cases for this are. I think no further code changes are necessary, but I also want to know why we are doing this.

@atoulme
Copy link
Contributor Author

atoulme commented Jun 3, 2024

This is useful for load balancers relying on cookies for sticky session management. See https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html for example.

Note this is used in particular when exporting data from the collector. In my case I need this for Splunk HEC support.

config/confighttp/README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[confighttp] Support cookie sessions for sticky session cookies
2 participants