1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/requests-per-second-segmented-schema.ts
Gastón Fournier 5fe238c896
task: Expose prometheus metrics (#2586)
## About the changes
This connects our backend with Prometheus (or compatible) metrics
service, and exposes raw data (i.e. acting as a proxy)

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2022-12-12 14:05:56 +01:00

24 lines
695 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
import { requestsPerSecondSchema } from './requests-per-second-schema';
export const requestsPerSecondSegmentedSchema = {
$id: '#/components/schemas/requestsPerSecondSegmentedSchema',
type: 'object',
properties: {
clientMetrics: {
$ref: '#/components/schemas/requestsPerSecondSchema',
},
adminMetrics: {
$ref: '#/components/schemas/requestsPerSecondSchema',
},
},
components: {
schemas: {
requestsPerSecondSchema,
},
},
} as const;
export type RequestsPerSecondSegmentedSchema = FromSchema<
typeof requestsPerSecondSegmentedSchema
>;