g3/g3statsd
Zhang Jingqiang 0f285d58f1
Some checks failed
CrossCompiling / Build (push) Has been cancelled
CrossCompiling / Build-1 (push) Has been cancelled
CrossCompiling / Build-2 (push) Has been cancelled
CrossCompiling / Build-3 (push) Has been cancelled
CrossCompiling / Build-4 (push) Has been cancelled
CrossCompiling / Build-5 (push) Has been cancelled
CrossCompiling / Build-6 (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeCoverage / lib unit test (push) Has been cancelled
CodeCoverage / g3mkcert test (push) Has been cancelled
CodeCoverage / g3keymess test (push) Has been cancelled
CodeCoverage / g3proxy test (push) Has been cancelled
CodeCoverage / g3bench test (push) Has been cancelled
CodeCoverage / g3statsd test (push) Has been cancelled
CodeQL Advanced / Analyze (java-kotlin) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
CodeQL Advanced / Analyze (rust) (push) Has been cancelled
CrossCompiling / Build-7 (push) Has been cancelled
CrossCompiling / Build-8 (push) Has been cancelled
CrossCompiling / Build-9 (push) Has been cancelled
Linux-CI / Build (push) Has been cancelled
Linux-CI / Build-1 (push) Has been cancelled
Linux-CI / Build-2 (push) Has been cancelled
Linux-CI / Build-3 (push) Has been cancelled
Linux-CI / Clippy (push) Has been cancelled
Linux-CI / Build vendored (push) Has been cancelled
Linux-CI / Build vendored-1 (push) Has been cancelled
Linux-CI / Build vendored-2 (push) Has been cancelled
Linux-CI / Build vendored-3 (push) Has been cancelled
Linux-CI / Build vendored-4 (push) Has been cancelled
Linux-CI / Build vendored-5 (push) Has been cancelled
Linux-CI / Build vendored-6 (push) Has been cancelled
Linux-CI / Build vendored-7 (push) Has been cancelled
Linux-CI / Build vendored-8 (push) Has been cancelled
Linux-CI / Build vendored-9 (push) Has been cancelled
Linux-CI / Build vendored-10 (push) Has been cancelled
Linux-CI / Build vendored-11 (push) Has been cancelled
Linux-CI / Build vendored-12 (push) Has been cancelled
Linux-CI / Build vendored-13 (push) Has been cancelled
Linux-CI / Build vendored-14 (push) Has been cancelled
Linux-CI / Build vendored-15 (push) Has been cancelled
Linux-CI / Build vendored-16 (push) Has been cancelled
Linux-CI / Build vendored-17 (push) Has been cancelled
Linux-CI / Build vendored-18 (push) Has been cancelled
Linux-CI / Build vendored-19 (push) Has been cancelled
Linux-CI / Build vendored-20 (push) Has been cancelled
Linux-CI / Build vendored-21 (push) Has been cancelled
Linux-CI / Build vendored-22 (push) Has been cancelled
Linux-CI / Build vendored-23 (push) Has been cancelled
Linux-CI / Build vendored-24 (push) Has been cancelled
Linux-CI / Build vendored-25 (push) Has been cancelled
Linux-CI / Build vendored-26 (push) Has been cancelled
Linux-CI / Build vendored-27 (push) Has been cancelled
Linux-CI / Build vendored-28 (push) Has been cancelled
Linux-CI / Build vendored-29 (push) Has been cancelled
Linux-CI / Build vendored-30 (push) Has been cancelled
Linux-CI / Build with OpenSSL Async Job (push) Has been cancelled
Linux-CI / Build with OpenSSL Async Job-1 (push) Has been cancelled
MacOS-CI / Build (push) Has been cancelled
MacOS-CI / Build vendored (push) Has been cancelled
MacOS-CI / Build vendored-1 (push) Has been cancelled
MacOS-CI / Build vendored-2 (push) Has been cancelled
MacOS-CI / Build vendored-3 (push) Has been cancelled
MacOS-CI / Build vendored-4 (push) Has been cancelled
MacOS-CI / Build vendored-5 (push) Has been cancelled
MacOS-CI / Build vendored-6 (push) Has been cancelled
MacOS-CI / Build vendored-7 (push) Has been cancelled
MacOS-CI / Build vendored-8 (push) Has been cancelled
MacOS-CI / Build vendored-9 (push) Has been cancelled
MacOS-CI / Build vendored-10 (push) Has been cancelled
MacOS-CI / Build vendored-11 (push) Has been cancelled
MacOS-CI / Build vendored-12 (push) Has been cancelled
MacOS-CI / Build vendored-13 (push) Has been cancelled
MacOS-CI / Build vendored-14 (push) Has been cancelled
MacOS-CI / Build vendored-15 (push) Has been cancelled
MacOS-CI / Build vendored-16 (push) Has been cancelled
MacOS-CI / Build vendored-17 (push) Has been cancelled
MacOS-CI / Build vendored-18 (push) Has been cancelled
MacOS-CI / Build vendored-19 (push) Has been cancelled
MacOS-CI / Build vendored-20 (push) Has been cancelled
MacOS-CI / Build vendored-21 (push) Has been cancelled
MacOS-CI / Build vendored-22 (push) Has been cancelled
MacOS-CI / Build vendored-23 (push) Has been cancelled
MacOS-CI / Build vendored-24 (push) Has been cancelled
StaticLinking / musl (push) Has been cancelled
StaticLinking / musl-1 (push) Has been cancelled
StaticLinking / msvc-vcpkg (push) Has been cancelled
StaticLinking / msvc-vendored (push) Has been cancelled
StaticLinking / msvc-vendored-1 (push) Has been cancelled
StaticLinking / msvc-vendored-2 (push) Has been cancelled
StaticLinking / msvc-vendored-3 (push) Has been cancelled
Windows-CI / Build (push) Has been cancelled
Windows-CI / Build vendored (push) Has been cancelled
Windows-CI / Build vendored-1 (push) Has been cancelled
Windows-CI / Build vendored-2 (push) Has been cancelled
Windows-CI / Build vendored-3 (push) Has been cancelled
Windows-CI / Build vendored-4 (push) Has been cancelled
Windows-CI / Build vendored-5 (push) Has been cancelled
Windows-CI / Build vendored-6 (push) Has been cancelled
Windows-CI / Build vendored-7 (push) Has been cancelled
Windows-CI / Build vendored-8 (push) Has been cancelled
Windows-CI / Build vendored-9 (push) Has been cancelled
Windows-CI / Build vendored-10 (push) Has been cancelled
Windows-CI / Build vendored-11 (push) Has been cancelled
Windows-CI / Build vendored-12 (push) Has been cancelled
Windows-CI / Build vendored-13 (push) Has been cancelled
Windows-CI / Build vendored-14 (push) Has been cancelled
Windows-CI / Build vendored-15 (push) Has been cancelled
Windows-CI / Build vendored-16 (push) Has been cancelled
Windows-CI / Build vendored-17 (push) Has been cancelled
Windows-CI / Build vendored-18 (push) Has been cancelled
Windows-CI / Build vendored-19 (push) Has been cancelled
Windows-CI / Build vendored-20 (push) Has been cancelled
Windows-CI / Build vendored-21 (push) Has been cancelled
Windows-CI / Build vendored-22 (push) Has been cancelled
Windows-CI / Build vendored-23 (push) Has been cancelled
bump MSRV to 1.90
2025-12-26 22:53:05 +08:00
..
debian update package files 2025-08-18 21:51:46 +08:00
examples g3statsd: allow to listen to unix statsd socket 2025-06-02 15:43:55 +08:00
proto update packages and ignore warning in generated code 2025-06-27 10:55:11 +08:00
service g3statsd version 0.1.0 2025-05-13 21:25:13 +08:00
src update packages 2025-12-26 09:47:41 +08:00
utils/ctl switch to use SPDX license identifier and update copyright year 2025-05-16 18:30:35 +08:00
build.rs switch to use SPDX license identifier and update copyright year 2025-05-16 18:30:35 +08:00
Cargo.toml update packages 2025-12-26 09:47:41 +08:00
CHANGELOG bump MSRV to 1.90 2025-12-26 22:53:05 +08:00
g3statsd.spec update rpm build file 2025-08-17 23:39:22 +08:00
README.md update doc 2025-06-18 12:01:16 +08:00

docs

g3statsd

g3statsd is statsd-compatible stats aggregator.

It is developed to meet the needs in G3 project as all applications use StatsD as metrics sending protocol.

The features make it different from other statsd server implementations are:

  • written in async rust, which make it efficient and safe
  • compatible with DogStatsD protocol, tags supported
  • each exporter has its own emit interval
  • can aggregate gauge metric values when dropping tags

There are still many features missing as the current focus is our internal usage, feel free to submit feature request issues. PRs are also welcomed.

Building

You need to follow the dev-setup guide to set up your build environment first.

To build debug binaries:

cargo build -p g3statsd -p g3statsd-ctl

To build release binaries:

cargo build --profile release-lto -p g3statsd -p g3statsd-ctl

See Build and Package if you want to build binary packages or docker images.

Supported Metric Types

  • c - COUNT
  • g - GAUGE
  • h - HISTOGRAM (unsupported yet)
  • ms - TIMER (unsupported yet)

Supported Importers

  • statsd

    Accept StatsD metrics, and send them to collectors.

    Only UDP is supported at this time.

Supported Collectors

  • aggregate

    Aggregate received metrics and send them to exporters.

    You can set join_tags in this collector to join metrics when drop tags.

  • regulate

    Make some changes to the received metrics and send directly to exporters.

    The supported actions are:

    • prefix - add a common name prefix to all metrics
    • drop_tags - drop tags for all metrics

Supported Exporters

Exporter Introduction Aggregate Global prefix and tags
console Log all metrics to stdout no no
discard Discard all metrics no no
memory Store all metrics values in memory no no
graphite Emit to graphite by using the plaintext protocol yes yes
opentsdb Emit to OpenTSDB by using the /api/put API yes yes
influxdb_v2 Emit to InfluxDB v2 by using the /api/v2/write API yes yes
influxdb_v3 Emit to InfluxDB v3 by using the /api/v3/write_lp API yes yes

Documents

You can view the reference documentation generated by sphinx online at Read the Docs.

Examples

You can find example config in the examples directory.