Skip to content

Commit

Permalink
Unify trace messages (#1390)
Browse files Browse the repository at this point in the history
  • Loading branch information
spetz authored Dec 14, 2024
1 parent 26d6d45 commit f92b360
Show file tree
Hide file tree
Showing 41 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "server"
version = "0.4.85"
version = "0.4.86"
edition = "2021"
build = "src/build.rs"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use iggy::consumer_groups::create_consumer_group::CreateConsumerGroup;
use iggy::error::IggyError;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
#[instrument(skip_all, name = "trace_create_consumer_group", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
pub async fn handle(
command: CreateConsumerGroup,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::consumer_groups::delete_consumer_group::DeleteConsumerGroup;
use iggy::error::IggyError;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
#[instrument(skip_all, name = "trace_delete_consumer_group", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
pub async fn handle(
command: DeleteConsumerGroup,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use iggy::consumer_groups::join_consumer_group::JoinConsumerGroup;
use iggy::error::IggyError;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string(), iggy_group_id = command.group_id.as_string()))]
#[instrument(skip_all, name = "trace_join_consumer_group", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string(), iggy_group_id = command.group_id.as_string()))]
pub async fn handle(
command: JoinConsumerGroup,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use iggy::consumer_groups::leave_consumer_group::LeaveConsumerGroup;
use iggy::error::IggyError;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string(), iggy_group_id = command.group_id.as_string()))]
#[instrument(skip_all, name = "trace_leave_consumer_group", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string(), iggy_group_id = command.group_id.as_string()))]
pub async fn handle(
command: LeaveConsumerGroup,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use iggy::error::IggyError;
use iggy::messages::flush_unsaved_buffer::FlushUnsavedBuffer;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string(), iggy_partition_id = command.partition_id, iggy_fsync = command.fsync))]
#[instrument(skip_all, name = "trace_flush_unsaved_buffer", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string(), iggy_partition_id = command.partition_id, iggy_fsync = command.fsync))]
pub async fn handle(
command: FlushUnsavedBuffer,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::partitions::create_partitions::CreatePartitions;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
#[instrument(skip_all, name = "trace_create_partitions", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
pub async fn handle(
command: CreatePartitions,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::partitions::delete_partitions::DeletePartitions;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
#[instrument(skip_all, name = "trace_delete_partitions", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
pub async fn handle(
command: DeletePartitions,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use iggy::error::IggyError;
use iggy::personal_access_tokens::create_personal_access_token::CreatePersonalAccessToken;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_create_personal_access_token", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: CreatePersonalAccessToken,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::personal_access_tokens::delete_personal_access_token::DeletePersonalAccessToken;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_delete_personal_access_token", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: DeletePersonalAccessToken,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::personal_access_tokens::login_with_personal_access_token::LoginWithPersonalAccessToken;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_login_with_personal_access_token", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: LoginWithPersonalAccessToken,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use iggy::error::IggyError;
use iggy::streams::create_stream::CreateStream;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_create_stream", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: CreateStream,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::streams::delete_stream::DeleteStream;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
#[instrument(skip_all, name = "trace_delete_stream", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
pub async fn handle(
command: DeleteStream,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/streams/purge_stream_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::streams::purge_stream::PurgeStream;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
#[instrument(skip_all, name = "trace_purge_stream", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
pub async fn handle(
command: PurgeStream,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::streams::update_stream::UpdateStream;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
#[instrument(skip_all, name = "trace_update_stream", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
pub async fn handle(
command: UpdateStream,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/topics/create_topic_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use iggy::error::IggyError;
use iggy::topics::create_topic::CreateTopic;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
#[instrument(skip_all, name = "trace_create_topic", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string()))]
pub async fn handle(
mut command: CreateTopic,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/topics/delete_topic_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::topics::delete_topic::DeleteTopic;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
#[instrument(skip_all, name = "trace_delete_topic", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
pub async fn handle(
command: DeleteTopic,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/topics/purge_topic_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::topics::purge_topic::PurgeTopic;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
#[instrument(skip_all, name = "trace_purge_topic", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
pub async fn handle(
command: PurgeTopic,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/topics/update_topic_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::topics::update_topic::UpdateTopic;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
#[instrument(skip_all, name = "trace_update_topic", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id, iggy_stream_id = command.stream_id.as_string(), iggy_topic_id = command.topic_id.as_string()))]
pub async fn handle(
mut command: UpdateTopic,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use iggy::error::IggyError;
use iggy::users::change_password::ChangePassword;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_change_password", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: ChangePassword,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/users/create_user_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use iggy::error::IggyError;
use iggy::users::create_user::CreateUser;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_create_user", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: CreateUser,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/users/delete_user_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::users::delete_user::DeleteUser;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_delete_user", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: DeleteUser,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/users/login_user_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::users::login_user::LoginUser;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_login_user", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: LoginUser,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/users/logout_user_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use iggy::error::IggyError;
use iggy::users::logout_user::LogoutUser;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_logout_user", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: LogoutUser,
sender: &mut dyn Sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::users::update_permissions::UpdatePermissions;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_update_permissions", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: UpdatePermissions,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/binary/handlers/users/update_user_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use iggy::error::IggyError;
use iggy::users::update_user::UpdateUser;
use tracing::{debug, instrument};

#[instrument(skip_all, fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
#[instrument(skip_all, name = "trace_update_user", fields(iggy_user_id = session.get_user_id(), iggy_client_id = session.client_id))]
pub async fn handle(
command: UpdateUser,
sender: &mut dyn Sender,
Expand Down
2 changes: 1 addition & 1 deletion server/src/channels/commands/archive_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl StateArchiver {

#[async_trait]
impl ServerCommand<ArchiveStateCommand> for ArchiveStateExecutor {
#[instrument(skip_all)]
#[instrument(skip_all, name = "trace_archive_state")]
async fn execute(&mut self, system: &SharedSystem, command: ArchiveStateCommand) {
let system = system.read().await;
if system.archiver.is_none() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl PersonalAccessTokenCleaner {

#[async_trait]
impl ServerCommand<CleanPersonalAccessTokensCommand> for CleanPersonalAccessTokensExecutor {
#[instrument(skip_all)]
#[instrument(skip_all, name = "trace_clean_personal_access_tokens")]
async fn execute(&mut self, system: &SharedSystem, _command: CleanPersonalAccessTokensCommand) {
// TODO: System write lock, investigate if it's necessary.
let mut system = system.write().await;
Expand Down
2 changes: 1 addition & 1 deletion server/src/channels/commands/maintain_messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl MessagesMaintainer {

#[async_trait]
impl ServerCommand<MaintainMessagesCommand> for MaintainMessagesExecutor {
#[instrument(skip_all)]
#[instrument(skip_all, name = "trace_maintain_messages")]
async fn execute(&mut self, system: &SharedSystem, command: MaintainMessagesCommand) {
let system = system.read().await;
let streams = system.get_streams();
Expand Down
2 changes: 1 addition & 1 deletion server/src/channels/commands/save_messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl MessagesSaver {

#[async_trait]
impl ServerCommand<SaveMessagesCommand> for SaveMessagesExecutor {
#[instrument(skip_all)]
#[instrument(skip_all, name = "trace_save_messages")]
async fn execute(&mut self, system: &SharedSystem, _command: SaveMessagesCommand) {
let saved_messages_count = system.read().await.persist_messages().await;
match saved_messages_count {
Expand Down
2 changes: 1 addition & 1 deletion server/src/channels/commands/verify_heartbeats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl VerifyHeartbeats {

#[async_trait]
impl ServerCommand<VerifyHeartbeatsCommand> for VerifyHeartbeatsExecutor {
#[instrument(skip_all)]
#[instrument(skip_all, name = "trace_verify_heartbeats")]
async fn execute(&mut self, system: &SharedSystem, command: VerifyHeartbeatsCommand) {
let system = system.read().await;
let clients;
Expand Down
4 changes: 2 additions & 2 deletions server/src/http/consumer_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async fn get_consumer_groups(
Ok(Json(consumer_groups))
}

#[instrument(skip_all, fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id))]
#[instrument(skip_all, name = "trace_create_consumer_group", fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id))]
async fn create_consumer_group(
State(state): State<Arc<AppState>>,
Extension(identity): Extension<Identity>,
Expand Down Expand Up @@ -106,7 +106,7 @@ async fn create_consumer_group(
Ok((StatusCode::CREATED, Json(consumer_group_details)))
}

#[instrument(skip_all, fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id, iggy_group_id = group_id))]
#[instrument(skip_all, name = "trace_delete_consumer_group", fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id, iggy_group_id = group_id))]
async fn delete_consumer_group(
State(state): State<Arc<AppState>>,
Extension(identity): Extension<Identity>,
Expand Down
2 changes: 1 addition & 1 deletion server/src/http/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async fn send_messages(
Ok(StatusCode::CREATED)
}

#[instrument(skip_all, fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id, iggy_partition_id = partition_id, iggy_fsync = fsync))]
#[instrument(skip_all, name = "trace_flush_unsaved_buffer", fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id, iggy_partition_id = partition_id, iggy_fsync = fsync))]
async fn flush_unsaved_buffer(
State(state): State<Arc<AppState>>,
Extension(identity): Extension<Identity>,
Expand Down
4 changes: 2 additions & 2 deletions server/src/http/partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn router(state: Arc<AppState>) -> Router {
.with_state(state)
}

#[instrument(skip_all, fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id))]
#[instrument(skip_all, name = "trace_create_partitions", fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id))]
async fn create_partitions(
State(state): State<Arc<AppState>>,
Extension(identity): Extension<Identity>,
Expand Down Expand Up @@ -53,7 +53,7 @@ async fn create_partitions(
Ok(StatusCode::CREATED)
}

#[instrument(skip_all, fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id))]
#[instrument(skip_all, name = "trace_delete_partitions", fields(iggy_user_id = identity.user_id, iggy_stream_id = stream_id, iggy_topic_id = topic_id))]
async fn delete_partitions(
State(state): State<Arc<AppState>>,
Extension(identity): Extension<Identity>,
Expand Down
6 changes: 3 additions & 3 deletions server/src/http/personal_access_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async fn get_personal_access_tokens(
Ok(Json(personal_access_tokens))
}

#[instrument(skip_all, fields(iggy_user_id = identity.user_id))]
#[instrument(skip_all, name = "trace_create_personal_access_token", fields(iggy_user_id = identity.user_id))]
async fn create_personal_access_token(
State(state): State<Arc<AppState>>,
Extension(identity): Extension<Identity>,
Expand Down Expand Up @@ -83,7 +83,7 @@ async fn create_personal_access_token(
Ok(Json(RawPersonalAccessToken { token }))
}

#[instrument(skip_all, fields(iggy_user_id = identity.user_id))]
#[instrument(skip_all, name = "trace_delete_personal_access_token", fields(iggy_user_id = identity.user_id))]
async fn delete_personal_access_token(
State(state): State<Arc<AppState>>,
Extension(identity): Extension<Identity>,
Expand All @@ -110,7 +110,7 @@ async fn delete_personal_access_token(
Ok(StatusCode::NO_CONTENT)
}

#[instrument(skip_all)]
#[instrument(skip_all, name = "trace_login_with_personal_access_token")]
async fn login_with_personal_access_token(
State(state): State<Arc<AppState>>,
Json(command): Json<LoginWithPersonalAccessToken>,
Expand Down
Loading

0 comments on commit f92b360

Please sign in to comment.