aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 2889e1a4e8f631139f0a4574d8b2804dabbbc7e6 (plain) (blame)
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
runit-otel
==========

A /etc/vlogger replacement or enhancer to send logs to an opentelemetry collector.

Usage
-----

Copy the binary to `/etc/vlogger` if all stdout logs should be sent to
opentelemetry, or add a file such as this one to both send logs to
opentelemetry and process the logs as normal.


```sh
#!/usr/bin/env sh

level="${2:-"level"}"
facility="${3:-"user"}"
tag="${1:-"${facility}"}"

exec runit-otel "$tag" "$level" "$facility" | logger --tag "$tag" --priority "$facility"."$level"
```

TODO
----

- [ ] GRPC
- [ ] Configure by environment variables
- [ ] Syslog (through `socklog unix /dev/log`)