mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-06-11 19:03:21 +02:00
tracing more data
This commit is contained in:
@ -252,11 +252,11 @@ where
|
||||
{
|
||||
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest {
|
||||
let dropped = match (metadata.name(), metadata.target()) {
|
||||
(_, "executor::task") | ("runtime.spawn", _) => {
|
||||
(_, TaskVisitor::SPAWN_TARGET) | (TaskVisitor::SPAWN_NAME, _) => {
|
||||
self.spawn_callsites.insert(metadata);
|
||||
&self.shared.dropped_tasks
|
||||
}
|
||||
(_, "executor::waker") => {
|
||||
(WakerVisitor::WAKE_TARGET, _) => {
|
||||
self.waker_callsites.insert(metadata);
|
||||
&self.shared.dropped_tasks
|
||||
}
|
||||
@ -268,7 +268,7 @@ where
|
||||
self.async_op_callsites.insert(metadata);
|
||||
&self.shared.dropped_async_ops
|
||||
}
|
||||
("runtime.resource.async_op.poll", _) => {
|
||||
(AsyncOpVisitor::ASYNC_OP_POLL_NAME, _) => {
|
||||
self.async_op_poll_callsites.insert(metadata);
|
||||
&self.shared.dropped_async_ops
|
||||
}
|
||||
|
@ -97,9 +97,6 @@ impl Server {
|
||||
pub async fn serve(
|
||||
mut self, /*, incoming: I */
|
||||
) -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
|
||||
// TODO: Spawn two tasks; the aggregator that's collecting stats, aggregating and
|
||||
// collating them and the server task doing the tonic gRPC stuff
|
||||
|
||||
let svc = InstrumentServer::new(self);
|
||||
|
||||
tonic::transport::Server::builder()
|
||||
|
@ -240,6 +240,9 @@ impl FieldVisitor {
|
||||
}
|
||||
|
||||
impl TaskVisitor {
|
||||
pub(crate) const SPAWN_TARGET: &'static str = "executor::task";
|
||||
pub(crate) const SPAWN_NAME: &'static str = "runtime.spawn";
|
||||
|
||||
pub(crate) fn new(meta_id: console_api::MetaId) -> Self {
|
||||
TaskVisitor {
|
||||
field_visitor: FieldVisitor::new(meta_id),
|
||||
@ -340,6 +343,7 @@ impl Visit for FieldVisitor {
|
||||
|
||||
impl AsyncOpVisitor {
|
||||
pub(crate) const ASYNC_OP_SPAN_NAME: &'static str = "runtime.resource.async_op";
|
||||
pub(crate) const ASYNC_OP_POLL_NAME: &'static str = "runtime.resource.async_op.poll";
|
||||
const ASYNC_OP_SRC_FIELD_NAME: &'static str = "source";
|
||||
|
||||
pub(crate) fn result(self) -> Option<(String, bool)> {
|
||||
@ -365,6 +369,8 @@ impl Visit for AsyncOpVisitor {
|
||||
}
|
||||
|
||||
impl WakerVisitor {
|
||||
pub(crate) const WAKE_TARGET: &'static str = "executor::waker";
|
||||
|
||||
const WAKE: &'static str = "waker.wake";
|
||||
const WAKE_BY_REF: &'static str = "waker.wake_by_ref";
|
||||
const CLONE: &'static str = "waker.clone";
|
||||
|
Reference in New Issue
Block a user