@@ -246,15 +246,25 @@ export interface EndpointMetric {
246246
247247// Metric types
248248export interface Metric {
249- id : string ;
249+ id ? : string ;
250250 name : string ;
251- type : 'gauge' | 'counter' | 'histogram' ;
251+ namespace ?: string ;
252+ subnamespace ?: string ;
253+ type ?: 'gauge' | 'counter' | 'histogram' ;
252254 value : number ;
253- unit : string ;
254- labels : Record < string , string > ;
255+ unit ?: string ;
256+ labels ?: Record < string , string > ;
257+ dimensions ?: Record < string , string > ;
255258 timestamp : string ;
256259 endpointId ?: string ;
257260 endpoint_id ?: string ;
261+ stats ?: {
262+ min : number ;
263+ max : number ;
264+ count : number ;
265+ sum : number ;
266+ } ;
267+ resolution ?: number ;
258268}
259269
260270export interface MetricSeries {
@@ -287,29 +297,39 @@ export interface Event {
287297}
288298
289299// Log types
300+ export interface LogMeta {
301+ platform ?: string ;
302+ app_name ?: string ;
303+ app_version ?: string ;
304+ container_id ?: string ;
305+ container_name ?: string ;
306+ unit ?: string ;
307+ service ?: string ;
308+ event_id ?: string ;
309+ user ?: string ;
310+ exe ?: string ;
311+ path ?: string ;
312+ extra ?: Record < string , string > ;
313+ }
314+
290315export interface LogEntry {
291- id : string ;
292- timestamp : string ;
293- level : 'debug' | 'info' | 'warning' | 'error' | 'fatal' | 'critical' ;
316+ id ? : string ; // Optional client-side ID for deduplication
317+ timestamp : string ; // ISO timestamp
318+ level : string ;
294319 message : string ;
295320 source : string ;
296321 category ?: string ;
297- endpointId ?: string ;
298- endpoint_id ?: string ;
299- endpoint_name ?: string ;
300- metadata ?: Record < string , any > ;
301- meta ?: Record < string , any > ;
322+ pid ?: number ;
323+ fields ?: Record < string , string > ;
302324 tags ?: Record < string , string > ;
303- target ?: string ;
304- unit ?: string ;
305- app_name ?: string ;
306- service ?: string ;
307- event_id ?: string ;
308- user ?: string ;
309- container_id ?: string ;
310- container_name ?: string ;
311- platform ?: string ;
312- fields ?: Record < string , any > ;
325+ meta ?: LogMeta ;
326+ }
327+
328+ export interface LogResponse {
329+ logs : LogEntry [ ] ;
330+ next_cursor ?: string ;
331+ has_more : boolean ;
332+ count : number ;
313333}
314334
315335// Process types
0 commit comments