storageTrace<T> method
Traces an async storage operation under storageCategory.
path becomes the log target; bucket, sizeBytes, and contentType
are stored in meta.
Implementation
Future<T> storageTrace<T>({
required String source,
required String operation,
required Future<T> Function() run,
String? bucket,
String? path,
int? sizeBytes,
String? contentType,
Map<String, Object?>? meta,
Object? Function(T)? projectResult,
ISpectTraceConfig? config,
String? correlationId,
}) =>
traceCategoryAsync(
category: storageCategory,
source: source,
operation: operation,
target: path,
meta: {
if (bucket != null) 'bucket': bucket,
if (sizeBytes != null) 'sizeBytes': sizeBytes,
if (contentType != null) 'contentType': contentType,
...?meta,
},
run: run,
projectResult: projectResult,
config: config,
correlationId: correlationId,
);