For simplicity’s sake this puts everything into the
alacritty-change-color-scheme script for now.
This implements a simple dbus-opentelemetry proxy adapter, which
allows services to record otel traces without having to depend on the
quite complex otel libraries. Instead, they just send their traces to
the dbus tracing interface, and the service that binds against that
interface forwards the spans to the OTLP collector.
First you create a new Tracer for your service via the `TracerFactory`
interface:
```
> busctl --user call \
de.profpatsch.otel.Tracer \
/de/profpatsch/otel/TracerFactory \
de.profpatsch.otel.TracerFactory CreateTracer \
s hello
s "/de/profpatsch/otel/tracers/hello"
```
(this corresponds to setting up a tracer with properties in OTEL)
Then, you can use the returned object path to call the `Tracer`
interface proper:
```
< busctl --user call \
de.profpatsch.otel.Tracer \
/de/profpatsch/otel/tracers/hello \
de.profpatsch.otel.Tracer \
StartSpan \
s '{"spanId": "111", "name": "111"}'
```
This will create the spans. You can also set their timestamps on the
sending side via `startTime`/`endTime`, but make sure it’s a hrtime
tuple.
Prefer batching multiple spans vie the `BatchSpans` call.
Change-Id: Ie6cfdcb0dc3e2398316a2c1763bc72c1118168b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12885
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: benjaminedwardwebb <benjaminedwardwebb@gmail.com>
Profpatsch’s assemblage of peculiarities and curiosities
Welcome, Welcome.
Welcome to my user dir, where we optimize f***ing around, in order to optimize finding out.
DISCLAIMER: All of this code is of the “do not try at work” sort, unless noted otherwise.
You might try at home, however. Get inspired or get grossed out, whichever you like.