truncate other span names and fields
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5f46623371
commit
7eee88160a
2 changed files with 5 additions and 10 deletions
|
@ -8,7 +8,7 @@ use data::Data;
|
||||||
use ruma::{api::client::error::ErrorKind, EventId, RoomId};
|
use ruma::{api::client::error::ErrorKind, EventId, RoomId};
|
||||||
use tracing::{debug, error, trace, warn};
|
use tracing::{debug, error, trace, warn};
|
||||||
|
|
||||||
use crate::{services, utils::debug_slice_truncated, Error, Result};
|
use crate::{services, Error, Result};
|
||||||
|
|
||||||
pub struct Service {
|
pub struct Service {
|
||||||
pub db: Arc<dyn Data>,
|
pub db: Arc<dyn Data>,
|
||||||
|
@ -30,7 +30,7 @@ impl Service {
|
||||||
.filter_map(move |sid| services().rooms.short.get_eventid_from_short(sid).ok()))
|
.filter_map(move |sid| services().rooms.short.get_eventid_from_short(sid).ok()))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(skip(self), fields(starting_events = debug_slice_truncated(starting_events, 5)))]
|
#[tracing::instrument(skip_all, name = "auth_chain")]
|
||||||
pub async fn get_auth_chain(&self, room_id: &RoomId, starting_events: &[&EventId]) -> Result<Vec<u64>> {
|
pub async fn get_auth_chain(&self, room_id: &RoomId, starting_events: &[&EventId]) -> Result<Vec<u64>> {
|
||||||
const NUM_BUCKETS: usize = 50; //TODO: change possible w/o disrupting db?
|
const NUM_BUCKETS: usize = 50; //TODO: change possible w/o disrupting db?
|
||||||
const BUCKET: BTreeSet<(u64, &EventId)> = BTreeSet::new();
|
const BUCKET: BTreeSet<(u64, &EventId)> = BTreeSet::new();
|
||||||
|
|
|
@ -541,7 +541,7 @@ async fn send_events_dest_push(
|
||||||
|
|
||||||
#[tracing::instrument(skip(dest, events), name = "")]
|
#[tracing::instrument(skip(dest, events), name = "")]
|
||||||
async fn send_events_dest_normal(
|
async fn send_events_dest_normal(
|
||||||
dest: &Destination, server_name: &OwnedServerName, events: Vec<SendingEvent>,
|
dest: &Destination, server: &OwnedServerName, events: Vec<SendingEvent>,
|
||||||
) -> SendingResult {
|
) -> SendingResult {
|
||||||
let mut edu_jsons = Vec::new();
|
let mut edu_jsons = Vec::new();
|
||||||
let mut pdu_jsons = Vec::new();
|
let mut pdu_jsons = Vec::new();
|
||||||
|
@ -557,12 +557,7 @@ async fn send_events_dest_normal(
|
||||||
.get_pdu_json_from_id(pdu_id)
|
.get_pdu_json_from_id(pdu_id)
|
||||||
.map_err(|e| (dest.clone(), e))?
|
.map_err(|e| (dest.clone(), e))?
|
||||||
.ok_or_else(|| {
|
.ok_or_else(|| {
|
||||||
error!(
|
error!(?dest, ?server, ?pdu_id, "event not found");
|
||||||
dest = ?dest,
|
|
||||||
server_name = ?server_name,
|
|
||||||
pdu_id = ?pdu_id,
|
|
||||||
"event not found"
|
|
||||||
);
|
|
||||||
(
|
(
|
||||||
dest.clone(),
|
dest.clone(),
|
||||||
Error::bad_database("[Normal] Event in servernameevent_data not found in db."),
|
Error::bad_database("[Normal] Event in servernameevent_data not found in db."),
|
||||||
|
@ -587,7 +582,7 @@ async fn send_events_dest_normal(
|
||||||
// transaction");
|
// transaction");
|
||||||
send::send(
|
send::send(
|
||||||
client,
|
client,
|
||||||
server_name,
|
server,
|
||||||
send_transaction_message::v1::Request {
|
send_transaction_message::v1::Request {
|
||||||
origin: services().globals.server_name().to_owned(),
|
origin: services().globals.server_name().to_owned(),
|
||||||
pdus: pdu_jsons,
|
pdus: pdu_jsons,
|
||||||
|
|
Loading…
Add table
Reference in a new issue