mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-10-11 20:54:42 +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
@@ -1044,9 +1044,22 @@ export default class Collection implements ViewModels.Collection {
|
||||
}
|
||||
|
||||
public async uploadFiles(files: FileList): Promise<{ data: UploadDetailsRecord[] }> {
|
||||
const data = await Promise.all(Array.from(files).map((file) => this.uploadFile(file)));
|
||||
|
||||
return { data };
|
||||
try {
|
||||
TelemetryProcessor.trace(Action.UploadDocuments, ActionModifiers.Start, {
|
||||
nbFiles: files.length,
|
||||
});
|
||||
const data = await Promise.all(Array.from(files).map((file) => this.uploadFile(file)));
|
||||
TelemetryProcessor.trace(Action.UploadDocuments, ActionModifiers.Success, {
|
||||
nbFiles: files.length,
|
||||
});
|
||||
return { data };
|
||||
} catch (error) {
|
||||
TelemetryProcessor.trace(Action.UploadDocuments, ActionModifiers.Failed, {
|
||||
error: getErrorMessage(error),
|
||||
errorStack: getErrorStack(error),
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
private uploadFile(file: File): Promise<UploadDetailsRecord> {
|
||||
|
||||
Reference in New Issue
Block a user