Files
Flowise/packages/server/src/Interface.Metrics.ts
T
Vinod Kiran fe03683f0c FEATURE:: Support for metrics collection - Prometheus and Open Telemetry (#3420)
* adding support for prometheus and grafana

* open telemetry

* lint fixes

* missing counter and telemetry standardization

---------

Co-authored-by: Henry <hzj94@hotmail.com>
2024-11-08 00:00:43 +00:00

26 lines
814 B
TypeScript

export interface IMetricsProvider {
getName(): string
initializeCounters(): void
setupMetricsEndpoint(): void
incrementCounter(counter: FLOWISE_METRIC_COUNTERS, payload: any): void
}
export enum FLOWISE_COUNTER_STATUS {
SUCCESS = 'success',
FAILURE = 'failure'
}
export enum FLOWISE_METRIC_COUNTERS {
CHATFLOW_CREATED = 'chatflow_created',
AGENTFLOW_CREATED = 'agentflow_created',
ASSISTANT_CREATED = 'assistant_created',
TOOL_CREATED = 'tool_created',
VECTORSTORE_UPSERT = 'vector_upserted',
CHATFLOW_PREDICTION_INTERNAL = 'chatflow_prediction_internal',
CHATFLOW_PREDICTION_EXTERNAL = 'chatflow_prediction_external',
AGENTFLOW_PREDICTION_INTERNAL = 'agentflow_prediction_internal',
AGENTFLOW_PREDICTION_EXTERNAL = 'agentflow_prediction_external'
}