Skip to content

Commit

Permalink
improve doc (#173)
Browse files Browse the repository at this point in the history
* improve doc

Signed-off-by: Andy Lok <[email protected]>

* fix

Signed-off-by: Andy Lok <[email protected]>

* fix

Signed-off-by: Andy Lok <[email protected]>

* fix

Signed-off-by: Andy Lok <[email protected]>

---------

Signed-off-by: Andy Lok <[email protected]>
  • Loading branch information
andylokandy authored Oct 31, 2023
1 parent c9cdad5 commit a97bad8
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion minitrace-datadog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["development-tools::debugging"]
keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]

[dependencies]
minitrace = { path = "../minitrace" }
minitrace = { version = "0.6.1", path = "../minitrace" }
reqwest = { version = "0.11", features = ["blocking"] }
rmp-serde = "1"
serde = { version = "1", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion minitrace-jaeger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]

[dependencies]
log = "0.4"
minitrace = { path = "../minitrace" }
minitrace = { version = "0.6.1", path = "../minitrace" }
thrift_codec = "0.2"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion minitrace-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ syn = { version = "1.0.84", features = ["full", "parsing", "extra-traits", "proc

[dev-dependencies]
logcall = "0.1.4"
minitrace = { path = "../minitrace" }
minitrace = { version = "0.6.1", path = "../minitrace" }
tokio = { version = "1", features = ["full"] }
trybuild = "1"
# The procedural macro `trace` only supports async-trait higher than 0.1.52
Expand Down
2 changes: 1 addition & 1 deletion minitrace-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ struct AsyncTraitInfo<'a> {
// to find if it matches the pattern
// `async fn foo<...>(...) {...}; Box::pin(foo<...>(...))` (<=0.1.43), or if
// it matches `Box::pin(async move { ... }) (>=0.1.44). We the return the
// statement that must be instrumented, along with some other informations.
// statement that must be instrumented, along with some other information.
// 'gen_body' will then be able to use that information to instrument the
// proper function/future.
// (this follows the approach suggested in
Expand Down
2 changes: 1 addition & 1 deletion minitrace-opentelemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]
[dependencies]
futures = { version = "0.3", features = ["executor"] }
log = "0.4"
minitrace = { path = "../minitrace" }
minitrace = { version = "0.6.1", path = "../minitrace" }
opentelemetry = { version = "0.20", features = ["trace"] }

[dev-dependencies]
Expand Down
12 changes: 3 additions & 9 deletions minitrace-opentelemetry/examples/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ receivers:
grpc:

exporters:
logging:

zipkin:
endpoint: "http://zipkin-all-in-one:9411/api/v2/spans"
format: proto

jaeger:
endpoint: jaeger-all-in-one:14250
otlp:
endpoint: jaeger-all-in-one:4317
tls:
insecure: true

Expand All @@ -31,8 +29,4 @@ service:
traces:
receivers: [otlp]
processors: [batch]
exporters: [logging, zipkin, jaeger]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [logging]
exporters: [zipkin, otlp]
2 changes: 1 addition & 1 deletion minitrace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
//! `minitrace` is designed to be fast and lightweight, considering four scenarios:
//!
//! - **No Tracing**: `minitrace` is not included as dependency in the executable, while the
//! libraries has been intrumented. In this case, it will be completely removed from libraries,
//! libraries has been instrumented. In this case, it will be completely removed from libraries,
//! causing zero overhead.
//!
//! - **Sample Tracing**: `minitrace` is enabled in the executable, but only a small portion
Expand Down
2 changes: 1 addition & 1 deletion minitrace/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct Span {
pub(crate) struct SpanInner {
pub(crate) raw_span: RawSpan,
collect_token: CollectToken,
// If the span is not a root span, this field is `None`.
// If the span is not a root span, this field will be `None`.
collect_id: Option<usize>,
collect: GlobalCollect,
}
Expand Down
5 changes: 1 addition & 4 deletions minitrace/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,7 @@ fn test_elapsed() {

std::thread::sleep(Duration::from_millis(50));

let elapsed = root.elapsed().unwrap();

assert!(elapsed >= Duration::from_millis(50));
assert!(elapsed < Duration::from_millis(65));
assert!(root.elapsed().unwrap() >= Duration::from_millis(50));
}

minitrace::flush();
Expand Down

0 comments on commit a97bad8

Please sign in to comment.