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

feat(containerd-shim-wasm): add OpenTelemetry tracing library and feature #582

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented May 6, 2024

This PR introduces OpenTelemetry feature and new APIs on the core crate to add tracing capabilities to the shim.

  • Added OpenTelemetry tracing to the main entry point of the shim. It now parses the OTEL_EXPORTER_OTLP_ENDPOINT environment variable to determine if the shim should be started with OpenTelemetry tracing.
  • Enable that in the wasmtime shim

It builds on top of #564

@Mossaka Mossaka marked this pull request as draft May 6, 2024 04:53
@Mossaka Mossaka force-pushed the otel-wasmtime branch 2 times, most recently from 8a3f861 to a00f739 Compare May 6, 2024 05:03
@Mossaka Mossaka force-pushed the otel-wasmtime branch 2 times, most recently from 4d578ab to d9f1fe7 Compare May 16, 2024 22:42
@Mossaka Mossaka changed the title [DO NOT MERGE] WIP: wasmtime shim OpenTelemetry tracing support wasmtime shim OpenTelemetry tracing support May 16, 2024
@Mossaka Mossaka requested a review from jsturtevant May 16, 2024 22:44
@Mossaka Mossaka marked this pull request as ready for review May 16, 2024 22:44
@Mossaka Mossaka changed the title wasmtime shim OpenTelemetry tracing support feat(containerd-shim-wasm): add OpenTelemetry tracing library and feature May 18, 2024
@Mossaka
Copy link
Member Author

Mossaka commented May 20, 2024

Could you please take a look on this PR 🙏🏻 @devigned @jsturtevant @jprendes @cpuguy83

docs/opentelemetry.md Outdated Show resolved Hide resolved
crates/containerd-shim-wasm/src/sandbox/shim/otel.rs Outdated Show resolved Hide resolved
crates/containerd-shim-wasm/src/sandbox/shim/otel.rs Outdated Show resolved Hide resolved
crates/containerd-shim-wasm/src/sandbox/shim/otel.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@jsturtevant jsturtevant left a comment

Choose a reason for hiding this comment

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

Great work, awesome to see that this has already been used to solve our startup perf!

docs/opentelemetry.md Show resolved Hide resolved
docs/opentelemetry.md Show resolved Hide resolved
docs/image.png Outdated Show resolved Hide resolved
docs/image-1.png Outdated Show resolved Hide resolved
docs/opentelemetry.md Outdated Show resolved Hide resolved
docs/opentelemetry.md Outdated Show resolved Hide resolved
crates/containerd-shim-wasmtime/src/main.rs Show resolved Hide resolved
this commit adds otel collector APIs and a new opentelemetry feature to the wasm shim

Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
…n shim_main

Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
this commit adds a new env var OTEL_EXPORTER_OTLP_PROTOCOL to configure different types of OTLP protocols such as grpc and http/protobuf

by default, it uses http/protobuf

Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
@Mossaka
Copy link
Member Author

Mossaka commented Jun 5, 2024

Did a rebase of the PR and resolved all the comments. Could you please take another look, @cpuguy83 , @jsturtevant 🙏?

@Mossaka Mossaka closed this Jun 6, 2024
@Mossaka Mossaka reopened this Jun 6, 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.

None yet

3 participants