Endpoint Dependency Map
No direct dependencies in this range
This endpoint has not made an instrumented downstream call in the selected period. Add client or producer spans to reveal databases, queues, external services, and child services.
Downstream health
SQL
WITH rollup AS (
SELECT bucket AS timestamp, target_key, req_count, trace_count, error_count, sum_duration_ns
FROM apis.endpoint_dependency_edges
WHERE project_id='{{project_id}}' AND endpoint_hash='{{var-endpointHash}}'
)
SELECT
COUNT(DISTINCT target_key)::text AS operations,
ROUND((SUM(error_count) * 100.0 / GREATEST(1, SUM(req_count)))::numeric, 2)::text AS error_rate,
ROUND((SUM(sum_duration_ns)::numeric / NULLIF(SUM(req_count), 0) / 1e6), 1)::text AS avg_ms,
SUM(trace_count)::text AS traces
FROM rollup
WHERE 1=1 {{time_filter}}
Dependency Regressions
SQL
WITH rollup AS (
SELECT bucket AS timestamp, target_key, req_count, trace_count, error_count, sum_duration_ns, lat_hist
FROM apis.endpoint_dependency_edges
WHERE project_id='{{project_id}}' AND endpoint_hash='{{var-endpointHash}}'
), totals AS (
SELECT target_key, SUM(req_count) AS req_count, SUM(trace_count) AS trace_count,
SUM(error_count) AS error_count, SUM(sum_duration_ns) AS sum_duration_ns
FROM rollup WHERE 1=1 {{time_filter}} GROUP BY target_key
), hist AS (
SELECT target_key, key::int AS bucket, SUM(value::bigint) AS n
FROM rollup CROSS JOIN LATERAL jsonb_each_text(lat_hist)
WHERE 1=1 {{time_filter}} GROUP BY target_key, key
), ranked AS (
SELECT target_key, bucket, SUM(n) OVER (PARTITION BY target_key ORDER BY bucket) AS cumulative,
SUM(n) OVER (PARTITION BY target_key) AS total
FROM hist
), p95 AS (
SELECT DISTINCT ON (target_key) target_key,
ROUND((1000 * POWER(2, (bucket + 1) / 4.0) / 1000000.0)::numeric, 1)::text AS p95_ms
FROM ranked WHERE cumulative >= total * 0.95 ORDER BY target_key, bucket
)
SELECT
t.target_key AS operation, t.trace_count::text AS traces,
ROUND((t.error_count * 100.0 / GREATEST(1, t.req_count))::numeric, 2)::text AS error_rate,
p.p95_ms,
ROUND((t.sum_duration_ns::numeric / NULLIF(t.req_count, 0) / 1000000.0)::numeric, 1)::text AS avg_ms
FROM totals t LEFT JOIN p95 p USING (target_key)
ORDER BY t.error_count DESC, t.sum_duration_ns / NULLIF(t.req_count, 0) DESC
LIMIT 30
Downstream Time by Operation
SQL
WITH rollup AS (
SELECT bucket AS timestamp, bucket, target_key, sum_duration_ns
FROM apis.endpoint_dependency_edges
WHERE project_id='{{project_id}}' AND endpoint_hash='{{var-endpointHash}}'
)
SELECT extract(epoch from bucket)::integer AS time, target_key AS operation, SUM(sum_duration_ns)::float AS value
FROM rollup
WHERE 1=1 {{time_filter}}
GROUP BY bucket, target_key ORDER BY bucket DESC LIMIT 10000
No data in this time range
Try a wider time range or adjust the filters.
Dependency Traces
Open in Explorer
KQL
hashes[*]=="ffae3b36"