Send metrics from your app
Most metrics platforms are built around always-on, container-heavy systems. Distlang Metrics takes a different approach: an API first serverless metrics platform designed to stay lightweight when traffic is low and still make fresh metrics available in the dashboard quickly.
Distlang lets you send metrics directly from application code and see them show up in the dashboard quickly.
const metrics = client.metrics.createRecorder({
accessToken: process.env.DISTLANG_ACCESS_TOKEN,
metricSet: "metrics-tests-app",
definitions: {
configReqCount: "counter",
trafficReqCount: "counter",
trafficLatency: "histogram",
},
});
metrics.configReqCount.inc({ route: "/test/config", method: "POST" });
metrics.trafficReqCount.inc({ route: "/test/ping/:text", method: "GET" });
metrics.trafficLatency.observe(142, { route: "/test/ping/:text", method: "GET" }); Send metrics directly from your app. No pipeline to manage.
Distlang Metrics running in the hosted dashboard with Dark Mode on.
The chart titles and descriptions are suggested automatically based on the metrics being ingested. Platform-specific docs are available below.