Skip to content

EXPORTER_METRICS

const EXPORTER_METRICS: object

Defined in: packages/core/src/exporter.ts:30

The instruments every Shardlens exporter registers. Labels are bounded: command names, bucketed REST routes, statuses, shard numbers and custom event names you chose. There is no user or server label anywhere.

readonly cache_size: object

readonly description: "discord.js cache sizes (users, channels)." = 'discord.js cache sizes (users, channels).'

readonly kind: "gauge" = 'gauge'

readonly labels: readonly ["cache"]

readonly unit: "1" = '1'

readonly custom_events: object

readonly description: "Custom events recorded with track(), by name." = 'Custom events recorded with track(), by name.'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["name"]

readonly unit: "1" = '1'

readonly entitlements: object

readonly description: "Entitlement changes (create, update, delete)." = 'Entitlement changes (create, update, delete).'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["action"]

readonly unit: "1" = '1'

readonly eventloop_delay_p99: object

readonly description: "Event loop delay, 99th percentile over the last 30 seconds." = 'Event loop delay, 99th percentile over the last 30 seconds.'

readonly kind: "gauge" = 'gauge'

readonly labels: readonly [] = []

readonly unit: "seconds" = 'seconds'

readonly guild_events: object

readonly description: "Servers joined and left, and outages (unavailable, available)." = 'Servers joined and left, and outages (unavailable, available).'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["event"]

readonly unit: "1" = '1'

readonly guilds: object

readonly description: "Servers per shard." = 'Servers per shard.'

readonly kind: "gauge" = 'gauge'

readonly labels: readonly ["shard"]

readonly unit: "1" = '1'

readonly identify_remaining: object

readonly description: "Gateway sessions left in Discord's daily identify budget." = "Gateway sessions left in Discord's daily identify budget."

readonly kind: "gauge" = 'gauge'

readonly labels: readonly [] = []

readonly unit: "1" = '1'

readonly interaction_errors: object

readonly description: "Errors thrown by wrapped handlers, by error class (never the message)." = 'Errors thrown by wrapped handlers, by error class (never the message).'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["command", "error_class"]

readonly unit: "1" = '1'

readonly interaction_handler: object

readonly description: "Time spent in a handler wrapped with lens.wrap(), or reported for a message command." = 'Time spent in a handler wrapped with lens.wrap(), or reported for a message command.'

readonly kind: "histogram" = 'histogram'

readonly labels: readonly ["kind", "command"]

readonly unit: "seconds" = 'seconds'

readonly interaction_response: object

readonly description: "Time from Discord's interaction timestamp to the first response. Discord's deadline is 3 seconds." = "Time from Discord's interaction timestamp to the first response. Discord's deadline is 3 seconds."

readonly kind: "histogram" = 'histogram'

readonly labels: readonly ["kind", "command"]

readonly unit: "seconds" = 'seconds'

readonly interactions: object

readonly description: "Interactions handled (commands, context menus, components, modals, autocomplete) and message (prefix) commands, by outcome." = 'Interactions handled (commands, context menus, components, modals, autocomplete) and message (prefix) commands, by outcome.'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["kind", "command", "outcome"]

readonly unit: "1" = '1'

readonly memory: object

readonly description: "Process memory (rss, heap_used)." = 'Process memory (rss, heap_used).'

readonly kind: "gauge" = 'gauge'

readonly labels: readonly ["type"]

readonly unit: "bytes" = 'bytes'

readonly ratelimits: object

readonly description: "Requests held back for a rate limit, by scope (user, global or shared)." = 'Requests held back for a rate limit, by scope (user, global or shared).'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["scope"]

readonly unit: "1" = '1'

readonly rest_invalid_requests: object

readonly description: "Responses that count towards Discord's invalid-request limit (10,000 per 10 minutes per IP)." = "Responses that count towards Discord's invalid-request limit (10,000 per 10 minutes per IP)."

readonly kind: "counter" = 'counter'

readonly labels: readonly ["status"]

readonly unit: "1" = '1'

readonly rest_requests: object

readonly description: "REST requests to Discord, by method, bucketed route and status." = 'REST requests to Discord, by method, bucketed route and status.'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["method", "route", "status"]

readonly unit: "1" = '1'

readonly shard_events: object

readonly description: "Shard state changes (ready, resumed, reconnecting, disconnected, error, invalidated)." = 'Shard state changes (ready, resumed, reconnecting, disconnected, error, invalidated).'

readonly kind: "counter" = 'counter'

readonly labels: readonly ["shard", "state"]

readonly unit: "1" = '1'

readonly shard_ping: object

readonly description: "Gateway heartbeat latency per shard." = 'Gateway heartbeat latency per shard.'

readonly kind: "gauge" = 'gauge'

readonly labels: readonly ["shard"]

readonly unit: "seconds" = 'seconds'