@company-semantics/contracts 0.137.0 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/observability.ts +16 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -612,3 +612,7 @@ export type {
|
|
|
612
612
|
RequestDescriptor,
|
|
613
613
|
SchedulerEvent,
|
|
614
614
|
} from './requests'
|
|
615
|
+
|
|
616
|
+
// Observability envelope types (shared metric shape)
|
|
617
|
+
export { REQUEST_ID_HEADER } from './observability'
|
|
618
|
+
export type { Labels, MetricEnvelope, SchedulerMetricName } from './observability'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const REQUEST_ID_HEADER = 'x-request-id';
|
|
2
|
+
|
|
3
|
+
export type Labels = Record<string, string>;
|
|
4
|
+
export type MetricEnvelope =
|
|
5
|
+
| { kind: 'counter'; name: string; value: number; labels?: Labels; ts: number }
|
|
6
|
+
| { kind: 'gauge'; name: string; value: number; labels?: Labels; ts: number }
|
|
7
|
+
| { kind: 'histogram'; name: string; value: number; labels?: Labels; ts: number };
|
|
8
|
+
|
|
9
|
+
export type SchedulerMetricName =
|
|
10
|
+
| 'scheduler.inflight_requests'
|
|
11
|
+
| 'scheduler.queue_depth'
|
|
12
|
+
| 'scheduler.queue_wait_ms'
|
|
13
|
+
| 'scheduler.dedupe_hits'
|
|
14
|
+
| 'scheduler.heap_used_bytes'
|
|
15
|
+
| 'scheduler.rss_bytes'
|
|
16
|
+
| 'scheduler.fetch_latency_ms';
|