- Add
Config::report_interval
: The background collector working interval. - Deprecate
Config::batch_report_interval
andConfig::batch_report_max_spans
. - Fix a performance issue in object-pool which was causing lock racing.
- Update to opentelemetry, opentelemetry_sdk, and opentelemetry-otlp.
- Update to opentelemetry 0.22, opentelemetry_sdk 0.22.1, and opentelemetry-otlp: 0.15.
- Add
LocalSpan::add_property
andLocalSpan::add_properties
. - Add
Config::report_before_root_finish
. - Add new crate
minitrace-futures
.
- Add
LocalSpans::to_span_records()
. - Add
#[trace(properties = { "k1": "v1", "k2": "v2" })]
. - Add
func_name!()
,full_name!()
, andfile_location!()
tominitrace::prelude
.
- Improve documentation.
- Macro will use the full path of the function as span name instead of the only function name. You can turn it off by setting
#[trace(short_name = true)]
. - Add utility macros
func_name!()
,full_name!()
, andfile_location!()
to generate names for use in span. - Add
Span::elapsed()
that returns the elapsed time since the span is created.
- Span name and event name now accept both
&'static str
andString
(Into<Cow<'static, str>>
), which previously only accept&'static str
. with_property
andwith_properties
now acceptimpl Into<Cow<'static, str>>
, which previously acceptCow<'static, str>
.
- Fix panics due to destruction of Thread Local Storage value
- Add
Event
type to represent single points in time during the span's lifetime. - Add
minitrace-opentelementry
reporter that reports spans to OpenTelemetry collector. - Removed
Collector
and raplaced it withReporter
. - The macro arguments must be named if any, e.g.
#[trace(name="name")]
. - Allow to statically opt-out of tracing by not setting
enable
feature.
- Remove
LocalSpanGuard
and merge it intoLocalSpan
. - Remove
LocalSpan::with_property
,LocalSpan::with_properties
,Span::with_property
andSpan::with_properties
. - Add
LocalSpan::add_property
,LocalSpan::add_properties
,Span::add_property
andSpan::add_properties
. - Remove
LocalParentGuard
.Span::set_local_parent
returns a generalOption<Guard<impl FnOnce()>>
instead.
- Add an async variant of jaeger reporting function
minitrace::report()
. LocalSpan::with_property
now no longer takesself
but&mut self
instead.
Collector::collect()
becomes an async function because the span collection work is moved to a background thread to extremely reduce the performance overhead on the code being tracing.- Attribute macro
#[trace]
on async function becomes able to automatically extract the local parent in the caller's context. Previously, the caller must manually callin_span()
.
- All API get redesigned for better egnormic experience.
- Attribute macro
#[trace]
automatically detectsasync fn
and crateasync-trait
, and since that,#[trace_async]
is removed.