MCPcopy Create free account

hub / github.com/tokio-rs/tracing / functions

Functions2,480 in github.com/tokio-rs/tracing

↓ 256 callersMethodassert_finished
Checks the expectations which were set on the [`MockSubscriber`]. Calling `assert_finished` is usually the final part of a test. # Panics This meth
tracing-mock/src/subscriber.rs:1436
↓ 251 callersMethodrun_with_handle
Consume this builder and return a [`MockLayer`] which can be set as the default subscriber and a [`MockHandle`] which can be used to validate the prov
tracing-mock/src/layer.rs:850
↓ 237 callersFunctionmock
()
tracing-mock/src/layer.rs:190
↓ 211 callersMethodonly
Indicates that no fields other than those specified should be expected. If additional fields are present on the recorded event or span, the expectati
tracing-mock/src/field.rs:308
↓ 201 callersFunctionwith_default
(dispatcher: &Dispatch, f: impl FnOnce() -> T)
tracing-core/src/dispatcher.rs:254
↓ 146 callersMethodnamed
Sets a name to expect when matching a span. If an event is recorded with a name that differs from the one provided to this method, the expectation wi
tracing-mock/src/span.rs:294
↓ 138 callersMethodwith
(f: impl FnOnce(Attributes<'_>) -> T)
tracing-subscriber/src/field/mod.rs:254
↓ 137 callersFunctionspan
Construct a new [`ExpectedSpan`]. For details on how to add additional assertions to the expected span, see the [`span`] module and the [`ExpectedSpa
tracing-mock/src/expect.rs:133
↓ 106 callersMethodenter
Adds an expectation that entering a span matching the [`ExpectedSpan`] will be recorded next. This expectation is generally accompanied by a call to
tracing-mock/src/layer.rs:557
↓ 101 callersMethodwith_fields
Adds fields to expect when matching a span. Note**: This method returns a [`NewSpan`] and as such, this expectation can only be validated when expect
tracing-mock/src/span.rs:776
↓ 99 callersMethodclone
(&self)
tracing-core/src/field.rs:854
↓ 94 callersFunctionfield
Construct a new [`ExpectedField`]. For details on how to set the value of the expected field and how to expect multiple fields, see the [`field`] mod
tracing-mock/src/expect.rs:184
↓ 93 callersMethodat_level
Sets the [`Level`](tracing::Level) to expect when matching a span. If an span is record with a level that differs from the one provided to this metho
tracing-mock/src/span.rs:475
↓ 87 callersMethodwith_value
Sets the value to expect when matching this field. If the recorded value for this field is different, the expectation will fail. # Examples ``` use
tracing-mock/src/field.rs:196
↓ 85 callersMethodnew_span
Adds an expectation that the creation of a span will be recorded next. This function accepts `Into<NewSpan>` instead of [`ExpectedSpan`] directly. [`
tracing-mock/src/layer.rs:478
↓ 83 callersMethodlock
(&self)
tracing-core/src/sync.rs:20
↓ 80 callersFunctionwith_default
(subscriber: S, f: impl FnOnce() -> T)
tracing/src/subscriber.rs:20
↓ 77 callersMethoddrop_span
(&self, id: span::Id)
tracing-core/src/dispatcher.rs:679
↓ 71 callersMethodwith_filter
(self, filter: FilterId)
tracing-subscriber/src/layer/context.rs:371
↓ 67 callersMethodexit
Adds an expectation that exiting a span matching the [`ExpectedSpan`] will be recorded next. As a span may be entered and exited multiple times, this
tracing-mock/src/layer.rs:637
↓ 61 callersFunctionevent
()
tracing-subscriber/tests/reload.rs:11
↓ 61 callersMethodset_default
(self)
tracing-subscriber/src/util.rs:41
↓ 60 callersMethodevent
(&self, _: &Event<'_>)
tracing-subscriber/tests/reload.rs:30
↓ 59 callersMethodwith_ancestry
Configures this `ExpectedSpan` to expect the specified [`ExpectedAncestry`]. A span's ancestry indicates whether it has a parent or is a root span and
tracing-mock/src/span.rs:707
↓ 53 callersFunctionevent
Create a new [`ExpectedEvent`]. For details on how to add additional assertions to the expected event, see the [`event`] module and the [`ExpectedEve
tracing-mock/src/expect.rs:87
↓ 53 callersMethodevent
Adds an expectation that an event matching the [`ExpectedEvent`] will be recorded next. The `event` can be a default mock which will match any event
tracing-mock/src/layer.rs:409
↓ 50 callersFunctionfmt
()
tracing-subscriber/src/fmt/mod.rs:324
↓ 43 callersFunctionspan
()
tracing/tests/macros.rs:31
↓ 41 callersMethodclone
(&self)
tracing-subscriber/src/filter/env/mod.rs:214
↓ 41 callersMethodwith_writer
Sets the [`MakeWriter`] that the subscriber being built will use to write events. # Examples Using `stderr` rather than `stdout`: ```rust use traci
tracing-subscriber/src/fmt/mod.rs:1057
↓ 40 callersMethodand_then
Composes this layer around the given `Layer`, returning a `Layered` struct implementing `Layer`. The returned `Layer` will call the methods on this `
tracing-subscriber/src/layer/mod.rs:1040
↓ 40 callersMethodfinish
Finish the builder, returning a new `FmtSubscriber`.
tracing-subscriber/src/fmt/mod.rs:486
↓ 38 callersMethodand
Adds an additional [`ExpectedField`] to be matched. Any fields introduced by `.and` must also match. If any fields are not present, or if the value f
tracing-mock/src/field.rs:255
↓ 38 callersMethodname
(&self)
tracing-mock/src/span.rs:791
↓ 37 callersMethodas_ref
(&self)
tracing-core/src/field.rs:830
↓ 36 callersMethodin_scope
Executes the given function in the context of this span. If this span is enabled, then this function enters the span, invokes `f` and then exits the
tracing/src/span.rs:1114
↓ 36 callersMethodtarget
(&self)
tracing-mock/src/span.rs:799
↓ 35 callersMethodas_ref
(&self)
tracing-subscriber/src/filter/env/field.rs:306
↓ 35 callersMethodget
Immutably borrows a type previously inserted into this `Extensions`.
tracing-subscriber/src/registry/extensions.rs:50
↓ 35 callersMethodparse
(s: &str, regex: bool)
tracing-subscriber/src/filter/env/field.rs:163
↓ 34 callersMethodentered
(self)
tracing/src/span.rs:910
↓ 34 callersMethoditer
(&self)
tracing-core/src/field.rs:914
↓ 33 callersMethodfield
Returns the [`Field`] named `name`, or `None` if no such field exists. [`Field`]: super::Field
tracing-core/src/field.rs:886
↓ 32 callersFunctionevent
()
tracing/tests/macros.rs:454
↓ 32 callersMethodevent
(&self, event: &Event<'_>)
tracing/tests/subscriber.rs:43
↓ 30 callersMethodclone
(&self)
tracing-subscriber/src/reload.rs:354
↓ 29 callersMethodnew_span
(&self, _: &Attributes<'_>)
tracing/tests/subscriber.rs:35
↓ 28 callersMethodlevel
(&self)
tracing-mock/src/span.rs:795
↓ 28 callersFunctionnamed
(name: impl std::fmt::Display)
tracing-mock/src/layer.rs:248
↓ 28 callersMethodwith_subscriber
Composes this `Layer` with the given [`Subscriber`], returning a `Layered` struct that implements [`Subscriber`]. The returned `Layered` subscriber w
tracing-subscriber/src/layer/mod.rs:1092
↓ 27 callersMethodenter
(&self, _: &Id)
tracing/tests/subscriber.rs:48
↓ 27 callersMethodpush
(&mut self, id: Id)
tracing-subscriber/src/registry/stack.rs:21
↓ 26 callersMethodexit
(&self, _: &Id)
tracing/tests/subscriber.rs:50
↓ 25 callersMethodwith_target
Sets whether or not an event's target is displayed.
tracing-subscriber/src/fmt/mod.rs:678
↓ 24 callersMethodinsert
Insert a type into this `Extensions`. Note that extensions are _not_ `Layer`-specific—they are _span_-specific. This means that other layers can acce
tracing-subscriber/src/registry/extensions.rs:87
↓ 23 callersMethodlen
Returns the number of fields that would be visited from this `Record` when [`Record::record()`] is called [`Record::record()`]: Record::record()
tracing-core/src/span.rs:234
↓ 22 callersFunctionget_default
(mut f: F)
tracing-core/src/dispatcher.rs:379
↓ 22 callersMethodin_scope
(self, spans: impl IntoIterator<Item = span::ExpectedSpan>)
tracing-mock/src/event.rs:520
↓ 22 callersMethodinit
()
tracing-log/src/log_tracer.rs:150
↓ 21 callersMethodclone
(&self)
tracing/src/span.rs:1544
↓ 21 callersMethodfields
Returns the set of all [fields] defined by this span's [`Metadata`]. Note that the [`FieldSet`] returned by this method includes *all* the fields dec
tracing-core/src/span.rs:210
↓ 21 callersMethodwith_max_level
Sets a global maximum level for `log` records. Log records whose level is more verbose than the provided level will be disabled. By default, all `lo
tracing-log/src/log_tracer.rs:221
↓ 20 callersMethodcallsite
(&self)
tracing-core/src/field.rs:808
↓ 20 callersMethodclone
(&self)
tracing-subscriber/src/layer/context.rs:424
↓ 20 callersFunctiondisplay
Wraps a type implementing `fmt::Display` as a `Value` that can be recorded using its `Display` implementation.
tracing-core/src/field.rs:368
↓ 20 callersMethodfinish
Completes serializing the visited object, returning `Ok(())` if all fields were serialized correctly, or `Error(S::Error)` if a field could not be ser
tracing-serde/src/lib.rs:378
↓ 20 callersFunctionhas_explicit_parent
Convenience function that returns [`ExpectedAncestry::HasExplicitParent`] with provided name.
tracing-mock/src/expect.rs:284
↓ 20 callersMethoditer
(&self)
tracing-subscriber/src/registry/stack.rs:42
↓ 20 callersMethodlevel
(&self)
tracing-subscriber/src/filter/directive.rs:267
↓ 18 callersMethodenter
(&self, id: &span::Id)
tracing-subscriber/src/fmt/mod.rs:415
↓ 18 callersFunctionhas_contextual_parent
Convenience function that returns [`ExpectedAncestry::HasContextualParent`] with provided name.
tracing-mock/src/expect.rs:273
↓ 18 callersMethoditer
Returns an iterator over the [target]-[`LevelFilter`] pairs in this filter. The order of iteration is undefined. # Examples ``` use tracing_subscri
tracing-subscriber/src/filter/targets.rs:360
↓ 18 callersMethodname
TODO: reference count these strings?
tracing-subscriber/src/filter/env/field.rs:159
↓ 18 callersFunctionparse_directives
(dirs: impl AsRef<str>)
tracing-subscriber/src/filter/env/directive.rs:487
↓ 17 callersFunctionnever
Creates a non-rolling file appender. The appender returned by `rolling::never` can be used with `non_blocking` to create a non-blocking, non-rotating
tracing-appender/src/rolling.rs:440
↓ 17 callersFunctionset_default
(dispatcher: &Dispatch)
tracing-core/src/dispatcher.rs:276
↓ 17 callersMethodwith_target
Sets the target to expect when matching a span. If an event is recorded with a target that doesn't match the provided target, this expectation will f
tracing-mock/src/span.rs:529
↓ 16 callersMethodfile
Returns the name of the source code file where the span occurred, or `None` if the file is unknown
tracing-core/src/metadata.rs:307
↓ 16 callersMethodis_empty
(&self)
tracing-subscriber/src/filter/directive.rs:53
↓ 16 callersMethodline
Returns the line number in the source code file where the span occurred, or `None` if the line number is unknown.
tracing-core/src/metadata.rs:313
↓ 16 callersMethodsubscriber
(&self)
tracing-core/src/dispatcher.rs:509
↓ 16 callersMethodvalue_set
(&'v self, values: &'v V)
tracing-core/src/field.rs:927
↓ 15 callersFunctionblock_on_future
(future: F)
tracing-test/src/lib.rs:52
↓ 15 callersMethodbuild
Builds a new [`RollingFileAppender`] with the configured parameters, emitting log files to the provided directory. Unlike [`RollingFileAppender::new`
tracing-appender/src/rolling/builder.rs:298
↓ 15 callersFunctiondebug
()
tracing-attributes/tests/levels.rs:12
↓ 15 callersMethodenter
(&self, _: &Id)
tracing-subscriber/tests/reload.rs:31
↓ 15 callersMethodinstrument
Instruments this type with the provided [`Span`], returning an [`Instrumented`] wrapper. If the instrumented type is a future, stream, or sink, the a
tracing-futures/src/lib.rs:155
↓ 14 callersMethodexit
(&self, _: &Id)
tracing-subscriber/tests/reload.rs:32
↓ 14 callersMethodfilter_map
(&self)
tracing-subscriber/src/filter/layer_filters/mod.rs:1247
↓ 14 callersFunctionmsg
Construct a new message [`ExpectedField`]. For details on how to set the value of the message field and how to expect multiple fields, see the [`fiel
tracing-mock/src/expect.rs:240
↓ 14 callersMethodor_else
Combines `self` with another type implementing [`MakeWriter`], returning a new [`MakeWriter`] that calls `other`'s [`make_writer`] if `self`'s `make_w
tracing-subscriber/src/fmt/writer.rs:486
↓ 14 callersFunctionrun_test
(span: NewSpan, fun: F)
tracing-attributes/tests/fields.rs:239
↓ 14 callersFunctionshave_all
(yaks: usize)
examples/examples/fmt/yak_shave.rs:30
↓ 14 callersMethodspan
Borrows the `Span` that this type is instrumented by.
tracing-futures/src/lib.rs:453
↓ 14 callersMethodwith_env_filter
( self, filter: impl Into<crate::EnvFilter>, )
tracing-subscriber/src/fmt/mod.rs:957
↓ 14 callersMethodwithout_time
Do not emit timestamps with log messages.
tracing-subscriber/src/fmt/mod.rs:563
↓ 13 callersFunctiondebug
()
tracing/tests/macros.rs:665
↓ 13 callersMethodget_string
(&self)
tracing-subscriber/src/fmt/mod.rs:1333
↓ 13 callersMethodinto_iter
(self)
tracing-core/src/field.rs:979
↓ 13 callersMethodis_none
(&self)
tracing/src/span.rs:1273
next →1–100 of 2,480, ranked by callers