Skip to content

Commit

Permalink
Merge pull request #672 from joshuali925/integrations-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudha authored Jul 14, 2023
2 parents 685a741 + dcd21ee commit 8c12cba
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions server/common/metrics/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ export const INTERVAL = 60;
export const CAPACITY = (WINDOW / INTERVAL) * 2;
export const MILLIS_MULTIPLIER = 1000;

export const COMPONENTS = [
'application_analytics',
'operational_panels',
'event_analytics',
'notebooks',
'trace_analytics',
'metrics_analytics',
'integrations',
] as const;
export const REQUESTS = ['create', 'get', 'update', 'delete'] as const;
const commonRequests = ['create', 'get', 'update', 'delete', 'add_samples'] as const;

// object of each component and its specific requests
export const COMPONENTS = {
application_analytics: commonRequests,
operational_panels: [...commonRequests, 'fetch_visualization'],
event_analytics: commonRequests,
notebooks: [...commonRequests, 'run_sql_query', 'run_ppl_query', 'fetch_visualization'],
trace_analytics: commonRequests,
metrics_analytics: commonRequests,
integrations: commonRequests,
} as const;

export const GLOBAL_BASIC_COUNTER: CounterType = (() => {
const counter = {} as CounterType;
Expand Down

0 comments on commit 8c12cba

Please sign in to comment.