Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gbbirkisson/trace-debug


https://github.com/gbbirkisson/trace-debug

Last synced: about 9 hours ago
JSON representation

Awesome Lists containing this project

README

        

trace-debug

This program was created to debug trace pipelines.

* [Installing](#installing)
* [Usage](#usage)
* [Using with kubernetes](#using-with-kubernetes)
* [Supported exporters](#supported-exporters)

## Installing

> [!NOTE]
> You'll need `cargo` and the rust compiler installed on your machine!

```console
$ cargo install --git https://github.com/gbbirkisson/trace-debug.git
```

## Usage

```console
$ trace-debug --help
Usage: trace-debug [OPTIONS]

Options:
-e, --exporter Exporter type [default: stdout] [possible values: stdout, jaeger, otlp]
--scheme Scheme to use [default: http]
--host Host to export to [default: 127.0.0.1]
--port Port to export to [default: ]
--service-name Service name [default: trace-debug]
-t, --tracer-name Tracer name [default: trace-debug]
-s, --span-name Span name [default: debug-span]
-n, --number Number of generated child spans [default: 0]
-h, --help Print help
-V, --version Print version
```

## Using with kubernetes

> [!NOTE]
> You'll need `docker` and `kubectl` installed and setup on your machine.

You can build and run this `trace-debug` in a pod like so:

```console
$ NS=myns POD=mypod CMD='-n 5 -e jaeger --host $$JAEGER_AGENT_HOST' make exec
kubectl -n myns cp trace-debug mypod:/trace-debug
kubectl -n myns exec mypod -- sh -c '/trace-debug -n 5 -e jaeger --host $JAEGER_AGENT_HOST'
Starting trace-debug
Using Args {
exporter: Jaeger,
host: "12.0.0.94",
port: Some(
6831,
),
service_name: "trace-debug",
tracer_name: "trace-debug",
span_name: "debug-span",
number: 5,
}
Created span with traceid 9bf235ac7e86b64dae821a50b4947932 and spanid b9ee06c548204aba
Created span with traceid 9bf235ac7e86b64dae821a50b4947932 and spanid 1a32d9c700fe1cac
Created span with traceid 9bf235ac7e86b64dae821a50b4947932 and spanid 88408def9236687f
Created span with traceid 9bf235ac7e86b64dae821a50b4947932 and spanid 269021fdb69cdbf0
Created span with traceid 9bf235ac7e86b64dae821a50b4947932 and spanid 2b55e7cda9e73caa
Created span with traceid 9bf235ac7e86b64dae821a50b4947932 and spanid 6666c2897ea22e88
Exiting
```

## Supported exporters

- [x] stdout
- [x] jaeger
- [x] otlp
- [ ] zipkin