Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3e69ec2
feat(observability): add managed monitoring stack and diagnostics
happy-v587 Oct 22, 2026
8c44446
fix(ci): check observability resource licenses
happy-v587 Nov 2, 2026
5fa867f
fix(ci): keep OTLP checks optional after master rebase
happy-v587 Nov 2, 2026
fdb7b1a
fix(ci): align observability fixtures and worker diagnostics
happy-v587 Nov 3, 2026
3489cd7
test(zcode): verify durable pause after scope timeout
happy-v587 Nov 3, 2026
2ee2cbb
fix(packaging): declare psutil as a server dependency
happy-v587 Nov 3, 2026
03efa42
fix(observability): repair reference demo signal correlation
happy-v587 Nov 3, 2026
9dfd1be
fix(observability): color status output and send valid TraceQL explor…
happy-v587 Nov 3, 2026
e319e85
fix(observability): reject log-specific exporter overrides
happy-v587 Nov 3, 2026
01ebe73
fix(ci): retry busy macOS image detach failures
happy-v587 Nov 3, 2026
a60e8e2
test(zcode): allow bounded initial recall timeouts
happy-v587 Nov 3, 2026
5eebbb6
fix(runtime): retain failure evidence across policy blocks
happy-v587 Nov 4, 2026
f999706
fix(ci): qualify merged ownership and observability contracts
happy-v587 Nov 4, 2026
8fa87c4
docs(desktop): record merged source evidence qualification
happy-v587 Nov 4, 2026
f969713
test(logging): accept declared service owner identity
happy-v587 Nov 4, 2026
e60384d
fix(ci): budget complete backend acceptance lifecycles
happy-v587 Nov 4, 2026
23bbf41
test(ci): isolate nested pytest runtime options
happy-v587 Nov 4, 2026
75239cf
chore(desktop): regenerate statistics observation bindings
happy-v587 Nov 4, 2026
581cf26
fix(desktop): accept optional statistics observations
happy-v587 Nov 4, 2026
e4d5e87
test(desktop): qualify combined statistics protocol
happy-v587 Nov 4, 2026
01dd266
docs(desktop): record statistics product qualification
happy-v587 Nov 4, 2026
63755a0
fix(ci): budget OceanBase clean migration lifecycles
happy-v587 Nov 4, 2026
06cff31
merge: sync master and preserve macOS DMG diagnostics
happy-v587 Nov 5, 2026
2722e8f
fix(ci): isolate macOS build retry fixtures after master sync
happy-v587 Nov 5, 2026
5e85e0f
merge: sync master and unify migration test budgets
happy-v587 Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(observability): color status output and send valid TraceQL explor…
…e link
  • Loading branch information
happy-v587 committed Nov 4, 2026
commit 9dfd1be71057729e7f1ef54289c5a477b51e6db1
32 changes: 14 additions & 18 deletions src/powercontext/observability/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,27 +198,16 @@ def explore_logs_url(state: dict[str, Any]) -> str:


def explore_traces_url(state: dict[str, Any]) -> str:
"""Explore deep link; Grafana provisioning cannot set Explore default queries or tabs."""
"""TraceQL deep link; search-tab filters lose string quoting when rebuilt from the URL and Tempo rejects them."""
pane = {
"datasource": "tempo",
"queries": [
{
"refId": "A",
"datasource": {"type": "tempo", "uid": "tempo"},
"queryType": "traceqlSearch",
"queryType": "traceql",
"limit": 20,
"tableType": "traces",
"metricsQueryType": "range",
"serviceMapUseNativeHistograms": False,
"filters": [
{
"id": "service-name",
"operator": "=",
"scope": "span",
"tag": "service.name",
"value": ["powercontext-server"],
}
],
"query": '{resource.service.name="powercontext-server"}',
}
],
"range": {"from": "now-1h", "to": "now"},
Expand Down Expand Up @@ -288,6 +277,12 @@ def _row(label: str, value: str, note: str) -> None:
typer.secho(note, dim=True, color=True)


def _status_row(label: str, value: str) -> None:
"""One colored entry per line; long Explore URLs must not wrap into the label column."""
typer.secho(f" {label:<13}", fg=typer.colors.CYAN, bold=True, nl=False, color=True)
typer.secho(value, fg=typer.colors.GREEN, color=True)


def _detail(path: Path | str) -> None:
"""Print a long value on its own aligned line; wrapping must not disturb the columns."""
typer.secho(f" {'':<9} {path}", dim=True, color=True)
Expand Down Expand Up @@ -332,10 +327,11 @@ def status(backend: Backend = None) -> None:
return
state = load_state(directory)
typer.echo(compose(directory, state, "ps", "--all", timeout=20))
typer.echo(f"Backend: {state['backend']}; Grafana: http://127.0.0.1:{state['grafana_port']}")
typer.echo(f"Loki logs: {explore_logs_url(state)}")
typer.echo(f"Tempo traces: {explore_traces_url(state)}")
typer.echo(f"Phoenix: http://127.0.0.1:{phoenix_port(state)}")
_status_row("Backend", state["backend"])
_status_row("Grafana", f"http://127.0.0.1:{state['grafana_port']}")
_status_row("Loki logs", explore_logs_url(state))
_status_row("Tempo traces", explore_traces_url(state))
_status_row("Phoenix", f"http://127.0.0.1:{phoenix_port(state)}")
except (ObservabilityError, OSError) as error:
_failure(error)

Expand Down
8 changes: 4 additions & 4 deletions tests/test_observability_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_up_prints_prefilled_loki_explore_link(deployment, monkeypatch):
]


def test_up_prints_prefilled_tempo_explore_link_with_search_tab(deployment, monkeypatch):
def test_up_prints_prefilled_tempo_explore_link_with_traceql_query(deployment, monkeypatch):
monkeypatch.setattr("powercontext.observability.cli.docker_command", lambda: "docker")
monkeypatch.setattr(
"powercontext.observability.cli.subprocess.run", lambda *a, **kw: subprocess.CompletedProcess(a, 0)
Expand All @@ -211,10 +211,10 @@ def test_up_prints_prefilled_tempo_explore_link_with_search_tab(deployment, monk
tempo_url, tempo_pane = urls[index], panes[index]
assert tempo_url.startswith("http://127.0.0.1:13000/explore")
query = tempo_pane["queries"][0]
assert query["queryType"] == "traceqlSearch"
assert query["queryType"] == "traceql"
assert query["datasource"] == {"type": "tempo", "uid": "tempo"}
assert query["filters"][0]["tag"] == "service.name"
assert query["filters"][0]["value"] == ["powercontext-server"]
# The prefilled query must already be valid TraceQL; unquoted values are rejected by Tempo.
assert query["query"] == '{resource.service.name="powercontext-server"}'


def test_up_keeps_long_paths_on_aligned_own_lines(deployment, monkeypatch):
Expand Down