Captured from feature/tracing-migrationf510940(rebased on master8284509), same Jaeger / request set / DB snapshot procedure as pre-migration. Result: names + semantic attributes preserved, traceparent intact, no orphaned spans, async/streaming paths now single traces. See post-migration/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
73523c6796
commit
e754e149d7
6 files changed
+1272
No files matched your search
@@ -0,0 +1,81 @@
|
||||
# Post-migration span capture + parity diff (ticket #143, map #135)
|
||||
|
||||
The "after" counterpart of `../pre-migration/` (#137). It is captured the same
|
||||
way, against the same local Jaeger, with the same request set, and diffed
|
||||
against `../pre-migration/span-inventory.json`.
|
||||
|
||||
## What was run
|
||||
|
||||
- **Revision:** `feature/tracing-migration` @ `f510940`, rebased onto master
|
||||
`8284509` (dev/e2e server). Release build. No source patch was needed:
|
||||
master's `LOCAL_BIND_URL=` disables the secondary `:8088` listener.
|
||||
- **Exporter:** the same local Jaeger all-in-one (OTLP/gRPC `:14317`). Traces
|
||||
were filtered by capture start time, because the container still holds the
|
||||
baseline traces.
|
||||
- **DB:** a fresh `.backup` of the live `auth.db` (21,298 `image_exif` rows,
|
||||
4 libraries, max job id 379, so the agentic job is again **380**). Output
|
||||
dirs point at temp. `REEL_PREGEN_ENABLED=0`, `REEL_CACHE_SWEEP_ENABLED=0`.
|
||||
- **LLM:** the live local stack (`LLM_BACKEND=llamacpp`,
|
||||
`qwen3.8-27b-abliterated`).
|
||||
- **Requests:** the baseline table, replayed by `replay.sh`: photos, memories,
|
||||
agentic (202, polled to `completed`), chat stream (87 deltas + `done`), and
|
||||
the `traceparent: 00-1111…-2222…-01` probe.
|
||||
|
||||
Two captures were taken. Run 1 found two gaps, which are fixed in `f510940`
|
||||
(see "Gaps found and fixed"). Run 2, the files here, is the capture of record.
|
||||
|
||||
## Parity result
|
||||
|
||||
| Check | Before (#137) | After | Verdict |
|
||||
|---|---|---|---|
|
||||
| Operation names | — | every baseline op present (`find_relevant_events_hybrid` is a model-chosen tool; run 1 hit it, run 2 didn't) | ✅ preserved |
|
||||
| Attribute keys (semantic) | per `pre-migration/span-inventory.json` | **identical** for every common op (`list_photos`' ~27 request attrs, `ai.insight.generate_agentic`, `ai.rag.*`, `generate_video_thumbnail`, `db.*`, `llm.request`) | ✅ preserved |
|
||||
| `llm.request` | kind=client; `llm.model` / `llm.provider` / `llm.operation` / `llm.tokens.*` / `http.status_code` | same, on all 12 LLM spans | ✅ |
|
||||
| `llm.backend` | absent from every baseline span (it lives on the async-turn path, which neither capture exercises) | same | ✅ no loss |
|
||||
| Incoming `traceparent` | `list_photos` CHILD_OF remote `2222…` in trace `1111…` | the `GET /photos` root span is CHILD_OF remote `2222…`, with `list_photos` + DB spans under it, all in trace `1111…` | ✅ intact |
|
||||
| DB span nesting | most DB spans were single-span traces | **no DB span is a root**; each nests under its request / feature / job span | ✅ fixed |
|
||||
| Agentic 202 → background | two traces (`948d2756…` / `9b520713…`) | one 52-span trace: `POST …/agentic` → `http.insights.generate_agentic` → `ai.insight.generate_agentic` → `ai.agentic.loop` → `llm.request` / `ai.rag.*` / DB | ✅ fixed |
|
||||
| Streaming chat | fragmented, no handler span | one trace: `POST /insights/chat/stream` → `ai.chat.turn.stream` → `llm.request (chat_stream)` + DB | ✅ fixed |
|
||||
| Thumbnail sweep | 222 `generate_video_thumbnail` in 1 trace | 414 in 1 trace, all with one parent (the `creating thumbnails` root, still open when capture stopped) | ✅ |
|
||||
|
||||
**Roots in the after capture:** only request roots (`GET /photos`,
|
||||
`GET /memories`, `POST …/agentic`, `POST /insights/chat/stream`,
|
||||
`GET /insights/generation/status`) and the background root
|
||||
`watcher.initial_probe`. **No orphans.**
|
||||
|
||||
## Intentional changes (vs baseline)
|
||||
|
||||
- **New per-request root spans** (`GET /photos`, …) from `tracing-actix-web`
|
||||
(#139). Operation spans (`list_photos`, …) now sit one level under them.
|
||||
- **New spans:** `ai.chat.turn.stream` (#140), `watcher.initial_probe` and the
|
||||
other job roots (#142); `db.query.get_job_by_id` shows up because the
|
||||
replay now polls job status.
|
||||
- **DB tracer scope:** `db` → `image-server`. DB spans come from the
|
||||
subscriber's tracer (#141). The span names and `db.*` attributes are unchanged.
|
||||
- **Extra per-span metadata** from tracing-opentelemetry, excluded from the key
|
||||
diff above: `code.file.path` / `code.line.number` / `code.module.name`,
|
||||
`thread.id` / `thread.name`, `target`, `busy_ns` / `idle_ns`.
|
||||
- **Removed:** the zero-length `file write` span in `upload_image` (#141). It
|
||||
wasn't exercised by either capture.
|
||||
|
||||
## Gaps found and fixed (run 1 → `f510940`)
|
||||
|
||||
1. **Agentic background still split off.** Both insight handlers run the
|
||||
generation in a nested `tokio::task::spawn` (for panic isolation) that
|
||||
wasn't instrumented, so `ai.insight.generate_agentic` was a root.
|
||||
2. **Watcher boot probe.** `count_for_library` ran before the first tick span,
|
||||
leaving 4 root DB spans. It now runs under `watcher.initial_probe`.
|
||||
|
||||
## Files
|
||||
|
||||
- `traces.json` — Jaeger `/api/traces` dump for run 2.
|
||||
- `span-inventory.json` — the baseline's schema, plus `parents` / `root_count`.
|
||||
- `diff-report.txt` — the full `analyze.py` output (before/after diff, roots,
|
||||
ancestry chains, traceparent chain, per-`llm.request` attributes).
|
||||
- `analyze.py`, `replay.sh` — reproduce with
|
||||
`python3 analyze.py <dir-with traces-after.json + inventory-before.json>`.
|
||||
|
||||
## Full suite on `f510940`
|
||||
|
||||
`cargo build` ✅, `cargo clippy --all-targets` 0 warnings ✅, `cargo fmt --check` ✅,
|
||||
`cargo test` ✅ (690 lib + 775 integration + 5 OTel regression + 4 doc).
|
||||
@@ -0,0 +1,149 @@
|
||||
"""#143 parity analysis: after-capture Jaeger dump vs the #137 baseline.
|
||||
|
||||
Writes span-inventory.json (baseline schema + nesting columns) and prints a
|
||||
before/after diff plus targeted nesting / propagation checks.
|
||||
"""
|
||||
import json
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
|
||||
W = sys.argv[1]
|
||||
after = json.load(open(f"{W}/traces-after.json"))["data"]
|
||||
before_inv = {r["operation"]: r for r in json.load(open(f"{W}/inventory-before.json"))}
|
||||
|
||||
# Attributes tracing-opentelemetry adds to every span (location / thread /
|
||||
# timing metadata). Reported separately so the diff shows semantic changes.
|
||||
TRACING_EXTRAS = {
|
||||
"busy_ns", "idle_ns", "target", "thread.id", "thread.name",
|
||||
"code.file.path", "code.line.number", "code.module.name",
|
||||
}
|
||||
# Spans produced by my auth probes, not by the baseline request set.
|
||||
PROBE_NOISE = set()
|
||||
|
||||
spans = {}
|
||||
by_trace = defaultdict(list)
|
||||
for t in after:
|
||||
for s in t["spans"]:
|
||||
s["_tags"] = {kv["key"]: kv["value"] for kv in s["tags"]}
|
||||
spans[s["spanID"]] = s
|
||||
by_trace[s["traceID"]].append(s)
|
||||
|
||||
|
||||
def parent(s):
|
||||
for r in s.get("references", []):
|
||||
if r["refType"] == "CHILD_OF":
|
||||
return r["spanID"], r["traceID"]
|
||||
return None, None
|
||||
|
||||
|
||||
def op(sid):
|
||||
return spans[sid]["operationName"] if sid in spans else None
|
||||
|
||||
|
||||
# Inventory in the baseline's schema, plus nesting columns.
|
||||
inv = defaultdict(lambda: {"span_count": 0, "traces": set(), "kinds": set(), "scopes": set(),
|
||||
"statuses": set(), "keys": set(), "parents": defaultdict(int),
|
||||
"orphans": 0})
|
||||
for s in spans.values():
|
||||
r = inv[s["operationName"]]
|
||||
r["span_count"] += 1
|
||||
r["traces"].add(s["traceID"])
|
||||
r["kinds"].add(s["_tags"].get("span.kind", "internal"))
|
||||
r["scopes"].add(s["_tags"].get("otel.scope.name", "?"))
|
||||
r["statuses"].add(s["_tags"].get("otel.status_code", "(none)"))
|
||||
r["keys"].update(s["_tags"])
|
||||
pid, _ = parent(s)
|
||||
if pid is None:
|
||||
r["orphans"] += 1
|
||||
else:
|
||||
r["parents"][op(pid) or "(remote)"] += 1
|
||||
|
||||
inventory = []
|
||||
for name, r in sorted(inv.items(), key=lambda kv: -kv[1]["span_count"]):
|
||||
inventory.append({
|
||||
"operation": name,
|
||||
"span_count": r["span_count"],
|
||||
"trace_count": len(r["traces"]),
|
||||
"kind": "/".join(sorted(r["kinds"])),
|
||||
"scope": "/".join(sorted(r["scopes"])),
|
||||
"status": "/".join(sorted(r["statuses"])),
|
||||
"attribute_keys": sorted(r["keys"] - TRACING_EXTRAS),
|
||||
"parents": dict(r["parents"]),
|
||||
"root_count": r["orphans"],
|
||||
})
|
||||
json.dump(inventory, open(f"{W}/span-inventory.json", "w"), indent=2)
|
||||
|
||||
print("== Operations: before -> after ==")
|
||||
before_ops, after_ops = set(before_inv), set(inv)
|
||||
print("only before:", sorted(before_ops - after_ops))
|
||||
print("only after: ", sorted(after_ops - before_ops))
|
||||
print()
|
||||
print("== Common operations: kind / scope / attribute-key changes ==")
|
||||
for name in sorted(before_ops & after_ops):
|
||||
b, a = before_inv[name], next(x for x in inventory if x["operation"] == name)
|
||||
bk, ak = set(b["attribute_keys"]), set(a["attribute_keys"])
|
||||
changes = []
|
||||
if b["kind"] != a["kind"]:
|
||||
changes.append(f"kind {b['kind']}->{a['kind']}")
|
||||
if b["scope"] != a["scope"]:
|
||||
changes.append(f"scope {b['scope']}->{a['scope']}")
|
||||
if bk - ak:
|
||||
changes.append(f"LOST {sorted(bk - ak)}")
|
||||
if ak - bk:
|
||||
changes.append(f"added {sorted(ak - bk)}")
|
||||
nest = f"traces {b['trace_count']}/{b['span_count']} -> {a['trace_count']}/{a['span_count']}, roots={a['root_count']}"
|
||||
print(f"{name}: {'; '.join(changes) or 'same'} | {nest}")
|
||||
|
||||
print()
|
||||
print("== Roots in the after capture (span with no parent) ==")
|
||||
for s in spans.values():
|
||||
if parent(s)[0] is None:
|
||||
print(f" {s['operationName']} trace={s['traceID'][:8]} spans_in_trace={len(by_trace[s['traceID']])}")
|
||||
|
||||
|
||||
def chain(s):
|
||||
out = [s["operationName"]]
|
||||
pid, _ = parent(s)
|
||||
while pid:
|
||||
if pid not in spans:
|
||||
out.append(f"(remote {pid})")
|
||||
break
|
||||
out.append(spans[pid]["operationName"])
|
||||
pid, _ = parent(spans[pid])
|
||||
return " <- ".join(out)
|
||||
|
||||
|
||||
print()
|
||||
print("== Ancestry of key spans ==")
|
||||
seen = set()
|
||||
for s in spans.values():
|
||||
n = s["operationName"]
|
||||
key = (n, s["_tags"].get("llm.operation"))
|
||||
if n in ("llm.request", "ai.agentic.loop", "ai.insight.generate_agentic",
|
||||
"db.insert.store_insight", "db.update.update_training_messages",
|
||||
"ai.chat.turn.stream", "list_photos", "list_memories",
|
||||
"generate_video_thumbnail") and key not in seen:
|
||||
seen.add(key)
|
||||
extra = f" [llm.operation={key[1]}]" if key[1] else ""
|
||||
print(f" {chain(s)}{extra}")
|
||||
|
||||
print()
|
||||
print("== traceparent probe ==")
|
||||
probe = [s for s in spans.values() if s["traceID"].startswith("11111111")]
|
||||
for s in sorted(probe, key=lambda s: s["startTime"]):
|
||||
print(f" {chain(s)} trace={s['traceID']}")
|
||||
|
||||
print()
|
||||
print("== llm.request attribute presence ==")
|
||||
for s in spans.values():
|
||||
if s["operationName"] == "llm.request":
|
||||
t = s["_tags"]
|
||||
print(f" op={t.get('llm.operation')} model={t.get('llm.model')} provider={t.get('llm.provider')} "
|
||||
f"status={t.get('http.status_code')} tokens_in={t.get('llm.tokens.input')} "
|
||||
f"parent={op(parent(s)[0])}")
|
||||
print()
|
||||
print("== turn / insight spans: llm.backend + llm.model ==")
|
||||
for s in spans.values():
|
||||
if s["operationName"] in ("ai.chat.turn.stream", "ai.insight.generate_agentic"):
|
||||
t = s["_tags"]
|
||||
print(f" {s['operationName']}: llm.backend={t.get('llm.backend')} llm.model={t.get('llm.model')} backend={t.get('backend')} model={t.get('model')}")
|
||||
@@ -0,0 +1,108 @@
|
||||
== Operations: before -> after ==
|
||||
only before: ['db.query.find_relevant_events_hybrid']
|
||||
only after: ['GET /insights/generation/status', 'GET /memories', 'GET /photos', 'POST /insights/chat/stream', 'POST /insights/generate/agentic', 'ai.chat.turn.stream', 'db.query.get_job_by_id', 'watcher.initial_probe']
|
||||
|
||||
== Common operations: kind / scope / attribute-key changes ==
|
||||
ai.agentic.loop: same | traces 1/1 -> 1/1, roots=0
|
||||
ai.insight.generate_agentic: same | traces 1/1 -> 1/1, roots=0
|
||||
ai.rag.search_daily_summaries: same | traces 1/1 -> 1/2, roots=0
|
||||
db.insert.create_job: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.insert.store_insight: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.insert.upsert_entity: scope db->image-server | traces 1/2 -> 1/3, roots=0
|
||||
db.insert.upsert_fact: scope db->image-server | traces 1/1 -> 1/2, roots=0
|
||||
db.insert.upsert_photo_link: scope db->image-server | traces 1/1 -> 1/2, roots=0
|
||||
db.query.count_for_library: scope db->image-server | traces 4/4 -> 1/4, roots=0
|
||||
db.query.faces_for_hash: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.query.find_similar_summaries_with_time_weight: scope db->image-server | traces 1/1 -> 1/2, roots=0
|
||||
db.query.get_active_job: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.query.get_current_insight_for_library: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.query.get_event_count: scope db->image-server | traces 2/2 -> 2/2, roots=0
|
||||
db.query.get_exif: scope db->image-server | traces 2/2 -> 1/3, roots=0
|
||||
db.query.get_links_for_photo: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.query.get_location_count: scope db->image-server | traces 2/2 -> 2/2, roots=0
|
||||
db.query.get_memories_in_window: scope db->image-server | traces 1/4 -> 1/4, roots=0
|
||||
db.query.get_persona: scope db->image-server | traces 4/4 -> 2/4, roots=0
|
||||
db.query.get_prefs: scope db->image-server | traces 4/4 -> 3/4, roots=0
|
||||
db.query.get_tag_counts_batch: scope db->db/image-server | traces 1/1 -> 2/4, roots=0
|
||||
db.query.get_tags_for_path: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.query.has_any_faces: scope db->image-server | traces 2/2 -> 2/2, roots=0
|
||||
db.query.has_any_summaries: scope db->image-server | traces 2/2 -> 2/2, roots=0
|
||||
db.query.list_entities: scope db->image-server | traces 1/2 -> 1/4, roots=0
|
||||
db.query.list_rel_paths_for_libraries: scope db->db/image-server | traces 1/1 -> 2/4, roots=0
|
||||
db.query.resolve_content_hash: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.update.cancel_active_jobs: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.update.complete_job: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.update.update_facts_insight_id: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
db.update.update_training_messages: scope db->image-server | traces 1/1 -> 1/1, roots=0
|
||||
generate_video_thumbnail: same | traces 1/222 -> 1/414, roots=0
|
||||
http.insights.generate_agentic: same | traces 1/1 -> 1/1, roots=0
|
||||
list_memories: same | traces 1/1 -> 1/1, roots=0
|
||||
list_photos: same | traces 1/1 -> 2/4, roots=0
|
||||
llm.request: same | traces 3/8 -> 2/12, roots=0
|
||||
|
||||
== Roots in the after capture (span with no parent) ==
|
||||
GET /insights/generation/status trace=4e4c40ef spans_in_trace=2
|
||||
GET /insights/generation/status trace=9b6f5cad spans_in_trace=2
|
||||
GET /insights/generation/status trace=92fe175c spans_in_trace=2
|
||||
GET /insights/generation/status trace=a1c2c449 spans_in_trace=2
|
||||
GET /insights/generation/status trace=73ad5d54 spans_in_trace=2
|
||||
GET /insights/generation/status trace=96ba44fa spans_in_trace=2
|
||||
GET /insights/generation/status trace=63be2acf spans_in_trace=2
|
||||
POST /insights/chat/stream trace=119b1ad6 spans_in_trace=11
|
||||
GET /insights/generation/status trace=d0f13d49 spans_in_trace=2
|
||||
GET /insights/generation/status trace=01e0824c spans_in_trace=2
|
||||
watcher.initial_probe trace=09884c56 spans_in_trace=5
|
||||
GET /insights/generation/status trace=4a47ba01 spans_in_trace=2
|
||||
POST /insights/generate/agentic trace=881c56c0 spans_in_trace=52
|
||||
GET /insights/generation/status trace=87857a0b spans_in_trace=2
|
||||
GET /insights/generation/status trace=e1cf97cb spans_in_trace=2
|
||||
GET /insights/generation/status trace=5f02a109 spans_in_trace=2
|
||||
GET /insights/generation/status trace=6fb52a67 spans_in_trace=2
|
||||
GET /insights/generation/status trace=2512bbae spans_in_trace=2
|
||||
GET /photos trace=4cd7207a spans_in_trace=4
|
||||
GET /memories trace=0c26f842 spans_in_trace=7
|
||||
GET /insights/generation/status trace=6844193f spans_in_trace=2
|
||||
|
||||
== Ancestry of key spans ==
|
||||
list_photos <- (remote 2222222222222222)
|
||||
llm.request <- ai.chat.turn.stream <- POST /insights/chat/stream [llm.operation=chat_stream]
|
||||
db.update.update_training_messages <- ai.chat.turn.stream <- POST /insights/chat/stream
|
||||
ai.chat.turn.stream <- POST /insights/chat/stream
|
||||
llm.request <- ai.rag.search_daily_summaries <- ai.agentic.loop <- ai.insight.generate_agentic <- http.insights.generate_agentic <- POST /insights/generate/agentic [llm.operation=embeddings]
|
||||
llm.request <- ai.agentic.loop <- ai.insight.generate_agentic <- http.insights.generate_agentic <- POST /insights/generate/agentic [llm.operation=chat]
|
||||
ai.agentic.loop <- ai.insight.generate_agentic <- http.insights.generate_agentic <- POST /insights/generate/agentic
|
||||
db.insert.store_insight <- ai.insight.generate_agentic <- http.insights.generate_agentic <- POST /insights/generate/agentic
|
||||
ai.insight.generate_agentic <- http.insights.generate_agentic <- POST /insights/generate/agentic
|
||||
list_memories <- GET /memories
|
||||
generate_video_thumbnail <- (remote 4b78d96000f31655)
|
||||
|
||||
== traceparent probe ==
|
||||
list_photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
db.query.list_rel_paths_for_libraries <- list_photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
db.query.get_tag_counts_batch <- list_photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
list_photos <- GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
db.query.list_rel_paths_for_libraries <- list_photos <- GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
db.query.get_tag_counts_batch <- list_photos <- GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
list_photos <- GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
db.query.list_rel_paths_for_libraries <- list_photos <- GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
db.query.get_tag_counts_batch <- list_photos <- GET /photos <- (remote 2222222222222222) trace=11111111111111111111111111111111
|
||||
|
||||
== llm.request attribute presence ==
|
||||
op=chat_stream model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=11148 parent=ai.chat.turn.stream
|
||||
op=embeddings model=embed provider=llamacpp status=200 tokens_in=None parent=ai.rag.search_daily_summaries
|
||||
op=chat model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=10289 parent=ai.agentic.loop
|
||||
op=chat model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=10480 parent=ai.agentic.loop
|
||||
op=embeddings model=embed provider=llamacpp status=200 tokens_in=None parent=ai.agentic.loop
|
||||
op=embeddings model=embed provider=llamacpp status=200 tokens_in=None parent=ai.agentic.loop
|
||||
op=chat model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=5089 parent=ai.agentic.loop
|
||||
op=chat model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=10672 parent=ai.agentic.loop
|
||||
op=chat model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=10911 parent=ai.agentic.loop
|
||||
op=chat model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=10340 parent=ai.agentic.loop
|
||||
op=chat model=qwen3.8-27b-abliterated provider=llamacpp status=200 tokens_in=9858 parent=ai.agentic.loop
|
||||
op=embeddings model=embed provider=llamacpp status=200 tokens_in=None parent=ai.rag.search_daily_summaries
|
||||
|
||||
== turn / insight spans: llm.backend + llm.model ==
|
||||
ai.chat.turn.stream: llm.backend=None llm.model=None backend=None model=None
|
||||
ai.insight.generate_agentic: llm.backend=None llm.model=None backend=local model=qwen3.8-27b-abliterated
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Replays the #137 baseline request set against the after-capture server.
|
||||
set -u
|
||||
W=$(dirname "$0"); B=http://127.0.0.1:18080
|
||||
T=$(python3 $W/mint_jwt.py); H="Authorization: Bearer $T"
|
||||
echo "1) photos"; curl -s -o /dev/null -w "%{http_code}\n" -H "$H" "$B/photos?path=Colleen&recursive=true&limit=20"
|
||||
echo "2) memories"; curl -s -o /dev/null -w "%{http_code}\n" -H "$H" "$B/memories?path=.&recursive=true"
|
||||
echo "3) agentic"; R=$(curl -s -H "$H" -H 'Content-Type: application/json' -d '{"file_path":"Photo06172345.jpg","backend":"local"}' "$B/insights/generate/agentic"); echo "$R"
|
||||
JOB=$(echo "$R" | jq -r '.job_id // empty')
|
||||
if [ -n "$JOB" ]; then
|
||||
for i in $(seq 1 120); do S=$(curl -s -H "$H" "$B/insights/generation/status?job_id=$JOB" | jq -r .status); [ "$S" != "running" ] && [ "$S" != "pending" ] && break; sleep 5; done
|
||||
echo " job $JOB -> $S"
|
||||
fi
|
||||
echo "4) chat stream"; curl -sN -H "$H" -H 'Content-Type: application/json' -d '{"file_path":"Photo06172345.jpg","user_message":"What was I wearing in this photo?","backend":"local"}' "$B/insights/chat/stream" > $W/chat.sse; echo " deltas=$(grep -c '^event: text' $W/chat.sse) done=$(grep -c '^event: done' $W/chat.sse) errors=$(grep -c '^event: error' $W/chat.sse)"
|
||||
echo "5) traceparent probe"; curl -s -o /dev/null -w "%{http_code}\n" -H "$H" -H 'traceparent: 00-11111111111111111111111111111111-2222222222222222-01' "$B/photos?path=Colleen&recursive=true&limit=5"
|
||||
@@ -0,0 +1,918 @@
|
||||
[
|
||||
{
|
||||
"operation": "generate_video_thumbnail",
|
||||
"span_count": 414,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "(none)",
|
||||
"attribute_keys": [
|
||||
"file-name",
|
||||
"library",
|
||||
"otel.scope.name",
|
||||
"span.kind",
|
||||
"type"
|
||||
],
|
||||
"parents": {
|
||||
"(remote)": 414
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_job_by_id",
|
||||
"span_count": 16,
|
||||
"trace_count": 16,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"GET /insights/generation/status": 16
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "GET /insights/generation/status",
|
||||
"span_count": 16,
|
||||
"trace_count": 16,
|
||||
"kind": "server",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"http.client_ip",
|
||||
"http.flavor",
|
||||
"http.host",
|
||||
"http.method",
|
||||
"http.route",
|
||||
"http.scheme",
|
||||
"http.status_code",
|
||||
"http.target",
|
||||
"http.user_agent",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"request_id",
|
||||
"span.kind",
|
||||
"trace_id"
|
||||
],
|
||||
"parents": {},
|
||||
"root_count": 16
|
||||
},
|
||||
{
|
||||
"operation": "llm.request",
|
||||
"span_count": 12,
|
||||
"trace_count": 2,
|
||||
"kind": "client",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"http.status_code",
|
||||
"llm.model",
|
||||
"llm.operation",
|
||||
"llm.provider",
|
||||
"llm.tokens.input",
|
||||
"llm.tokens.output",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1,
|
||||
"ai.rag.search_daily_summaries": 2,
|
||||
"ai.agentic.loop": 9
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_tag_counts_batch",
|
||||
"span_count": 4,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "db/image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"file_count",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"list_photos": 4
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "list_photos",
|
||||
"span_count": 4,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"camera_make",
|
||||
"camera_model",
|
||||
"date_from",
|
||||
"date_to",
|
||||
"exclude_tag_ids",
|
||||
"file_count",
|
||||
"gps_lat",
|
||||
"gps_lon",
|
||||
"gps_radius_km",
|
||||
"lens_model",
|
||||
"library",
|
||||
"media_type",
|
||||
"optimization.batch_tags",
|
||||
"optimization.db_sort",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"pagination.enabled",
|
||||
"pagination.limit",
|
||||
"pagination.offset",
|
||||
"path",
|
||||
"recursive",
|
||||
"returned_count",
|
||||
"sort",
|
||||
"span.kind",
|
||||
"tag_filter_mode",
|
||||
"tag_ids",
|
||||
"total_count"
|
||||
],
|
||||
"parents": {
|
||||
"(remote)": 1,
|
||||
"GET /photos": 3
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.list_rel_paths_for_libraries",
|
||||
"span_count": 4,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "db/image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"list_photos": 4
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_persona",
|
||||
"span_count": 4,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1,
|
||||
"http.insights.generate_agentic": 1,
|
||||
"ai.agentic.loop": 1,
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_prefs",
|
||||
"span_count": 4,
|
||||
"trace_count": 3,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"POST /insights/chat/stream": 1,
|
||||
"ai.insight.generate_agentic": 1,
|
||||
"http.insights.generate_agentic": 1,
|
||||
"list_memories": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.count_for_library",
|
||||
"span_count": 4,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"watcher.initial_probe": 4
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.list_entities",
|
||||
"span_count": 4,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 4
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_memories_in_window",
|
||||
"span_count": 4,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"list_memories": 4
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "GET /photos",
|
||||
"span_count": 3,
|
||||
"trace_count": 2,
|
||||
"kind": "server",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"http.client_ip",
|
||||
"http.flavor",
|
||||
"http.host",
|
||||
"http.method",
|
||||
"http.route",
|
||||
"http.scheme",
|
||||
"http.status_code",
|
||||
"http.target",
|
||||
"http.user_agent",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"request_id",
|
||||
"span.kind",
|
||||
"trace_id"
|
||||
],
|
||||
"parents": {
|
||||
"(remote)": 2
|
||||
},
|
||||
"root_count": 1
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_exif",
|
||||
"span_count": 3,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 2,
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.insert.upsert_entity",
|
||||
"span_count": 3,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 2,
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.has_any_faces",
|
||||
"span_count": 2,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1,
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_location_count",
|
||||
"span_count": 2,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1,
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_event_count",
|
||||
"span_count": 2,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1,
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.has_any_summaries",
|
||||
"span_count": 2,
|
||||
"trace_count": 2,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1,
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.find_similar_summaries_with_time_weight",
|
||||
"span_count": 2,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.rag.search_daily_summaries": 2
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "ai.rag.search_daily_summaries",
|
||||
"span_count": 2,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"date",
|
||||
"limit",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"query",
|
||||
"results_count",
|
||||
"span.kind",
|
||||
"time_weighted"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 2
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.insert.upsert_photo_link",
|
||||
"span_count": 2,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 2
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.insert.upsert_fact",
|
||||
"span_count": 2,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 2
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.update.update_training_messages",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "ai.chat.turn.stream",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"file_path",
|
||||
"library_id",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"POST /insights/chat/stream": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "POST /insights/chat/stream",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "server",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"http.client_ip",
|
||||
"http.flavor",
|
||||
"http.host",
|
||||
"http.method",
|
||||
"http.route",
|
||||
"http.scheme",
|
||||
"http.status_code",
|
||||
"http.target",
|
||||
"http.user_agent",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"request_id",
|
||||
"span.kind",
|
||||
"trace_id"
|
||||
],
|
||||
"parents": {},
|
||||
"root_count": 1
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_current_insight_for_library",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.chat.turn.stream": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "watcher.initial_probe",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "(none)",
|
||||
"attribute_keys": [
|
||||
"otel.scope.name",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {},
|
||||
"root_count": 1
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_tags_for_path",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"path",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_links_for_photo",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.get_active_job",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"http.insights.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "ai.agentic.loop",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"iterations_used",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.insert.store_insight",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.update.complete_job",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"http.insights.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.update.update_facts_insight_id",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.insight.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.query.resolve_content_hash",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "ai.insight.generate_agentic",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"backend",
|
||||
"file_path",
|
||||
"images_inline",
|
||||
"max_iterations",
|
||||
"model",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"http.insights.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "http.insights.generate_agentic",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"backend",
|
||||
"file_path",
|
||||
"job_id",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"POST /insights/generate/agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "POST /insights/generate/agentic",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "server",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"http.client_ip",
|
||||
"http.flavor",
|
||||
"http.host",
|
||||
"http.method",
|
||||
"http.route",
|
||||
"http.scheme",
|
||||
"http.status_code",
|
||||
"http.target",
|
||||
"http.user_agent",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"request_id",
|
||||
"span.kind",
|
||||
"trace_id"
|
||||
],
|
||||
"parents": {},
|
||||
"root_count": 1
|
||||
},
|
||||
{
|
||||
"operation": "db.query.faces_for_hash",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"content_hash",
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"ai.agentic.loop": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.update.cancel_active_jobs",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"http.insights.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "db.insert.create_job",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"db.operation",
|
||||
"db.query_type",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"http.insights.generate_agentic": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "list_memories",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "internal",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"span.kind"
|
||||
],
|
||||
"parents": {
|
||||
"GET /memories": 1
|
||||
},
|
||||
"root_count": 0
|
||||
},
|
||||
{
|
||||
"operation": "GET /memories",
|
||||
"span_count": 1,
|
||||
"trace_count": 1,
|
||||
"kind": "server",
|
||||
"scope": "image-server",
|
||||
"status": "OK",
|
||||
"attribute_keys": [
|
||||
"http.client_ip",
|
||||
"http.flavor",
|
||||
"http.host",
|
||||
"http.method",
|
||||
"http.route",
|
||||
"http.scheme",
|
||||
"http.status_code",
|
||||
"http.target",
|
||||
"http.user_agent",
|
||||
"otel.scope.name",
|
||||
"otel.status_code",
|
||||
"request_id",
|
||||
"span.kind",
|
||||
"trace_id"
|
||||
],
|
||||
"parents": {},
|
||||
"root_count": 1
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
{"data":[{"traceID":"4e4c40ef185bcdc4bcf4dacbcd661891","spans":[{"traceID":"4e4c40ef185bcdc4bcf4dacbcd661891","spanID":"91c3816dc20cf18a","operationName":"db.query.get_job_by_id","references":[{"refType":"CHILD_OF","traceID":"4e4c40ef185bcdc4bcf4dacbcd661891","spanID":"dbe4222c262384c2"}],"startTime":1790716633530356,"duration":43,"tags":[{"key":"busy_ns","type":"int64","value":38316},{"key":"code.file.path","type":"string","value":"src/otel.rs"},{"key":"code.line.number","type":"int64","value":185},{"key":"code.module.name","type":"string","value":"image_api::otel"},{"key":"db.operation","type":"string","value":"get_job_by_id"},{"key":"db.query_type","type":"string","value":"query"},{"key":"idle_ns","type":"int64","value":5976},{"key":"otel.scope.name","type":"string","value":"image-server"},{"key":"otel.status_code","type":"string","value":"OK"},{"key":"span.kind","type":"string","value":"internal"},{"key":"target","type":"string","value":"image_api::otel"},{"key":"thread.id","type":"int64","value":20},{"key":"thread.name","type":"string","value":"actix-rt|system:0|arbiter:4"}],"logs":[],"processID":"p1","warnings":null},{"traceID":"4e4c40ef185bcdc4bcf4dacbcd661891","spanID":"dbe4222c262384c2","operationName":"GET /insights/generation/status","references":[],"startTime":1790716633530283,"duration":152,"tags":[{"key":"busy_ns","type":"int64","value":110731},{"key":"code.file.path","type":"string","value":"/home/cameron/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tracing-actix-web-0.7.25/src/root_span_builder.rs"},{"key":"code.line.number","type":"int64","value":44},{"key":"code.module.name","type":"string","value":"tracing_actix_web::root_span_builder"},{"key":"http.client_ip","type":"string","value":"127.0.0.1"},{"key":"http.flavor","type":"string","value":"1.1"},{"key":"http.host","type":"string","value":"127.0.0.1:18080"},{"key":"http.method","type":"string","value":"GET"},{"key":"http.route","type":"string","value":"/insights/generation/status"},{"key":"http.scheme","type":"string","value":"http"},{"key":"http.status_code","type":"int64","value":200},{"key":"http.target","type":"string","value":"/insights/generation/status?job_id=380"},{"key":"http.user_agent","type":"string","value":"curl/8.5.0"},{"key":"idle_ns","type":"int64","value":42074},{"key":"otel.scope.name","type":"string","value":"image-server"},{"key":"otel.status_code","type":"string","value":"OK"},{"key":"request_id","type":"string","value":"7dbbfceb-000a-4bc0-9f1e-b9ef9612cea3"},{"key":"span.kind","type":"string","value":"server"},{"key":"target","type":"string","value":"tracing_actix_web::root_span_builder"},{"key":"thread.id","type":"int64","value":20},{"key":"thread.name","type":"string","value":"actix-rt|system:0|arbiter:4"},{"key":"trace_id","type":"string","value":"4e4c40ef185bcdc4bcf4dacbcd661891"}],"logs":[],"processID":"p1","warnings":null}],"processes":{"p1":{"serviceName":"image-server","tags":[{"key":"service.version","type":"string","value":"1.5.0"},{"key":"telemetry.sdk.language","type":"string","value":"rust"},{"key":"telemetry.sdk.name","type":"string","value":"opentelemetry"},{"key":"telemetry.sdk.version","type":"string","value":"0.31.0"}]}},"warnings":null},{"traceID":"9b6f5cad283c0ee75cfd796962a94047","spans":[{"traceID":"9b6f5cad283c0ee75cfd796962a94047","spanID":"f225af9372244bce","operationName":"db.query.get_job_by_id","references":[{"refType":"CHILD_OF","traceID":"9b6f5cad283c0ee75cfd796962a94047","spanID":"e33154be38ea4319"}],"startTime":1790716648578964,"duration":78,"tags":[{"key":"busy_ns","type":"int64","value":72519},{"key":"code.file.path","type":"string","value":"src/otel.rs"},{"key":"code.line.number","type":"int64","value":185},{"key":"code.module.name","type":"string","value":"image_api::otel"},{"key":"db.operation","type":"string","value":"get_job_by_id"},{"key":"db.query_type","type":"string","value":"query"},{"key":"idle_ns","type":"int64","value":7019},{"key":"otel.scope.name","type":"string","value":"image-server"},{"key":"otel.status_code","type":"string","value":"OK"},{"key":"span.kind","type":"string","value":"internal"},{"key":"target","type":"string","value":"image_api::otel"},{"key":"thread.id","type":"int64","value":23},{"key":"thread.name","type":"string","value":"actix-rt|system:0|arbiter:7"}],"logs":[],"processID":"p1","warnings":null},{"traceID":"9b6f5cad283c0ee75cfd796962a94047","spanID":"e33154be38ea4319","operationName":"GET /insights/generation/status","references":[],"startTime":1790716648578868,"duration":219,"tags":[{"key":"busy_ns","type":"int64","value":157935},{"key":"code.file.path","type":"string","value":"/home/cameron/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tracing-actix-web-0.7.25/src/root_span_builder.rs"},{"key":"code.line.number","type":"int64","value":44},{"key":"code.module.name","type":"string","value":"tracing_actix_web::root_span_builder"},{"key":"http.client_ip","type":"string","value":"127.0.0.1"},{"key":"http.flavor","type":"string","valLine truncated
|
||||
Reference in new issue
Block a user