My intent with this is to enable a number of OS's to be able to have their low volume but high value log errors sent to glitchtip.
Go to file
colin 86f4bbe01c Update install.sh 2024-07-23 00:27:24 +00:00
build_logs baseline 2024-07-22 20:26:18 -04:00
dist baseline 2024-07-22 20:26:18 -04:00
README.md baseline 2024-07-22 20:26:18 -04:00
build.sh baseline 2024-07-22 20:26:18 -04:00
go.mod baseline 2024-07-22 20:26:18 -04:00
go.sum baseline 2024-07-22 20:26:18 -04:00
install.sh Update install.sh 2024-07-23 00:27:24 +00:00
main.go baseline 2024-07-22 20:26:18 -04:00
test.sh baseline 2024-07-22 20:26:18 -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