Automatisiertes Tool zur Integration des Sentry SDK in deine Anwendungen.
- Remote Installation - Direkt aus dem Git-Repo ausführbar, kein Klonen nötig
- API-Modus - Automatisches Erstellen von Teams und Projekten via Bugsink API
- Automatische Sprach-Erkennung - Erkennt Python, Node.js, TypeScript, Java, .NET, Go, PHP, Ruby
- Minimale, nicht-destruktive Änderungen - Fügt nur Konfigurations-Dateien hinzu
- Framework-Erkennung - Erkennt Django, Flask, Express, NestJS, etc.
- 3 Modi: Neu einrichten, DSN aktualisieren, Client-Code aktualisieren
- Cross-Platform - Läuft auf Windows, Linux, macOS
Führe das Client-Kit direkt aus dem Repository aus - ohne es vorher zu klonen:
# Im Projekt-Ordner ausführen
curl -sSL https://raw.githubusercontent.com/bauer-group/CS-ApplicationErrorObservability/main/client-kit/remote-install.sh | bash
# Mit DSN
curl -sSL https://raw.githubusercontent.com/bauer-group/CS-ApplicationErrorObservability/main/client-kit/remote-install.sh | bash -s -- --dsn "https://key@errors.example.com/1"
# Mit API-Modus (automatisches Projekt-Setup)
curl -sSL https://raw.githubusercontent.com/bauer-group/CS-ApplicationErrorObservability/main/client-kit/remote-install.sh | bash -s -- \
--api-key "your-api-key" \
--api-url "https://errors.example.com"
# Mit wget
wget -qO- https://raw.githubusercontent.com/bauer-group/CS-ApplicationErrorObservability/main/client-kit/remote-install.sh | bash# Im Projekt-Ordner ausführen
irm https://raw.githubusercontent.com/bauer-group/CS-ApplicationErrorObservability/main/client-kit/remote-install.ps1 | iex
# Mit DSN (erst herunterladen, dann ausführen)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/bauer-group/CS-ApplicationErrorObservability/main/client-kit/remote-install.ps1" -OutFile install.ps1
.\install.ps1 -Dsn "https://key@errors.example.com/1"
# Mit API-Modus
.\install.ps1 -ApiKey "your-api-key" -ApiUrl "https://errors.example.com"Falls du das Repo bereits geklont hast:
# Linux/macOS
./install.sh
# Windows (PowerShell)
.\install.ps1
# Windows (CMD)
install.cmd# Mit DSN
./install.sh --dsn "https://key@errors.observability.app.bauer-group.com/1"
# Nur DSN aktualisieren
./install.sh --update-dsn --dsn "https://..."
# Client-Code aktualisieren
./install.sh --update-clientpython install.py --dsn "https://key@host/1" --environment productionMit API-Key wird das Team und Projekt automatisch erstellt:
# Im Projekt-Root ausführen
cd /path/to/your/project
# Interaktiv - wählt Team/Projekt aus oder erstellt neue
./install.sh --api-key "your-key" --api-url "https://errors.example.com"
# Vollautomatisch - erstellt Team und Projekt falls nicht vorhanden
./install.sh --api-key "your-key" --api-url "https://errors.example.com" \
--team "MyTeam" --project "MyApp"Der Installer im API-Modus:
- Verbindet sich mit der Bugsink API
- Zeigt verfügbare Teams an oder erstellt ein neues
- Zeigt verfügbare Projekte an oder erstellt ein neues
- Holt den DSN automatisch
- Erkennt die Projekt-Sprache
- Installiert die SDK-Abhängigkeiten
- Erstellt eine Konfigurations-Datei
- Fügt den DSN zur
.envhinzu
- Öffne dein Bugsink Dashboard
- Gehe zu Teams → wähle oder erstelle ein Team
- Gehe zu Projects → New Project
- Kopiere den DSN aus den Project Settings
# Im Projekt-Root ausführen
cd /path/to/your/project
# Installer ausführen
./install.sh --dsn "https://key@errors.example.com/1"Der Installer:
- Erkennt die Projekt-Sprache automatisch
- Installiert die SDK-Abhängigkeiten
- Erstellt eine Konfigurations-Datei
- Fügt den DSN zur
.envhinzu
Füge den Import in deinen Entry-Point ein (wird vom Installer angezeigt):
Python:
from sentry_config import init_sentry
init_sentry()Node.js:
require('./sentry.config');TypeScript:
import './sentry.config';| Befehl | Beschreibung |
|---|---|
./install.sh |
Interaktiver Modus |
./install.sh --dsn <DSN> |
Installation mit DSN |
./install.sh --api-key <KEY> --api-url <URL> |
API-Modus (interaktiv) |
./install.sh --api-key <KEY> --api-url <URL> --team <TEAM> --project <PROJECT> |
API-Modus (vollautomatisch) |
./install.sh --update-dsn --dsn <DSN> |
Nur DSN aktualisieren |
./install.sh --update-client |
Client-Code aus Templates aktualisieren |
./install.sh --environment staging |
Environment setzen |
| Sprache | Erkennung | SDK-Paket |
|---|---|---|
| Python | requirements.txt, pyproject.toml, Pipfile |
sentry-sdk |
| Node.js | package.json |
@sentry/node |
| TypeScript | tsconfig.json |
@sentry/node |
| Java | pom.xml, build.gradle |
io.sentry:sentry |
| .NET | *.csproj, *.sln |
Sentry |
| Go | go.mod |
github.com/getsentry/sentry-go |
| PHP | composer.json |
sentry/sentry |
| Ruby | Gemfile |
sentry-ruby |
Nach der Installation werden folgende Dateien erstellt:
your-project/
├── sentry_config.py # Python
├── sentry.config.js # Node.js
├── src/sentry.config.ts # TypeScript
├── SentryConfig.java # Java
├── SentryConfig.cs # .NET
├── pkg/sentry/sentry.go # Go
├── config/sentry.php # PHP
├── config/initializers/sentry.rb # Ruby
└── .env # DSN wird hier hinzugefügt
| Variable | Beschreibung | Default |
|---|---|---|
SENTRY_DSN |
Bugsink/Sentry DSN | - |
SENTRY_ENVIRONMENT |
Environment-Name | production |
SENTRY_TRACES_SAMPLE_RATE |
Performance Sample-Rate | 0.1 |
APP_VERSION |
Release-Version | - |
BUGSINK_API_KEY |
API-Key für automatisches Setup | - |
BUGSINK_API_URL |
Bugsink Server URL | - |
BUGSINK_TEAM |
Standard Team-Name für API-Modus | - |
BUGSINK_PROJECT |
Standard Projekt-Name für API-Modus | - |
Die Templates befinden sich in templates/<language>/. Du kannst sie anpassen:
- Template-Datei bearbeiten
./install.sh --update-clientin Projekten ausführen
| Platzhalter | Wird ersetzt durch |
|---|---|
{{DSN}} |
Der konfigurierte DSN |
{{ENVIRONMENT}} |
Das Environment |
{{RELEASE}} |
Die Release-Version |
Installiere Python 3.7+:
- Windows: https://www.python.org/downloads/
- macOS:
brew install python3 - Linux:
apt install python3oderyum install python3
Stelle sicher, dass eine der erkannten Dateien im Projekt-Root existiert:
- Python:
requirements.txt,pyproject.toml,setup.py - Node.js:
package.json - etc.
Setze die Umgebungsvariable oder übergebe sie als Parameter:
export SENTRY_DSN="https://..."
./install.sh
# oder
./install.sh --dsn "https://..."Teil des Error Observability Projekts.