signals: restore the pre-port flag marker emoji (🚩) (#913)

* signals: restore the pre-port flag marker emoji

#903 inadvertently replaced the legacy FLAG_MARKER (U+1F6A9, '🚩') with
'[!]', which broke any downstream dashboard / alert that searches span
names for the flag emoji. Restores the original marker and updates the
#910 docs pass to match.

- crates/brightstaff/src/signals/analyzer.rs: FLAG_MARKER back to
  "\\u{1F6A9}" with a comment noting the backwards-compatibility
  reason so it doesn't drift again.
- docs/source/concepts/signals.rst and docs/source/guides/observability/
  tracing.rst: swap every '[!]' reference (subheading text, example
  span name, tip box, dashboard query hint) back to 🚩.

Verified: cargo test -p brightstaff --lib (162 passed, 1 ignored);
sphinx-build clean on both files; rendered HTML shows 🚩 in all
flag-marker references.

Made-with: Cursor

* fix: silence manual_checked_ops clippy lint (rustc 1.95)

Pre-existing warning in router/stress_tests.rs that becomes an error
under CI's -D warnings with rustc 1.95. Replace the manual if/else
with growth.checked_div(num_iterations).unwrap_or(0) as clippy
suggests.

Made-with: Cursor
This commit is contained in:
Syed A. Hashmi 2026-04-24 13:54:53 -07:00 committed by GitHub
parent 897fda2deb
commit dafd245332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 14 deletions

View file

@ -132,11 +132,7 @@ mod tests {
let growth = after.saturating_sub(baseline);
let growth_mb = growth as f64 / (1024.0 * 1024.0);
let per_request = if num_iterations > 0 {
growth / num_iterations
} else {
0
};
let per_request = growth.checked_div(num_iterations).unwrap_or(0);
eprintln!("=== Routing Stress Test Results ===");
eprintln!(" Iterations: {num_iterations}");

View file

@ -21,9 +21,10 @@ use super::schemas::{
use super::text_processing::NormalizedMessage;
/// Marker appended to the span operation name when concerning signals are
/// detected. Kept in sync with the previous implementation for backward
/// compatibility with downstream consumers.
pub const FLAG_MARKER: &str = "[!]";
/// detected. The 🚩 emoji (U+1F6A9) matches the pre-port implementation so
/// downstream consumers that search for flagged traces by span-name emoji
/// keep working.
pub const FLAG_MARKER: &str = "\u{1F6A9}";
/// ShareGPT-shaped row used as the canonical input to the analyzer's
/// detectors. `from` is one of `"human"`, `"gpt"`, `"function_call"`,

View file

@ -402,7 +402,8 @@ Visual Flag Marker
When concerning signals are detected (disengagement present, stagnation
count > 2, any execution failure / loop, or overall quality ``poor``/
``severe``), the marker ``[!]`` is appended to the span's operation name.
``severe``), the marker 🚩 (U+1F6A9) is appended to the span's operation
name.
This makes flagged sessions immediately visible in trace UIs without
requiring attribute filtering.
@ -420,7 +421,7 @@ Example queries against the layered keys::
signals.execution.failure.count > 0
signals.environment.exhaustion.count > 0
For flagged sessions, search for ``[!]`` in span names.
For flagged sessions, search for 🚩 in span names.
.. image:: /_static/img/signals_trace.png
:width: 100%
@ -507,7 +508,7 @@ Example Span
A concerning session, showing both layered attributes and a per-instance
event::
# Span name: "POST /v1/chat/completions gpt-5.2 [!]"
# Span name: "POST /v1/chat/completions gpt-5.2 🚩"
# Top-level
signals.quality = "severe"
@ -619,7 +620,7 @@ Mitigation strategies:
causes.
.. tip::
The ``[!]`` marker in the span name provides instant visual feedback in
The 🚩 marker in the span name provides instant visual feedback in
trace UIs, while the structured attributes (``signals.quality``,
``signals.interaction.disengagement.severity``, etc.) and per-instance
span events enable powerful querying and drill-down in your observability

View file

@ -114,11 +114,11 @@ Signals act as early warning indicators embedded in your traces:
**Visual Flag Markers**
When concerning signals are detected (disengagement, execution failures / loops, stagnation > 2, or ``poor`` / ``severe`` quality), Plano automatically appends a ``[!]`` marker to the span's operation name. This makes problematic traces immediately visible in your tracing UI without requiring additional queries.
When concerning signals are detected (disengagement, execution failures / loops, stagnation > 2, or ``poor`` / ``severe`` quality), Plano automatically appends a 🚩 marker to the span's operation name. This makes problematic traces immediately visible in your tracing UI without requiring additional queries.
**Example Span with Signals**::
# Span name: "POST /v1/chat/completions gpt-4 [!]"
# Span name: "POST /v1/chat/completions gpt-4 🚩"
# Standard LLM attributes:
llm.model = "gpt-4"
llm.usage.total_tokens = 225