mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-10-10 03:56:39 +01:00
Add tracing events for tracking query execution and upload documents (#2100)
* Add tracing for Execute (submit) query and Upload documents * Trace query closer to iterator operation * Add warnings to values used in Fabric * Fix format * Don't trace execute queries for filtering calls * Remove tracing call for documents tab filtering * Fix failing unit test. --------- Co-authored-by: Jade Welton <[email protected]> Co-authored-by: Sevo Kukol <[email protected]>
This commit is contained in:
co-authored by
Jade Welton
Sevo Kukol
parent
d5fe2d9e9f
commit
27c9ea7ab6
@@ -1,5 +1,8 @@
|
||||
import { QueryOperationOptions } from "@azure/cosmos";
|
||||
import { Action } from "Shared/Telemetry/TelemetryConstants";
|
||||
import * as Constants from "../Common/Constants";
|
||||
import { QueryResults } from "../Contracts/ViewModels";
|
||||
import * as TelemetryProcessor from "../Shared/Telemetry/TelemetryProcessor";
|
||||
|
||||
interface QueryResponse {
|
||||
// [Todo] remove any
|
||||
@@ -21,7 +24,9 @@ export function nextPage(
|
||||
firstItemIndex: number,
|
||||
queryOperationOptions?: QueryOperationOptions,
|
||||
): Promise<QueryResults> {
|
||||
TelemetryProcessor.traceStart(Action.ExecuteQuery);
|
||||
return documentsIterator.fetchNext(queryOperationOptions).then((response) => {
|
||||
TelemetryProcessor.traceSuccess(Action.ExecuteQuery, { dataExplorerArea: Constants.Areas.Tab });
|
||||
const documents = response.resources;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const headers = (response as any).headers || {}; // TODO this is a private key. Remove any
|
||||
|
||||
Reference in New Issue
Block a user