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

Prevent invalid traceparent ("00-00000...") from being returned to the caller #7406

Merged
merged 7 commits into from Jan 19, 2024

Conversation

KarstenWintermann
Copy link
Contributor

Signed-off-by: Karsten Wintermann 58027075+KarstenWintermann@users.noreply.github.com

Description

Added a check in http_channel.go which prevents an empty traceparent header from being returned to the caller.

This way, valid traceparent headers, which may be received from Kafka topics with raw payloads, are not overwritten.

Issue reference

Please reference the issue this PR will close: #7372

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

…e caller

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>
@yaron2
Copy link
Member

yaron2 commented Jan 18, 2024

@KarstenWintermann see the linter failure

…h Kafka

Fixes dapr#7372

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>
@KarstenWintermann
Copy link
Contributor Author

@KarstenWintermann see the linter failure

OK, fixed it

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (21095cb) 62.24% compared to head (2b6c2e0) 62.23%.

Files Patch % Lines
pkg/channel/http/http_channel.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7406      +/-   ##
==========================================
- Coverage   62.24%   62.23%   -0.02%     
==========================================
  Files         240      240              
  Lines       22137    22138       +1     
==========================================
- Hits        13779    13777       -2     
- Misses       7208     7210       +2     
- Partials     1150     1151       +1     

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

@artursouza artursouza merged commit f9b51bb into dapr:master Jan 19, 2024
8 of 9 checks passed
whytem pushed a commit to whytem/dapr that referenced this pull request Jan 22, 2024
…e caller (dapr#7406)

* Prevent invalid traceparent ("00-00000...") from being returned to the caller

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>

* OpenTelemetry trace context not transmitted when using rawPayload with Kafka
Fixes dapr#7372

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>

---------

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Artur Souza <asouza.pro@gmail.com>
elena-kolevska pushed a commit to elena-kolevska/dapr that referenced this pull request Jan 24, 2024
…e caller (dapr#7406)

* Prevent invalid traceparent ("00-00000...") from being returned to the caller

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>

* OpenTelemetry trace context not transmitted when using rawPayload with Kafka
Fixes dapr#7372

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>

---------

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Artur Souza <asouza.pro@gmail.com>
elena-kolevska added a commit to elena-kolevska/dapr that referenced this pull request Jan 24, 2024
elena-kolevska pushed a commit to elena-kolevska/dapr that referenced this pull request Jan 25, 2024
…e caller (dapr#7406)

* Prevent invalid traceparent ("00-00000...") from being returned to the caller

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>

* OpenTelemetry trace context not transmitted when using rawPayload with Kafka
Fixes dapr#7372

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>

---------

Signed-off-by: Karsten Wintermann <58027075+KarstenWintermann@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Artur Souza <asouza.pro@gmail.com>
Signed-off-by: Elena Kolevska <elena@kolevska.com>
elena-kolevska added a commit to elena-kolevska/dapr that referenced this pull request Jan 25, 2024
…ed to the caller (dapr#7406)"

This reverts commit f3db5c4.

Signed-off-by: Elena Kolevska <elena@kolevska.com>
@JoshVanL JoshVanL added this to the v1.13 milestone Feb 12, 2024
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.

OpenTelemetry trace context not transmitted when using rawPayload with Kafka
4 participants