Skip to content

Commit 9d3934a

Browse files
committed
removed spans for handle
1 parent d2b4529 commit 9d3934a

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88
]
99

1010
[workspace.dependencies]
11-
tokio = { version = "1.35.0", features = ["sync", "time", "rt", "macros"] }
11+
tokio = { version = "1.35.0", features = ["net", "sync", "time", "rt", "macros"] }
1212
futures = "0.3"
1313

1414
# errors

src/uactor/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "uactor"
3-
version = "0.10.1"
3+
version = "0.10.3"
44
edition = "2021"
55
repository = "https://github.com/EnvOut/uactor"
66
license = "MIT"
@@ -23,7 +23,7 @@ rand = "0.8"
2323
tracing-subscriber = { version = "0.3" }
2424
anyhow = "1"
2525
time = "0.3"
26-
tokio = { version = "1.35.1", features = ["full"] }
26+
tokio.workspace = true
2727

2828
[[example]]
2929
name = "base_sample"

src/uactor/src/actor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ pub type EmptyState = ();
113113
/// use uactor::actor::{Actor, HandleResult};
114114
/// use uactor::context::Context;
115115
/// use uactor::system::System;
116+
/// use uactor::actor::EmptyState;
116117
/// let mut system = System::global().build();
117118
/// pub struct Actor1;
118119
/// impl Actor for Actor1 { type Context = Context; type Inject = (); }
@@ -122,7 +123,7 @@ pub type EmptyState = ();
122123
/// pub struct Ping;
123124
/// impl Message for Ping { fn static_name() -> &'static str { "Ping" } }
124125
/// impl uactor::actor::Handler<Ping> for Actor1 { async fn handle(&mut self, inject: &mut Self::Inject, msg: Ping, ctx: &mut Self::Context) -> HandleResult { todo!() } }
125-
/// uactor::generate_actor_ref!(Actor1, { });
126+
/// uactor::generate_actor_ref!(Actor1, { }, EmptyState);
126127
/// ```
127128
/// let (mut actor1_ref, handle) = uactor::spawn_with_ref!(system, actor1: Actor1);
128129
#[macro_export]

src/uactor/src/datasource.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::net::{Ipv4Addr, SocketAddrV4};
22
use tokio::net::{TcpListener, TcpStream};
3-
use tokio::net::unix::SocketAddr;
4-
use crate::message::IntervalMessage;
53
use tokio::sync::{broadcast, mpsc, oneshot, watch};
64
use tokio::time::Interval;
75

6+
use crate::message::IntervalMessage;
7+
88
pub type DataSourceResult<T> = Result<T, DataSourceErrors>;
99

1010
#[derive(thiserror::Error, Debug)]

src/uactor/src/select.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ mod select_from_tuple {
6464
// let message_name = <S1 as DataSource>::Item::static_name();
6565
let message_name: &'static str = type_name::<<S1 as DataSource>::Item>();
6666
if let Ok(msg) = self.next().await {
67-
let mut span = tracing::span!(tracing::Level::INFO, "Actor::handle", actor.name = ctx.get_name(), actor.message = message_name);
68-
let _enter = span.enter();
6967
let _ = actor.handle(inject, msg, ctx).await?;
7068
} else {
7169
tracing::error!("Channel closed");

0 commit comments

Comments
 (0)