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

Integrate OpenTelemetry into the proxy #3221

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Integrate OpenTelemetry into the proxy #3221

merged 1 commit into from
Oct 1, 2024

Conversation

sfleen
Copy link
Collaborator

@sfleen sfleen commented Sep 23, 2024

OpenCensus is a deprecated protocol and is slated to be removed from upstream collectors soon.

This wires up the proxy to optionally use OpenTelmetry as the format for exported traces. Currently, this defaults to the existing OpenCensus exporter, and we can switch the default later.

#10111

@sfleen sfleen requested a review from olix0r September 23, 2024 20:35
@sfleen sfleen marked this pull request as ready for review September 23, 2024 20:35
@sfleen sfleen requested a review from a team as a code owner September 23, 2024 20:35
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 17.45283% with 175 lines in your changes missing coverage. Please review.

Project coverage is 67.54%. Comparing base (96124bc) to head (e071307).
Report is 469 commits behind head on main.

Files with missing lines Patch % Lines
linkerd/opencensus/src/lib.rs 0.00% 41 Missing ⚠️
linkerd/app/src/trace_collector/otel_collector.rs 0.00% 38 Missing ⚠️
linkerd/opentelemetry/src/lib.rs 0.00% 29 Missing ⚠️
linkerd/app/src/trace_collector.rs 30.00% 21 Missing ⚠️
linkerd/app/core/src/http_tracing.rs 10.00% 18 Missing ⚠️
linkerd/app/src/trace_collector/oc_collector.rs 0.00% 9 Missing ⚠️
linkerd/trace-context/src/lib.rs 0.00% 7 Missing ⚠️
linkerd/app/src/env.rs 45.45% 6 Missing ⚠️
linkerd/app/src/lib.rs 76.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3221      +/-   ##
==========================================
- Coverage   67.68%   67.54%   -0.14%     
==========================================
  Files         332      365      +33     
  Lines       15158    16988    +1830     
==========================================
+ Hits        10259    11474    +1215     
- Misses       4899     5514     +615     
Files with missing lines Coverage Δ
linkerd/app/core/src/lib.rs 87.50% <ø> (ø)
linkerd/app/core/src/metrics.rs 98.46% <100.00%> (+0.02%) ⬆️
linkerd/app/inbound/src/lib.rs 81.69% <ø> (+0.26%) ⬆️
linkerd/app/outbound/src/http/server.rs 60.65% <ø> (-1.42%) ⬇️
linkerd/app/outbound/src/lib.rs 56.96% <ø> (ø)
linkerd/app/src/env/trace.rs 50.00% <ø> (ø)
linkerd/app/src/env.rs 53.14% <45.45%> (-6.26%) ⬇️
linkerd/app/src/lib.rs 87.77% <76.00%> (-0.80%) ⬇️
linkerd/trace-context/src/lib.rs 6.66% <0.00%> (-2.03%) ⬇️
linkerd/app/src/trace_collector/oc_collector.rs 0.00% <0.00%> (ø)
... and 5 more

... and 47 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 642c2af...e071307. Read the comment docs.

Cargo.lock Outdated Show resolved Hide resolved
tools/src/bin/gen-protos.rs Outdated Show resolved Hide resolved
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

General shape of this is looking good to me. Some smaller nitty gritty feedback...

linkerd/app/core/src/http_tracing.rs Outdated Show resolved Hide resolved
linkerd/app/core/src/http_tracing.rs Outdated Show resolved Hide resolved
linkerd/app/inbound/src/lib.rs Outdated Show resolved Hide resolved
linkerd/app/src/env.rs Outdated Show resolved Hide resolved
linkerd/app/src/trace_collector/oc_collector.rs Outdated Show resolved Hide resolved
linkerd/app/src/trace_collector/otel_collector.rs Outdated Show resolved Hide resolved
linkerd/app/src/trace_collector.rs Outdated Show resolved Hide resolved
linkerd/app/src/trace_collector/oc_collector.rs Outdated Show resolved Hide resolved
linkerd/app/src/trace_collector.rs Outdated Show resolved Hide resolved
linkerd/app/src/trace_collector.rs Outdated Show resolved Hide resolved
linkerd/app/src/lib.rs Outdated Show resolved Hide resolved
olix0r
olix0r previously approved these changes Sep 30, 2024
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

lgtm!

linkerd/app/src/env.rs Outdated Show resolved Hide resolved
linkerd/app/src/lib.rs Outdated Show resolved Hide resolved
@olix0r olix0r dismissed their stale review September 30, 2024 15:50

caught something

linkerd/app/src/lib.rs Outdated Show resolved Hide resolved
OpenCensus is a deprecated protocol and is slated to be removed from upstream collectors soon.

This wires up the proxy to optionally use OpenTelmetry as the format for exported traces. Currently, this defaults to the existing OpenCensus exporter, and we can switch the default later.

[#10111](linkerd/linkerd2#10111)

Signed-off-by: Scott Fleener <[email protected]>
@sfleen sfleen merged commit 3130e3c into linkerd:main Oct 1, 2024
19 of 20 checks passed
@sfleen sfleen deleted the otel branch October 1, 2024 14:52
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