witty-crayon-22786
11/16/2020, 9:06 PMwitty-crayon-22786
11/16/2020, 9:06 PMwitty-crayon-22786
11/16/2020, 9:07 PMerror
property will turn the span “red” it looks like: https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/trace-api-decorate-spans-attributeswitty-crayon-22786
11/16/2020, 9:07 PMhundreds-breakfast-49010
11/16/2020, 9:08 PMwitty-crayon-22786
11/16/2020, 9:08 PMhundreds-breakfast-49010
11/16/2020, 9:09 PMhundreds-breakfast-49010
11/16/2020, 9:10 PMwitty-crayon-22786
11/16/2020, 9:10 PMhundreds-breakfast-49010
11/16/2020, 9:10 PMhundreds-breakfast-49010
11/16/2020, 9:10 PMwitty-crayon-22786
11/16/2020, 9:10 PMwitty-crayon-22786
11/16/2020, 9:43 PMwith_workunit
have a variant that expects a Result
, and can add that information to the workunit automatically…?witty-crayon-22786
11/16/2020, 9:45 PMpub async fn with_result_workunit<F, M>(
workunit_store: WorkunitStore,
name: String,
initial_metadata: WorkunitMetadata,
f: F,
final_metadata_fn: M,
) -> F::Output
where
E: Display,
F: Future<Output=Result<T, E>>,
M: for<'a> FnOnce(&'a F::Output, WorkunitMetadata) -> WorkunitMetadata,
{
witty-crayon-22786
11/16/2020, 9:45 PMwitty-crayon-22786
11/16/2020, 9:45 PMhundreds-breakfast-49010
11/16/2020, 10:00 PMhundreds-breakfast-49010
11/16/2020, 10:00 PMwitty-crayon-22786
11/16/2020, 10:03 PMhundreds-breakfast-49010
11/16/2020, 10:06 PMWorkunitMetadata
hundreds-breakfast-49010
11/16/2020, 10:06 PMwith_result_workunit
that uses the existing with_workunit
to do this, but I'm not sure that gets us anythingwitty-crayon-22786
11/16/2020, 10:06 PMhundreds-breakfast-49010
11/16/2020, 10:07 PMfinal_metadata_fn
to ony update the level and make no other changes, that seems like a reasonable shorthand to addwitty-crayon-22786
11/16/2020, 10:07 PMhundreds-breakfast-49010
11/16/2020, 10:07 PMlevel
workunit aware method in pythonhundreds-breakfast-49010
11/16/2020, 10:08 PMwith_workunit
in some waywitty-crayon-22786
11/16/2020, 10:37 PMwitty-crayon-22786
11/16/2020, 10:38 PMhundreds-breakfast-49010
11/16/2020, 10:47 PMwith_workunit
in the processwitty-crayon-22786
11/16/2020, 10:53 PMwitty-crayon-22786
11/16/2020, 10:54 PM