Skip to content

Commit 04ae4a4

Browse files
committed
[Evolve][Issue] Resolve issue 113
Close issue #113. Signed-off-by: Mark Van de Vyver <[email protected]>
1 parent 0ca8cc8 commit 04ae4a4

File tree

208 files changed

+10523
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+10523
-412
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
env:
1010
CARGO_TERM_COLOR: always

.github/workflows/coverage.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
2323
run: |
2424
cargo test --workspace --all-features --no-fail-fast
25-
cargo run --example synchronous
26-
cargo run --example asynchronous
2725
cargo run --example get_started
2826
- id: coverage
2927
uses: actions-rs/[email protected]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
.idea
55
Cargo.lock
6+
*.log

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
- Refactor `minitrace-macro` to pipeline model (issue #113).
6+
- Issue #142: Attribute arguments are all keyword/named arguments. Position arguments deprecated.
7+
- Issue #128: Attribute parsing errors should not break IDE completion, etc.
8+
- Issue #112: Fixed
9+
510
## v0.5.1
611

712
- Fix panics due to destruction of Thread Local Storage value
@@ -19,7 +24,7 @@
1924
- Remove `LocalSpanGuard` and merge it into `LocalSpan`.
2025
- Remove `LocalSpan::with_property`, `LocalSpan::with_properties`, `Span::with_property` and `Span::with_properties`.
2126
- Add `LocalSpan::add_property`, `LocalSpan::add_properties`, `Span::add_property` and `Span::add_properties`.
22-
- Remove `LocalParentGuard`. `Span::set_local_parent` returns a general `Option<Guard<impl FnOnce()>>` instead.
27+
- Remove `LocalParentGuard`. `Span::set_local_parent` returns a general `Option<Guard<impl FnOnce()>>` instead.
2328

2429
## v0.3.1
2530

Cargo.toml

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,92 @@
1+
[package]
2+
name = "minitrace"
3+
version = "0.5.1"
4+
authors = ["The TiKV Project Authors"]
5+
license = "Apache-2.0"
6+
rust-version = "1.56.0"
7+
edition = "2021"
8+
description = "A high-performance timeline tracing library for Rust"
9+
homepage = "https://github.com/tikv/minitrace-rust"
10+
repository = "https://github.com/tikv/minitrace-rust"
11+
documentation = "https://docs.rs/minitrace"
12+
readme = "README.md"
13+
keywords = ["tracing", "span", "datadog", "jaeger", "opentracing"]
14+
115
[workspace]
216
resolver = "2"
317
members = [
4-
"minitrace",
518
"minitrace-macro",
619
"minitrace-jaeger",
720
"minitrace-datadog",
821
"minitrace-opentelemetry",
922
"test-no-report",
23+
"minitrace-tests",
1024
]
25+
exclude = ["minitrace-old"]
26+
27+
[dependencies]
28+
futures = "0.3"
29+
minitrace-macro = { version = "0.5.1", path = "minitrace-macro", optional = true}
30+
minstant = "0.1"
31+
parking_lot = "0.12"
32+
pin-project = "1.0"
33+
# TODO: Remove once_cell once #![feature(once_cell)] is stabilized
34+
once_cell = "1"
35+
rand = "0.8"
36+
37+
[dev-dependencies]
38+
# The procedural macro `trace` only supports async-trait higher than 0.1.52
39+
async-trait = "0.1.52"
40+
criterion = { version = "0.3", features = ["html_reports"] }
41+
crossbeam = "0.8"
42+
env_logger = "0.10"
43+
futures = "0.3"
44+
futures-timer = "3"
45+
log = "0.4"
46+
logcall = "0.1.4"
47+
minitrace-datadog = { path = "minitrace-datadog" }
48+
minitrace-jaeger = { path = "minitrace-jaeger" }
49+
minitrace-opentelemetry = { version = "0.5.1", path = "minitrace-opentelemetry" }
50+
mockall = "0.11"
51+
once_cell = "1"
52+
opentelemetry = { version = "0.19", default-features = false, features = ["trace"] }
53+
opentelemetry-otlp = { version = "0.12", features = ["trace"] }
54+
rand = "0.8"
55+
rustracing = "0.6"
56+
serial_test = "2"
57+
test-harness = "0.1.1"
58+
tokio = { version = "1", features = ["rt", "time", "macros"] }
59+
tracing = "0.1"
60+
tracing-core = "0.1"
61+
tracing-opentelemetry = "0.15"
62+
tracing-subscriber = "0.2"
63+
64+
# Cargo does not pass on features to subcrates in a virtual workspace
65+
# https://github.com/rust-lang/cargo/issues/4942
66+
#
67+
# Workaround:
68+
#
69+
# export MINITRACE_FEATURES="default minitrace-tests/tk"
70+
# cargo test --manifest-path=moniker/Cargo.toml --no-default-features --features="$MINITRACE_FEATURES" test-name
71+
#
72+
[features]
73+
default = ["attributes", "enable"]
74+
attributes = ["minitrace-macro"]
75+
ci = []
76+
enable = []
77+
78+
[[bench]]
79+
name = "trace"
80+
harness = false
81+
82+
[[bench]]
83+
name = "compare"
84+
harness = false
85+
86+
[[bench]]
87+
name = "spsc"
88+
harness = false
1189

12-
[profile.bench]
13-
opt-level = 3
14-
lto = true
90+
[[bench]]
91+
name = "object_pool"
92+
harness = false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

minitrace/examples/get_started.rs renamed to examples/get_started.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
// Copyright 2022 TiKV Project Authors. Licensed under Apache-2.0.
2-
2+
//! # Get started
3+
//!
4+
//! 1. Setup a trace viewer/frontend. Jaeger example:
5+
//! ```ignore
6+
//! podman run -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
7+
//! ```
8+
//!
39
use minitrace::collector::Config;
410
use minitrace::collector::ConsoleReporter;
511
use minitrace::prelude::*;
File renamed without changes.
File renamed without changes.
File renamed without changes.

img/benchmark.jpeg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../img/benchmark.jpeg

img/jaeger-asynchronous.png

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../img/jaeger-asynchronous.png

img/jaeger-synchronous.png

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../img/jaeger-synchronous.png

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 = { path = "../" }
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 = { path = "../" }
1818
thrift_codec = "0.2"
1919

2020
[dev-dependencies]

minitrace-macro/Cargo.toml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "minitrace-macro"
33
version = "0.5.1"
44
authors = ["The TiKV Project Authors"]
55
license = "Apache-2.0"
6+
rust-version = "1.56.0"
67
edition = "2021"
78
description = "Attribute procedural macro for minitrace-rust"
89
homepage = "https://github.com/tikv/minitrace-rust"
@@ -16,17 +17,31 @@ keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]
1617
proc-macro = true
1718

1819
[dependencies]
19-
# The macro `quote_spanned!` is added to syn in 1.0.84
20+
darling = "0.14"
2021
proc-macro-error = "1"
2122
proc-macro2 = "1"
2223
quote = "1"
23-
syn = { version = "1.0.84", features = ["full", "parsing", "extra-traits", "proc-macro", "visit-mut"] }
24+
# The macro `quote_spanned!` is added to syn in 1.0.84
25+
syn = { version = "1.0.84", features = ["full", "parsing", "extra-traits", "proc-macro", "visit", "visit-mut"] }
26+
thiserror = "1.0.30"
27+
tree-flat = "0.1.1"
2428

2529
[dev-dependencies]
30+
aquamarine = "0.1"
31+
futures = "0.3"
32+
futures-timer = "3.0"
2633
logcall = "0.1.4"
27-
minitrace = { path = "../minitrace" }
34+
macrotest = "1"
35+
minitrace = { path = "../" }
36+
minitrace-jaeger = { path = "../minitrace-jaeger" }
37+
rand = "0.8"
38+
test-utilities = { path = "../test-utilities" }
2839
tokio = { version = "1", features = ["full"] }
2940
trybuild = "1"
3041
# The procedural macro `trace` only supports async-trait higher than 0.1.52
3142
async-trait = "0.1.52"
3243
log = "0.4"
44+
45+
[features]
46+
default = []
47+
ci = []

0 commit comments

Comments
 (0)