Skip to content

Commit

Permalink
TODOs
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb Schoepp <[email protected]>
  • Loading branch information
calebschoepp committed Sep 11, 2024
1 parent 8d22419 commit 1741e59
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions crates/factor-observe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub(crate) struct State {
///
/// Only a reference ID to the guest span is held here. The actual guest span must be looked up
/// in the `guest_spans` table using the reference ID.
/// TODO: Fix comment
/// TODO(Caleb): Fix comment
pub(crate) active_spans: IndexMap<String, u32>,

/// Id of the last span emitted from within the host before entering the guest.
Expand All @@ -93,13 +93,13 @@ pub struct GuestSpan {
pub inner: opentelemetry::global::BoxedSpan,
}

/// TODO comment
/// TODO(Caleb): comment
pub struct ObserveContext {
pub(crate) state: Option<Arc<RwLock<State>>>,
}

impl ObserveContext {
/// TODO: Comment
/// TODO(Caleb): Comment
pub fn from_prepare_context<T: RuntimeFactors, F: Factor>(
prepare_context: &mut PrepareContext<T, F>,
) -> anyhow::Result<Self> {
Expand Down
2 changes: 1 addition & 1 deletion crates/factor-sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ tokio = { version = "1", features = ["macros", "rt"] }
[lints]
workspace = true

# TODO: Setup observe reparenting
# TODO(Caleb): Setup observe reparenting
2 changes: 1 addition & 1 deletion crates/factor-variables/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ tokio = { version = "1", features = ["macros", "rt"] }
[lints]
workspace = true

# TODO: Move instruments up a level
# TODO(Caleb): Move instruments up a level
2 changes: 1 addition & 1 deletion crates/world/src/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ mod observe {
type Error = wasmtime::Error;

fn try_from(sc: traces::SpanContext) -> anyhow::Result<Self> {
// TODO: Endianess
// TODO(Caleb): Endianess
let trace_id: [u8; 16] = {
let mut whole: [u8; 16] = [0; 16];
let (one, two) = whole.split_at_mut(8);
Expand Down
16 changes: 6 additions & 10 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ mod integration_tests {
Ok(())
}

// TODO: Cleanup the fake collectors somehow
// TODO(Caleb): Cleanup the fake collectors somehow
// TODO(Caleb): Move these integration tests to the observe crate

#[tokio::test]
// Test that basic otel tracing and context propagation works
// Test that basic otel tracing and inbound/outbound context propagation works
async fn otel_smoke_test() -> anyhow::Result<()> {
let collector = FakeCollectorServer::start()
.await
Expand Down Expand Up @@ -582,14 +583,9 @@ mod integration_tests {
Ok(())
}

// TODO: wasi_observe_set_event
// TODO: wasi_observe_update_name
// TODO: wasi_observe_set_link
// TODO: wasi_observe_host_guest_host
// TODO: semantics of closing a parent doesn't close child
// TODO: inbound trace propagation
// TODO: outbound trace propagation
// TODO: Weird edge cases where a span is closed before we try to load it implicitly as parent or as observecontext thing.
// TODO(Caleb): wasi_observe_set_link
// TODO(Caleb): semantics of closing a parent doesn't close child
// TODO(Caleb): Weird edge cases where a span is closed before we try to load it implicitly as parent or as observecontext thing.

#[test]
/// Test dynamic environment variables
Expand Down

0 comments on commit 1741e59

Please sign in to comment.