tvl-depot/users/Profpatsch/alacritty-change-color-scheme
Profpatsch 4eeac3cb1d feat(users/Profpatsch): Implement initial otel-dbus proxy
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>
2024-12-10 15:34:03 +00:00
..
.gitignore feat(pkgs/Profpatsch/alacritty): init dark mode dbus daemon 2024-12-10 15:34:03 +00:00
alacritty-change-color-scheme.js feat(users/Profpatsch): Implement initial otel-dbus proxy 2024-12-10 15:34:03 +00:00
default.nix feat(pkgs/Profpatsch/alacritty): init dark mode dbus daemon 2024-12-10 15:34:03 +00:00
package-lock.json feat(users/Profpatsch): Implement initial otel-dbus proxy 2024-12-10 15:34:03 +00:00
package.json feat(users/Profpatsch): Implement initial otel-dbus proxy 2024-12-10 15:34:03 +00:00