This is a terrible way to do this but this shoehorn works it seems. I want to simply redirect the output from Fluentd's scrapings of my docker logs and send them over to glitchtip.
Go to file
colin 552561dee6 Update install.sh 2025-02-28 10:51:39 -05:00
build_logs Fixup 2024-06-28 13:23:28 -04:00
dist Trying to add logging 2024-06-28 13:53:57 -04:00
README.md Update README.md 2024-06-11 14:34:39 +00:00
build.sh update go-glitch build process and install.sh 2024-06-11 17:11:35 -04:00
go.mod Modernized build and added an install so that adding this won't be a pain. 2024-05-31 10:05:04 -04:00
go.sum Modernized build and added an install so that adding this won't be a pain. 2024-05-31 10:05:04 -04:00
install.sh Update install.sh 2025-02-28 10:51:39 -05:00
log.log Corrected port GoGlitch 2024-06-28 13:04:20 -04:00
main.go Trying to add logging 2024-06-28 13:53:57 -04:00
test.sh Fixup 2024-06-28 13:48:27 -04:00

README.md

You can stream and read files to a sentry DSN glitchtip or sentry itself I was fed up with how brittle sentry-cli was so I made this.

I might get around to making a whole CI/CD process for this which will upload the executables properly at some point and make this public.

Go Glitch

Go Glitch is a command-line utility that reads log messages from a file or stdin and sends them to Glitchtip, a self-hosted Sentry-compatible error tracking system.

Installation

To install the binary locally, you can use the provided installation script. Run the following command in your terminal:

curl -sSL https://git.nixc.us/Nixius/go-glitch/raw/branch/master/install.sh | bash

This will download and install the Go Glitch binary to your local machine.

Usage

You can use Go Glitch by specifying a log file as an argument or by piping input to it.

Using a Log File

go-glitch /path/to/logfile

Using Piped Input

cat /path/to/logfile | go-glitch

Configuration

Go Glitch requires the GLITCHTIP_DSN environment variable to be set with your Glitchtip DSN. You can set this environment variable in your shell environment, Dockerfile, or docker-compose.yml file.

Shell Environment

Add the following line to your .zshrc or .bashrc file:

export GLITCHTIP_DSN="your-glitchtip-dsn"

After adding the line, reload your shell configuration:

source ~/.zshrc # for zsh users
source ~/.bashrc # for bash users

Dockerfile

If you are using a Docker container, add the environment variable in your Dockerfile:

ENV GLITCHTIP_DSN=your-glitchtip-dsn

docker-compose.yml

If you are using Docker Compose, add the environment variable in your docker-compose.yml file:

version: '3.8'

services:
  go-glitch:
    image: your-docker-image
    environment:
      - GLITCHTIP_DSN=your-glitchtip-dsn