Log extension queries to axiom (#13752)

Log extension queries to axiom. Longer term it'd be nice to get this in
clickhouse, but that requires a bit more work.

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-07-02 15:24:56 -06:00 committed by GitHub
parent 7db68547fa
commit b7cb2381f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,9 +53,17 @@ async fn get_extensions(
let extensions = if let Some(extension_ids) = extension_ids {
app.db.get_extensions_by_ids(&extension_ids, None).await?
} else {
app.db
let result = app
.db
.get_extensions(params.filter.as_deref(), params.max_schema_version, 500)
.await?
.await?;
if let Some(query) = params.filter.as_deref() {
let count = result.len();
tracing::info!(query, count, "extension_search")
}
result
};
Ok(Json(GetExtensionsResponse { data: extensions }))