Move imports to top

asonix/opentelemetry
Aode (Lion) 2022-01-06 10:26:17 -06:00
parent f253f0c8f2
commit f45a9d749a
1 changed files with 2 additions and 2 deletions

View File

@ -6,9 +6,11 @@ use crate::{
use actix::{Actor, Context, Handler, ResponseFuture};
use lemmy_db_schema::naive_now;
use lemmy_utils::ConnectionId;
use opentelemetry::trace::TraceContextExt;
use rand::Rng;
use serde::Serialize;
use tracing::{error, info};
use tracing_opentelemetry::OpenTelemetrySpanExt;
/// Make actor from `ChatServer`
impl Actor for ChatServer {
@ -69,8 +71,6 @@ fn root_span() -> tracing::Span {
trace_id = tracing::field::Empty,
);
{
use opentelemetry::trace::TraceContextExt;
use tracing_opentelemetry::OpenTelemetrySpanExt;
let trace_id = span.context().span().span_context().trace_id().to_hex();
span.record("trace_id", &tracing::field::display(trace_id));
}