All Projects → cristalhq → sqlmetrics

cristalhq / sqlmetrics

Licence: MIT license
Prometheus metrics for Go database/sql via VictoriaMetrics/metrics

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to sqlmetrics

victoriametrics-ru-links
Список постов и видеозаписей об VictoriaMetrics на русском языке
Stars: ✭ 1 (-95.24%)
Mutual labels:  observability, victoriametrics
STAM
STAM, Streaming Topology Analysis Method
Stars: ✭ 26 (+23.81%)
Mutual labels:  observability
nestjs-otel
OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
Stars: ✭ 273 (+1200%)
Mutual labels:  observability
slab
An extensible Scala framework for creating monitoring dashboards.
Stars: ✭ 23 (+9.52%)
Mutual labels:  observability
skywalking-banyandb
An observability database aims to ingest, analyze and store Metrics, Tracing and Logging data.
Stars: ✭ 111 (+428.57%)
Mutual labels:  observability
beefheart
A tool to index Fastly realtime analytics metrics into Elasticsearch.
Stars: ✭ 14 (-33.33%)
Mutual labels:  observability
tevere
🏞 Decentralized DB over IPFS
Stars: ✭ 57 (+171.43%)
Mutual labels:  db
easeagent
An agent component for the Java system
Stars: ✭ 437 (+1980.95%)
Mutual labels:  observability
datadog-actions-metrics
Send GitHub Actions metrics to Datadog
Stars: ✭ 27 (+28.57%)
Mutual labels:  observability
k8s-istio-observe-frontend
Angular 12-based front-end UI for k8s Golang observability project: https://github.com/garystafford/k8s-istio-observe-backend/tree/2021-istio
Stars: ✭ 20 (-4.76%)
Mutual labels:  observability
cryostat-operator
An OpenShift Operator to facilitate setup and management of Cryostast and expose the Cryostat API through Kubernetes Custom Resources.
Stars: ✭ 25 (+19.05%)
Mutual labels:  observability
MeowDB.js
Database in JSON (Node.JS Library)
Stars: ✭ 12 (-42.86%)
Mutual labels:  db
trouble-training
FullStack DDD/CQRS with GraphQL workshop including distributed tracing and monitoring. This shows the configuration from React frontend to .Net backend.
Stars: ✭ 271 (+1190.48%)
Mutual labels:  observability
esp-insights
ESP Insights: A remote diagnostics/observability framework for connected devices
Stars: ✭ 31 (+47.62%)
Mutual labels:  observability
realopinsight
✔️ Measure and observe end-user applications availability - Define and track SLA/SLO targets through Prometheus-alike metrics and built-in reports - Kubernetes®, Zabbix®, Nagios®.
Stars: ✭ 55 (+161.9%)
Mutual labels:  observability
db-command
Performs basic database operations using credentials stored in wp-config.php.
Stars: ✭ 65 (+209.52%)
Mutual labels:  db
skywalking-query-protocol
Query Protocol for Apache SkyWalking in GraphQL format
Stars: ✭ 45 (+114.29%)
Mutual labels:  observability
grafana-operator
An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
Stars: ✭ 449 (+2038.1%)
Mutual labels:  observability
firehose
firehose: the metrics gateway for prometheus
Stars: ✭ 23 (+9.52%)
Mutual labels:  observability
pgbouncer wrapper
SQL wrapper around pgbouncer's console
Stars: ✭ 18 (-14.29%)
Mutual labels:  observability

sqlmetrics

build-img pkg-img reportcard-img coverage-img version-img

Prometheus metrics for Go database/sql via VictoriaMetrics/metrics

Features

  • Simple API.
  • Easy to integrate.

Install

Go version 1.16+

go get github.com/cristalhq/sqlmetrics

Example

import (
    "github.com/VictoriaMetrics/metrics"
    "github.com/cristalhq/sqlmetrics"
)

// ...

db, err := sql.Open("<some-connection-string>")
if err != nil {
    panic(err)
}

ctx := context.Background() // or any other context you have
every := 3 * time.Second

sqlmetrics.NewCollector(ctx, db, every, "label1", "value1", "another", "etc")

// done, db metrics are registered
// you can see them here
w := &bytes.Buffer{}
metrics.WritePrometheus(w, true)

See this examples: example_test.go.

Documentation

See these docs.

License

MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].