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

Match Accept header with Content-Type in the proto exporter #3562

Merged
merged 3 commits into from
Jan 24, 2023

Conversation

scheler
Copy link
Contributor

@scheler scheler commented Jan 23, 2023

Which problem is this PR solving?

The protobuf exporter currently sends 'content-type' header as protobuf but 'accept' header as json. Otel collector ignores the accept header and sends the response with protobuf. However, this is an issue with other backends.

Fixes # (issue)

Short description of the changes

Match Accept header with Content-Type in the proto exporter

Type of change

  • [x ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested using the opentelemetry-web example.

@scheler scheler requested a review from a team January 23, 2023 19:56
@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Merging #3562 (33d78aa) into main (9589d54) will decrease coverage by 2.17%.
The diff coverage is n/a.

❗ Current head 33d78aa differs from pull request most recent head 5521fd2. Consider uploading reports for the commit 5521fd2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3562      +/-   ##
==========================================
- Coverage   93.79%   91.63%   -2.17%     
==========================================
  Files         249      128     -121     
  Lines        7640     3370    -4270     
  Branches     1589      656     -933     
==========================================
- Hits         7166     3088    -4078     
+ Misses        474      282     -192     
Impacted Files Coverage Δ
api/karma.worker.js 0.00% <0.00%> (-100.00%) ⬇️
api/src/platform/node/globalThis.ts 0.00% <0.00%> (-100.00%) ⬇️
packages/opentelemetry-resources/karma.worker.js 0.00% <0.00%> (-100.00%) ⬇️
...ckages/opentelemetry-sdk-trace-web/karma.worker.js 0.00% <0.00%> (-100.00%) ⬇️
...s/opentelemetry-core/src/platform/node/sdk-info.ts 0.00% <0.00%> (-100.00%) ⬇️
...opentelemetry-core/src/platform/node/globalThis.ts 0.00% <0.00%> (-100.00%) ⬇️
...pentelemetry-core/src/platform/node/performance.ts 0.00% <0.00%> (-100.00%) ⬇️
.../packages/api-logs/src/platform/node/globalThis.ts 0.00% <0.00%> (-100.00%) ⬇️
...lemetry-resources/src/detectors/ProcessDetector.ts 31.81% <0.00%> (-68.19%) ⬇️
...perimental/packages/otlp-exporter-base/src/util.ts 78.04% <0.00%> (-17.08%) ⬇️
... and 126 more

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this 🙂

@dyladan dyladan merged commit bcfb1b6 into open-telemetry:main Jan 24, 2023
@scheler scheler deleted the proto-exporter-bugfix branch January 24, 2023 22:29
@dyladan dyladan mentioned this pull request Jan 27, 2023
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.

3 participants