File: README.md

package info (click to toggle)
golang-ptutil 0.0~git20240710.6c4d8ed-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 100 kB
  • sloc: makefile: 2
file content (30 lines) | stat: -rw-r--r-- 676 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
PTutil
======

A collection of utilities for Pluggable Transports.

SafeLog
-------

A safer logging wrapper around the standard logging package. It removes private parts from the logs, like IP addresses.

```go
log.SetOutput(&safelog.LogScrubber{Output: os.Stderr})
```

SafeProm
--------

Implements some additional prometheus metrics that we need for privacy preserving
counts of users and proxies.

```go
usersTotal = safeprom.NewRoundedCounterVec(
    prometheus.CounterOpts{
        Name:      "rounded_users_total",
        Help:      "The number of users, rounded up to a multiple of 8",
    },
    []string{"status"},
)
usersTotal.WithLabelValues("active").Inc()
```