Skip to content
Shardlens
Search
Ctrl
K
Cancel
GitHub
Select theme
Dark
Light
Auto
Menu
Getting started
Quick start
Choose your setup
Install with an AI agent
Installation
Configuration
Self-hosting
Docker Compose
Railway
Render
Embedded mode
Your own database
Exporter only
Scaling
Upgrading
Guides
Custom events
Wrapping handlers
Command handlers and frameworks
Prefix commands
Sharding
HTTP bots
Webhook events
Hashed or identified users
The /privacy command
Alerts
Reports in Discord
Badges
Grafana
Use your own dashboard
Concepts
Architecture
Data collected
Metrics
Privacy model
Discord limits
Reference
CLI
Collector environment
SDK reference
Overview
@shardlens/client
Overview
Classes
ShardlensClientError
Interfaces
ActivityLogFilters
ActivityLogPage
ActivityRow
ActivityTopUsers
AudienceQuery
AudienceResult
BurstsQuery
BurstsResult
CommandQuery
CommandResult
CommandRow
CommandsQuery
CommandsResult
EventPropKeys
EventPropsQuery
EventPropValues
EventsQuery
EventsResult
Filter
FunnelQuery
FunnelResult
GaugeQuery
GaugeResult
GrowthQuery
GrowthResult
HeatmapQuery
HeatmapResult
InstallsQuery
InstallsResult
KeyCount
LiveUpdate
Meta
NullableKeyCount
OverviewQuery
OverviewResult
PremiumQuery
PremiumResult
QueryResults
ReliabilityQuery
ReliabilityResult
RequestOptions
RetentionQuery
RetentionResult
SdkInstance
SeriesQuery
SeriesResult
ServerProfile
ServerQuery
ServerRow
ServersQuery
ServersResult
ShardlensActivity
ShardlensClient
ShardlensClientOptions
TimeRange
TopQuery
TopResult
Type Aliases
ActivityOutcome
Dimension
EventPropsResult
QuerySpec
SeriesMetric
ServerResult
Stat
Step
Functions
createShardlensClient
lastDays
@shardlens/core
Overview
Classes
BoundedQueue
ShardlensClient
UserHasher
Interfaces
ClientOptions
ClientStats
CustomEvents
EventSpool
ExporterMetric
FlushOptions
Logger
MetricSink
QueuedItem
ShardlensExporter
SourceInfo
WireEvent
Type Aliases
CustomEventName
CustomEventProps
CustomProps
CustomPropValue
DataMode
ExporterMetricName
Histogram
MetricLabels
Priority
SaltPeriod
Variables
BACKOFF_MAX_MS
BACKOFF_MIN_MS
BUCKETS
CUSTOM_EVENT_NAME
DEFAULT_DURATION_BUCKETS
EXPORTER_METRICS
HASH_BYTES
HASH_VERSION
MAX_CUSTOM_ID_LENGTH
MAX_CUSTOM_PROPS_BYTES
MAX_MS
PRIORITIES
Functions
avatarHash
backoffMs
bucketOf
bucketUpperMs
compact
cutText
errorClass
errorCode
gzipJson
isAllowedEndpoint
mergeHistograms
newHistogram
nextPeriodStart
normaliseCustomId
observe
periodLabel
quantile
recordedOptionValue
redactSecrets
sanitiseCustomProps
translateEvent
uuidv7
uuidv7Timestamp
@shardlens/discordjs
Overview
Interfaces
CustomEvents
HandlerResult
MessageCommandInfo
MessageCommandRun
PrivacyCommand
PrivacyCommandOptions
Shardlens
ShardlensExporter
ShardlensOptions
ShardlensStats
TrackContext
Type Aliases
MetricGroup
Functions
createPrivacyCommand
createShardlens
normaliseRoute
@shardlens/exporter-otel
Overview
Interfaces
OpenTelemetryExporterOptions
Functions
openTelemetryExporter
References
DEFAULT_DURATION_BUCKETS
@shardlens/exporter-prometheus
Overview
Interfaces
MetricsServer
PrometheusExporter
PrometheusExporterOptions
ServeOptions
Variables
DEFAULT_DURATION_BUCKETS
Functions
prometheusExporter
prometheusName
@shardlens/http
Overview
Interfaces
RawInteraction
RawInteractionData
RawOption
RawUser
ShardlensHttp
ShardlensHttpOptions
TrackContext
WaitUntilContext
Functions
createShardlensHttp
References
CustomEvents
HTTP API
Overview
SDK
Overview
Send a batch of events
Salts, sampling and data mode for the SDK
Discord
Overview
Discord webhook events
Data
Overview
Run a typed query
Application name, mode and time zone
Live tiles (Server-Sent Events)
Public SVG badge (opt-in per metric)
Admin
Overview
Read settings
Change settings
List API keys
Create an API key (shown once)
Revoke an API key
Alert rules and history
Create an alert rule
Delete a rule
Turn a rule on or off
Send a test message
Scheduled reports
Create a scheduled report
Delete a report
Turn a report on or off
Send a report now
Audit mode
Overview
Activity log (who ran what)
Most active users in the last 24 hours or 7 days
Export the activity log as CSV
Who viewed, looked up, exported or erased audit data
Privacy
Overview
Erase everything stored about a user
Auth
Overview
Start "Sign in with Discord"
OAuth2 callback
Sign in with a read key (view-only session)
Sign out
Current session
Health
Overview
Liveness
Readiness (database reachable)
Operations
Security
Backups
Troubleshooting
FAQ
Contributing
Development
Testing
Releasing
Decision records
GitHub
Select theme
Dark
Light
Auto
HASH_BYTES
const
HASH_BYTES
:
16
=
16
Defined in:
packages/core/src/hash.ts:23