Skip to content

Commit a97bad8

Browse files
authored
improve doc (#173)
* 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]>
1 parent c9cdad5 commit a97bad8

File tree

9 files changed

+11
-20
lines changed

9 files changed

+11
-20
lines changed

minitrace-datadog/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ categories = ["development-tools::debugging"]
1313
keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]
1414

1515
[dependencies]
16-
minitrace = { path = "../minitrace" }
16+
minitrace = { version = "0.6.1", path = "../minitrace" }
1717
reqwest = { version = "0.11", features = ["blocking"] }
1818
rmp-serde = "1"
1919
serde = { version = "1", features = ["derive"] }

minitrace-jaeger/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]
1414

1515
[dependencies]
1616
log = "0.4"
17-
minitrace = { path = "../minitrace" }
17+
minitrace = { version = "0.6.1", path = "../minitrace" }
1818
thrift_codec = "0.2"
1919

2020
[dev-dependencies]

minitrace-macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ syn = { version = "1.0.84", features = ["full", "parsing", "extra-traits", "proc
2424

2525
[dev-dependencies]
2626
logcall = "0.1.4"
27-
minitrace = { path = "../minitrace" }
27+
minitrace = { version = "0.6.1", path = "../minitrace" }
2828
tokio = { version = "1", features = ["full"] }
2929
trybuild = "1"
3030
# The procedural macro `trace` only supports async-trait higher than 0.1.52

minitrace-macro/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ struct AsyncTraitInfo<'a> {
313313
// to find if it matches the pattern
314314
// `async fn foo<...>(...) {...}; Box::pin(foo<...>(...))` (<=0.1.43), or if
315315
// it matches `Box::pin(async move { ... }) (>=0.1.44). We the return the
316-
// statement that must be instrumented, along with some other informations.
316+
// statement that must be instrumented, along with some other information.
317317
// 'gen_body' will then be able to use that information to instrument the
318318
// proper function/future.
319319
// (this follows the approach suggested in

minitrace-opentelemetry/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]
1515
[dependencies]
1616
futures = { version = "0.3", features = ["executor"] }
1717
log = "0.4"
18-
minitrace = { path = "../minitrace" }
18+
minitrace = { version = "0.6.1", path = "../minitrace" }
1919
opentelemetry = { version = "0.20", features = ["trace"] }
2020

2121
[dev-dependencies]

minitrace-opentelemetry/examples/otel-collector-config.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ receivers:
44
grpc:
55

66
exporters:
7-
logging:
8-
97
zipkin:
108
endpoint: "http://zipkin-all-in-one:9411/api/v2/spans"
119
format: proto
1210

13-
jaeger:
14-
endpoint: jaeger-all-in-one:14250
11+
otlp:
12+
endpoint: jaeger-all-in-one:4317
1513
tls:
1614
insecure: true
1715

@@ -31,8 +29,4 @@ service:
3129
traces:
3230
receivers: [otlp]
3331
processors: [batch]
34-
exporters: [logging, zipkin, jaeger]
35-
metrics:
36-
receivers: [otlp]
37-
processors: [batch]
38-
exporters: [logging]
32+
exporters: [zipkin, otlp]

minitrace/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
//! `minitrace` is designed to be fast and lightweight, considering four scenarios:
270270
//!
271271
//! - **No Tracing**: `minitrace` is not included as dependency in the executable, while the
272-
//! libraries has been intrumented. In this case, it will be completely removed from libraries,
272+
//! libraries has been instrumented. In this case, it will be completely removed from libraries,
273273
//! causing zero overhead.
274274
//!
275275
//! - **Sample Tracing**: `minitrace` is enabled in the executable, but only a small portion

minitrace/src/span.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct Span {
3333
pub(crate) struct SpanInner {
3434
pub(crate) raw_span: RawSpan,
3535
collect_token: CollectToken,
36-
// If the span is not a root span, this field is `None`.
36+
// If the span is not a root span, this field will be `None`.
3737
collect_id: Option<usize>,
3838
collect: GlobalCollect,
3939
}

minitrace/tests/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,7 @@ fn test_elapsed() {
650650

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

653-
let elapsed = root.elapsed().unwrap();
654-
655-
assert!(elapsed >= Duration::from_millis(50));
656-
assert!(elapsed < Duration::from_millis(65));
653+
assert!(root.elapsed().unwrap() >= Duration::from_millis(50));
657654
}
658655

659656
minitrace::flush();

0 commit comments

Comments
 (0)