- Add
Config::cancelable(), which defaults tofalse. - Deprecate
Config::max_spans_per_trace()andConfig::report_before_root_finish().
- Upgrade MSRV to 1.80.
- Improved performance.
- Add
TraceId::random()andSpanId::random(). - Add
FromStr,Display, andserdesupport forTraceId,SpanId. - Add
Span::add_property()andSpan::add_properties(). - Add
Span::add_event()andLocalSpan::add_event(). - Deprecate
Event::add_to_parent()andEvent::add_to_local_parent().
- Reduce dependencies to futures 0.3.
- Optimize collect behavior when the span is not sampled.
- Upgrade opentelemtry to 0.26.0.
- Upgrade opentelemtry to 0.25.0.
- Allow to
LocalSpan::add_property()when the local parent is aSpan.
- Lower MSRV to 1.75.
- Upgrade dependencies including opentelemtry and more.
- Remove deprecated methods
Config::batch_report_intervalandConfig::batch_report_max_spans. - Deprecate
full_name!()and rename it tofull_path!(). - Deprecate
SpanContext::encode_w3c_traceparent_with_sampled(). - Pass
Vec<SpanRecord>toReporter::report()instead of&[SpanRecord]. - Added
SpanContext.sampled, which will be propagated through the child spans.
- Project rename to
fastrace.
- Add
Config::report_interval: The background collector working interval. - Deprecate
Config::batch_report_intervalandConfig::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_propertyandLocalSpan::add_properties. - Add
Config::report_before_root_finish. - Add new crate
fastrace-futures.
- Add
LocalSpans::to_span_records(). - Add
#[trace(properties = { "k1": "v1", "k2": "v2" })]. - Add
func_name!(),full_name!(), andfile_location!()tofastrace::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 strandString(Into<Cow<'static, str>>), which previously only accept&'static str. with_propertyandwith_propertiesnow acceptimpl Into<Cow<'static, str>>, which previously acceptCow<'static, str>.
- Fix panics due to destruction of Thread Local Storage value
- Add
Eventtype to represent single points in time during the span's lifetime. - Add
fastrace-opentelementryreporter that reports spans to OpenTelemetry collector. - Removed
Collectorand 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
enablefeature.
- Remove
LocalSpanGuardand merge it intoLocalSpan. - Remove
LocalSpan::with_property,LocalSpan::with_properties,Span::with_propertyandSpan::with_properties. - Add
LocalSpan::add_property,LocalSpan::add_properties,Span::add_propertyandSpan::add_properties. - Remove
LocalParentGuard.Span::set_local_parentreturns a generalOption<Guard<impl FnOnce()>>instead.
- Add an async variant of jaeger reporting function
fastrace::report(). LocalSpan::with_propertynow no longer takesselfbut&mut selfinstead.
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 fnand crateasync-trait, and since that,#[trace_async]is removed.