chore(server): add comment attachment storage metrics (#13143)

close AF-2728



#### PR Dependency Tree


* **PR #13143** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added metrics tracking for comment attachment uploads, including
recording attachment size and total uploads by MIME type.
* Enhanced logging for attachment uploads with detailed information such
as workspace ID, document ID, file size, and user ID.

* **Chores**
* Expanded internal metric categories to include storage-related
metrics.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
fengmk2
2025-07-10 23:43:12 +08:00
committed by GitHub
parent 46901c472c
commit fc1104cd68
2 changed files with 13 additions and 3 deletions
@@ -59,7 +59,8 @@ export type KnownMetricScopes =
| 'mail'
| 'ai'
| 'event'
| 'queue';
| 'queue'
| 'storage';
const metricCreators: MetricCreators = {
counter(meter: Meter, name: string, opts?: MetricOptions) {