Skip to main content

Finding

Struct Finding 

Source
pub struct Finding {
Show 16 fields pub finding_type: FindingType, pub severity: Severity, pub trace_id: String, pub service: String, pub source_endpoint: String, pub pattern: Pattern, pub suggestion: String, pub first_timestamp: String, pub last_timestamp: String, pub green_impact: Option<GreenImpact>, pub confidence: Confidence, pub classification_method: Option<ClassificationMethod>, pub code_location: Option<CodeLocation>, pub instrumentation_scopes: Vec<String>, pub suggested_fix: Option<SuggestedFix>, pub signature: String,
}
Expand description

A detected performance anti-pattern.

Fields§

§finding_type: FindingType

The anti-pattern category (N+1, redundant, slow, fanout, etc.).

§severity: Severity

Severity level: critical, warning or info.

§trace_id: String

Trace identifier where the anti-pattern was detected.

§service: String

Name of the service emitting the spans involved in the finding.

§source_endpoint: String

Normalized inbound endpoint (route template) hosting the pattern.

§pattern: Pattern

Details of the matched pattern: template, occurrences, window, params.

§suggestion: String

Human-readable remediation hint for this finding.

§first_timestamp: String

Earliest timestamp among spans in the detected group.

§last_timestamp: String

Latest timestamp among spans in the detected group.

§green_impact: Option<GreenImpact>

GreenOps impact estimate. Absent when green scoring is disabled.

§confidence: Confidence

Source context of this finding: CI batch run, staging daemon, or production daemon. Used by downstream consumers (perf-lint) to boost or reduce severity based on how the finding was produced.

Contract: detectors always emit Confidence::default() (= CiBatch); the real value is stamped by the pipeline caller (pipeline::analyze_with_traces for batch, daemon::process_traces for the daemon) after detection returns. This keeps the detector layer oblivious to runtime context.

§classification_method: Option<ClassificationMethod>

How this finding’s type was classified.

None (default, omitted from JSON) means direct classification via the standard pipeline rules (distinct_params >= threshold for N+1, repeated identical (template, params) for redundant). Some(SanitizerHeuristic) means the type was inferred via the sanitizer-aware heuristic, because the OpenTelemetry agent collapsed every parameter to ? and the standard distinct-params signal was unusable. Operators can filter on this field to spot where the heuristic is firing.

§code_location: Option<CodeLocation>

Source code location from OTel code.* span attributes. None when the instrumentation agent does not emit these attributes.

§instrumentation_scopes: Vec<String>

OpenTelemetry instrumentation scope chain from the originating span and its ancestors (leaf to root, deduplicated). Primary framework signal for [suggestions::enrich]. Empty when the upstream format carries no scope info (Jaeger, Zipkin) or the trace is synthetic.

§suggested_fix: Option<SuggestedFix>

Framework-specific actionable fix, populated by [suggestions::enrich] after the per-trace detectors run. None when no framework can be inferred or the (finding_type, framework) pair has no mapping in the fixes table.

§signature: String

Canonical signature for ack matching, e.g. n_plus_one_sql:order-svc:POST_/api/orders:a3f8b2c1. Always present in JSON output so users can copy-paste it into .perf-sentinel-acknowledgments.toml. Filled by crate::acknowledgments::enrich_with_signatures at end of pipeline::analyze and after deserializing baselines.

Trait Implementations§

Source§

impl Clone for Finding

Source§

fn clone(&self) -> Finding

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Finding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Finding

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Finding

Source§

fn eq(&self, other: &Finding) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Finding

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Finding

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more