Skip to content

[EXPORTER] Add HttpHeaders in ElasticsearchLogRecordExporter#3083

Merged
marcalff merged 1 commit into
open-telemetry:mainfrom
Shadow-Official:custom-http-headers-elastic-search-exporter
Oct 7, 2024
Merged

[EXPORTER] Add HttpHeaders in ElasticsearchLogRecordExporter#3083
marcalff merged 1 commit into
open-telemetry:mainfrom
Shadow-Official:custom-http-headers-elastic-search-exporter

Conversation

@ShadowMaxLeb

@ShadowMaxLeb ShadowMaxLeb commented Oct 7, 2024

Copy link
Copy Markdown
Contributor

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
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 7, 2024

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@netlify

netlify Bot commented Oct 7, 2024

Copy link
Copy Markdown

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
@codecov

codecov Bot commented Oct 7, 2024

Copy link
Copy Markdown

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

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

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
@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