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: FindingTypeThe anti-pattern category (N+1, redundant, slow, fanout, etc.).
severity: SeveritySeverity level: critical, warning or info.
trace_id: StringTrace identifier where the anti-pattern was detected.
service: StringName of the service emitting the spans involved in the finding.
source_endpoint: StringNormalized inbound endpoint (route template) hosting the pattern.
pattern: PatternDetails of the matched pattern: template, occurrences, window, params.
suggestion: StringHuman-readable remediation hint for this finding.
first_timestamp: StringEarliest timestamp among spans in the detected group.
last_timestamp: StringLatest timestamp among spans in the detected group.
green_impact: Option<GreenImpact>GreenOps impact estimate. Absent when green scoring is disabled.
confidence: ConfidenceSource 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: StringCanonical 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<'de> Deserialize<'de> for Finding
impl<'de> Deserialize<'de> for Finding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Finding
Auto Trait Implementations§
impl Freeze for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request