reduce unnecessary info-level spans to debug

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-12-24 01:07:53 +00:00 committed by strawberry
parent 7a6d657558
commit a407909d09
4 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@ static CORES_AVAILABLE: LazyLock<u128> = LazyLock::new(|| {
.unwrap_or_default() .unwrap_or_default()
.into_iter() .into_iter()
.map(|core_id| core_id.id) .map(|core_id| core_id.id)
.inspect(|&id| assert!(id < 128, "Core ID must be < 128 at least for now")) .inspect(|&id| debug_assert!(id < 128, "Core ID must be < 128 at least for now"))
.fold(0_u128, |mask, id| mask | (1 << id)) .fold(0_u128, |mask, id| mask | (1 << id))
}); });

View file

@ -45,7 +45,7 @@ impl super::Service {
/// Implemented according to the specification at <https://matrix.org/docs/spec/server_server/r0.1.4#resolving-server-names> /// Implemented according to the specification at <https://matrix.org/docs/spec/server_server/r0.1.4#resolving-server-names>
/// Numbers in comments below refer to bullet points in linked section of /// Numbers in comments below refer to bullet points in linked section of
/// specification /// specification
#[tracing::instrument(skip_all, name = "actual")] #[tracing::instrument(skip(self, cache), name = "actual")]
pub async fn resolve_actual_dest( pub async fn resolve_actual_dest(
&self, &self,
dest: &ServerName, dest: &ServerName,
@ -298,7 +298,7 @@ impl super::Service {
} }
} }
#[tracing::instrument(skip_all, name = "ip")] #[tracing::instrument(skip(self, overname, port), name = "ip")]
async fn query_and_cache_override( async fn query_and_cache_override(
&self, &self,
overname: &'_ str, overname: &'_ str,

View file

@ -859,7 +859,7 @@ impl Service {
/// Creates a new persisted data unit and adds it to a room. This function /// Creates a new persisted data unit and adds it to a room. This function
/// takes a roomid_mutex_state, meaning that only this function is able to /// takes a roomid_mutex_state, meaning that only this function is able to
/// mutate the room state. /// mutate the room state.
#[tracing::instrument(skip(self, state_lock))] #[tracing::instrument(skip(self, state_lock), level = "debug")]
pub async fn build_and_append_pdu( pub async fn build_and_append_pdu(
&self, &self,
pdu_builder: PduBuilder, pdu_builder: PduBuilder,
@ -1082,7 +1082,7 @@ impl Service {
self.replace_pdu(&pdu_id, &obj, &pdu).await self.replace_pdu(&pdu_id, &obj, &pdu).await
} }
#[tracing::instrument(skip(self))] #[tracing::instrument(skip(self), level = "debug")]
pub async fn backfill_if_required(&self, room_id: &RoomId, from: PduCount) -> Result<()> { pub async fn backfill_if_required(&self, room_id: &RoomId, from: PduCount) -> Result<()> {
if self if self
.services .services
@ -1194,7 +1194,7 @@ impl Service {
Ok(()) Ok(())
} }
#[tracing::instrument(skip(self, pdu))] #[tracing::instrument(skip(self, pdu), level = "debug")]
pub async fn backfill_pdu(&self, origin: &ServerName, pdu: Box<RawJsonValue>) -> Result<()> { pub async fn backfill_pdu(&self, origin: &ServerName, pdu: Box<RawJsonValue>) -> Result<()> {
let (event_id, value, room_id) = let (event_id, value, room_id) =
self.services.event_handler.parse_incoming_pdu(&pdu).await?; self.services.event_handler.parse_incoming_pdu(&pdu).await?;

View file

@ -277,7 +277,7 @@ impl Service {
} }
/// Sends a request to a federation server /// Sends a request to a federation server
#[tracing::instrument(skip_all, name = "request")] #[tracing::instrument(skip_all, name = "request", level = "debug")]
pub async fn send_federation_request<T>( pub async fn send_federation_request<T>(
&self, &self,
dest: &ServerName, dest: &ServerName,
@ -291,7 +291,7 @@ impl Service {
} }
/// Like send_federation_request() but with a very large timeout /// Like send_federation_request() but with a very large timeout
#[tracing::instrument(skip_all, name = "synapse")] #[tracing::instrument(skip_all, name = "synapse", level = "debug")]
pub async fn send_synapse_request<T>( pub async fn send_synapse_request<T>(
&self, &self,
dest: &ServerName, dest: &ServerName,