Open JacobHayes opened 1 month ago
This also seems to be an issue with:
Requests Average Duration
(~halving durations, since the FastAPI Arguments
time is ~always so fast)Trend Routes
(doubling counts)The other charts seem to either filter by attributes ? 'http.status_code'
(eg: Requests
) or parent_span_id is null
(eg: Exceptions
).
Adding the filters to the queries might be fine, but alternatively maybe it'd make sense to remove the http.method
and http.route
attributes from the FastAPI Arguments
span (logfire.fastapi
) since it'll always(?) be nested within the opentelemetry.instrumentation.fastapi
span.
Description
When using the FastAPI instrumentation, the default "Percent of 2xx Requests" chart query matches both the root
{HTTP METHOD} {URL}
span + theFastAPI arguments
inner span. However, the "FastAPI arguments" inner span does not record ahttp.status_code
(naturally) so that row hashttp_status_code=null
, which then doublescount_all_requests
, cappingpercent_2xx_requests
at 50%.Adding
and attributes ? 'http.status_code'
orand parent_span_id is NULL
to theWHERE
clause in the first CTE might be the easiest fix.If this isn't the right place to submit bugs for the console, happy to post elsewhere!
Python, Logfire & OS Versions, related packages (not required)