Skip to main content

TraceSqlLogic

Trait TraceSqlLogic 

Source
pub trait TraceSqlLogic {
    // Provided methods
    fn insert_span_batch<'life0, 'life1, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
        spans: &'life1 [TraceSpanRecord],
    ) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn insert_trace_baggage_batch<'life0, 'life1, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
        baggage: &'life1 [TraceBaggageRecord],
    ) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn get_trace_baggage_records<'life0, 'life1, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
        trace_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceBaggageRecord>, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn get_paginated_traces<'life0, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
        filters: TraceFilters,
    ) -> Pin<Box<dyn Future<Output = Result<TracePaginationResponse, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait { ... }
    fn get_trace_spans<'life0, 'life1, 'life2, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
        trace_id: &'life1 str,
        service_name: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceSpan>, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn get_trace_metrics<'life0, 'life1, 'life2, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
        service_name: Option<&'life1 str>,
        start_time: DateTime<Utc>,
        end_time: DateTime<Utc>,
        bucket_interval_str: &'life2 str,
        attribute_filters: Option<Vec<String>>,
        entity_uid: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceMetricBucket>, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn refresh_trace_summary<'life0, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
    ) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait { ... }
    fn get_spans_from_tags<'life0, 'life1, 'life2, 'async_trait>(
        pool: &'life0 Pool<Postgres>,
        entity_type: &'life1 str,
        tag_filters: Vec<HashMap<String, String>>,
        match_all: bool,
        service_name: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceSpan>, SqlError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Provided Methods§

Source

fn insert_span_batch<'life0, 'life1, 'async_trait>( pool: &'life0 Pool<Postgres>, spans: &'life1 [TraceSpanRecord], ) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to insert multiple trace span records into the database in a batch.

§Arguments
  • pool - The database connection pool
  • spans - The trace span records to insert
Source

fn insert_trace_baggage_batch<'life0, 'life1, 'async_trait>( pool: &'life0 Pool<Postgres>, baggage: &'life1 [TraceBaggageRecord], ) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to insert multiple trace baggage records into the database in a batch.

§Arguments
  • pool - The database connection pool
  • baggage - The trace baggage records to insert
Source

fn get_trace_baggage_records<'life0, 'life1, 'async_trait>( pool: &'life0 Pool<Postgres>, trace_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceBaggageRecord>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait,

Attempts to retrieve trace baggage records for a given trace ID.

§Arguments
  • pool - The database connection pool
  • trace_id - The trace ID to retrieve baggage for. This is always the hex encoded id
§Returns
  • A vector of TraceBaggageRecord associated with the trace ID
Source

fn get_paginated_traces<'life0, 'async_trait>( pool: &'life0 Pool<Postgres>, filters: TraceFilters, ) -> Pin<Box<dyn Future<Output = Result<TracePaginationResponse, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,

Attempts to retrieve paginated trace records from the database based on provided filters.

§Arguments
  • pool - The database connection pool
  • filters - The filters to apply for retrieving traces
§Returns
  • A vector of TraceListItem matching the filters
Source

fn get_trace_spans<'life0, 'life1, 'life2, 'async_trait>( pool: &'life0 Pool<Postgres>, trace_id: &'life1 str, service_name: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceSpan>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Attempts to retrieve trace spans for a given trace ID.

§Arguments
  • pool - The database connection pool
  • trace_id - The trace ID to retrieve spans for
§Returns
  • A vector of TraceSpan associated with the trace ID
Source

fn get_trace_metrics<'life0, 'life1, 'life2, 'async_trait>( pool: &'life0 Pool<Postgres>, service_name: Option<&'life1 str>, start_time: DateTime<Utc>, end_time: DateTime<Utc>, bucket_interval_str: &'life2 str, attribute_filters: Option<Vec<String>>, entity_uid: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceMetricBucket>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Attempts to retrieve trace spans for a given trace ID.

§Arguments
  • pool - The database connection pool
  • trace_id - The trace ID to retrieve spans for
§Returns
  • A vector of TraceSpan associated with the trace ID
Source

fn refresh_trace_summary<'life0, 'async_trait>( pool: &'life0 Pool<Postgres>, ) -> Pin<Box<dyn Future<Output = Result<PgQueryResult, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait,

Source

fn get_spans_from_tags<'life0, 'life1, 'life2, 'async_trait>( pool: &'life0 Pool<Postgres>, entity_type: &'life1 str, tag_filters: Vec<HashMap<String, String>>, match_all: bool, service_name: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<TraceSpan>, SqlError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Attempts to retrieve trace spans based on tag filters.

§Arguments
  • pool - The database connection pool
  • entity_type - The entity type to filter spans
  • tag_filters - The tag filters to apply
  • match_all - Whether to match all tags or any
  • service_name - Optional service name to filter spans
§Returns
  • A vector of TraceSpan matching the tag filters

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§