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

[EXPORTER] Add HttpHeaders in ElasticsearchLogRecordExporter #3083

Conversation

ShadowMaxLeb
Copy link
Contributor

@ShadowMaxLeb ShadowMaxLeb commented Oct 7, 2024

Fixes #3080

When using the ElasticsearchLogRecordExporter we might need to add some http headers (auth or other required headers by our server). As of today there was no way of doing it for this exporter.

This PR aims to add this feature.

Changes

Like for the HttpLogRecordExporter, add the possibility to give custom http headers that will be added to each request. This is done by adding a std::multimap in which headers are added and then parsed when the request is being sent.

@ShadowMaxLeb ShadowMaxLeb requested a review from a team as a code owner October 7, 2024 11:53
Copy link

linux-foundation-easycla bot commented Oct 7, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit f2974a6
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/6703d9180dbde40008c7bf7e

@marcalff marcalff added the pr:waiting-on-cla Waiting on CLA label Oct 7, 2024
@marcalff marcalff changed the title [EXPORTER] Add possibility to give custom HttpHeaders for ElasticsearchLogRecordExporter [EXPORTER] Add HttpHeaders in ElasticsearchLogRecordExporter Oct 7, 2024
@ShadowMaxLeb ShadowMaxLeb force-pushed the custom-http-headers-elastic-search-exporter branch from b7dc9e1 to f2974a6 Compare October 7, 2024 12:50
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.81%. Comparing base (497eaf4) to head (f2974a6).
Report is 135 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3083      +/-   ##
==========================================
+ Coverage   87.12%   87.81%   +0.69%     
==========================================
  Files         200      195       -5     
  Lines        6109     5968     -141     
==========================================
- Hits         5322     5240      -82     
+ Misses        787      728      -59     

see 125 files with indirect coverage changes

@lalitb lalitb removed the pr:waiting-on-cla Waiting on CLA label Oct 7, 2024
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution.

@marcalff marcalff merged commit 35e8d17 into open-telemetry:main Oct 7, 2024
56 checks passed
@ShadowMaxLeb ShadowMaxLeb deleted the custom-http-headers-elastic-search-exporter branch October 8, 2024 05:23
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.

ElasticSearch exporter does not give the possibility to add custom headers (auth headers for instance)
3 participants