prom-client#Counter TypeScript Examples

The following examples show how to use prom-client#Counter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: prometheus.ts    From monkeytype with GNU General Public License v3.0 6 votes vote down vote up
result = new Counter({
  name: "result_saved_total",
  help: "Counts result saves",
  labelNames: [
    "mode",
    "mode2",
    "isPb",
    "blindMode",
    "lazyMode",
    "difficulty",
    "numbers",
    "punctuation",
  ],
})
Example #2
Source File: server.ts    From casper-clarity with Apache License 2.0 6 votes vote down vote up
constructor() {
    this.faucetRequestCounter = new promClient.Counter({
      name: 'faucet_request_total',
      help: 'Count of faucet requests'
    });
    this.deployRequestCounter = new promClient.Counter({
      name: 'deploy_request_total',
      help: 'Count of deploy requests'
    });
    this.accountKeyGauge = new promClient.Gauge({
      name: 'account_key_total',
      help: 'Count of account key'
    });
    this.accountGauge = new promClient.Gauge({
      name: 'user_account_total',
      help: 'Count of user account'
    });
    this.dailyLoginGauge = new promClient.Gauge({
      name: 'daily_login_days',
      help: 'Number of logins every day'
    });
    this.dailySignupGauge = new promClient.Gauge({
      name: 'daily_signup_days',
      help: 'Number of sign up every day'
    });
  }
Example #3
Source File: server.ts    From clarity with Apache License 2.0 6 votes vote down vote up
constructor() {
    this.faucetRequestCounter = new promClient.Counter({
      name: 'faucet_request_total',
      help: 'Count of faucet requests'
    });
    this.deployRequestCounter = new promClient.Counter({
      name: 'deploy_request_total',
      help: 'Count of deploy requests'
    });
    this.accountKeyGauge = new promClient.Gauge({
      name: 'account_key_total',
      help: 'Count of account key'
    });
    this.accountGauge = new promClient.Gauge({
      name: 'user_account_total',
      help: 'Count of user account'
    });
    this.dailyLoginGauge = new promClient.Gauge({
      name: 'daily_login_days',
      help: 'Number of logins every day'
    });
    this.dailySignupGauge = new promClient.Gauge({
      name: 'daily_signup_days',
      help: 'Number of sign up every day'
    });
  }
Example #4
Source File: server.ts    From casper-clarity with Apache License 2.0 5 votes vote down vote up
public faucetRequestCounter: Counter<string>;
Example #5
Source File: prometheus.ts    From monkeytype with GNU General Public License v3.0 5 votes vote down vote up
serverVersionCounter = new Counter({
  name: "api_server_version",
  help: "The server's current version",
  labelNames: ["version"],
})
Example #6
Source File: prometheus.ts    From monkeytype with GNU General Public License v3.0 5 votes vote down vote up
clientVersionsCounter = new Counter({
  name: "api_client_versions",
  help: "Records frequency of client versions",
  labelNames: ["version"],
})
Example #7
Source File: prometheus.ts    From monkeytype with GNU General Public License v3.0 5 votes vote down vote up
resultFunbox = new Counter({
  name: "result_funbox_total",
  help: "Counts result funbox",
  labelNames: ["funbox"],
})
Example #8
Source File: prometheus.ts    From monkeytype with GNU General Public License v3.0 5 votes vote down vote up
resultLanguage = new Counter({
  name: "result_language_total",
  help: "Counts result langauge",
  labelNames: ["language"],
})
Example #9
Source File: prometheus.ts    From monkeytype with GNU General Public License v3.0 5 votes vote down vote up
dailyLb = new Counter({
  name: "daily_leaderboard_update_total",
  help: "Counts daily leaderboard updates",
  labelNames: ["mode", "mode2", "language"],
})
Example #10
Source File: prometheus.ts    From monkeytype with GNU General Public License v3.0 5 votes vote down vote up
auth = new Counter({
  name: "api_request_auth_total",
  help: "Counts authentication events",
  labelNames: ["type"],
})
Example #11
Source File: server.ts    From casper-clarity with Apache License 2.0 5 votes vote down vote up
public deployRequestCounter: Counter<string>;
Example #12
Source File: metrics.ts    From backstage with Apache License 2.0 5 votes vote down vote up
export function createCounterMetric<T extends string>(
  config: CounterConfiguration<T>,
): Counter<T> {
  const existing = register.getSingleMetric(config.name) as Counter<T>;
  return existing || new Counter<T>(config);
}
Example #13
Source File: metrics.ts    From discord with GNU General Public License v3.0 5 votes vote down vote up
public static counterApiResponses = new Counter({
    name: 'fsb_api_responses',
    help: 'Keep track of discord api responses',
    labelNames: [ 'status' ]
  })
Example #14
Source File: metrics.ts    From discord with GNU General Public License v3.0 5 votes vote down vote up
public static counterOutgoing = new Counter({
    name: 'fsb_outgoing',
    help: 'Keeps track of the total amount of announcement messages sent',
    labelNames: [ 'status' ]
  })
Example #15
Source File: metrics.ts    From discord with GNU General Public License v3.0 5 votes vote down vote up
public static counterInteractions = new Counter({
    name: 'fsb_interactions',
    help: 'Keeps track of the total amount of interactions',
    labelNames: [ 'type', 'name' ]
  })
Example #16
Source File: metrics.ts    From discord with GNU General Public License v3.0 5 votes vote down vote up
public static counterGatewayEvents = new Counter({
    name: 'fsb_gateway_events',
    help: 'Keeps track of the total amount of incoming gateway events',
    labelNames: [ 'type' ]
  })
Example #17
Source File: server.ts    From clarity with Apache License 2.0 5 votes vote down vote up
public deployRequestCounter: Counter<string>;
Example #18
Source File: server.ts    From clarity with Apache License 2.0 5 votes vote down vote up
public faucetRequestCounter: Counter<string>;