fix structured logging & update readme link (#1242)

This commit is contained in:
acelinkio 2025-12-27 04:30:25 -08:00 committed by GitHub
parent 2db9204064
commit 88e5e1bb00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -35,7 +35,7 @@ OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
# The behavior of the below variables match what is documented here:
# https://www.postgresql.org/docs/current/libpq-envars.html
# The "source of truth" for what variables are supported is documented here:
# https://github.com/jackc/pgx/blob/master/pgconn/config.go#L190-L205
# https://pkg.go.dev/github.com/jackc/pgx/v5/pgconn#ParseConfig
PGUSER=kyoo
PGPASSWORD=password
PGDATABASE=kyoo

View File

@ -239,7 +239,7 @@ func main() {
cleanup, err := setupOtel(ctx)
if err != nil {
slog.Error("Failed to setup otel: ", "err", err)
slog.Error("Failed to setup otel", "err", err)
return
}
defer cleanup(ctx)

View File

@ -60,34 +60,34 @@ func setupOtel(ctx context.Context) (func(context.Context) error, error) {
slog.Info("Using OLTP type", "type", "grpc")
le, err = otlploggrpc.New(ctx)
if err != nil {
slog.Error("Failed setting up OLTP: ", err)
slog.Error("Failed setting up OLTP", "err", err)
return nil, err
}
me, err = otlpmetricgrpc.New(ctx)
if err != nil {
slog.Error("Failed setting up OLTP: ", err)
slog.Error("Failed setting up OLTP", "err", err)
return nil, err
}
te, err = otlptracegrpc.New(ctx)
if err != nil {
slog.Error("Failed setting up OLTP: ", err)
slog.Error("Failed setting up OLTP", "err", err)
return nil, err
}
default:
slog.Info("Using OLTP type", "type", "http")
le, err = otlploghttp.New(ctx)
if err != nil {
slog.Error("Failed setting up OLTP: ", err)
slog.Error("Failed setting up OLTP", "err", err)
return nil, err
}
me, err = otlpmetrichttp.New(ctx)
if err != nil {
slog.Error("Failed setting up OLTP: ", err)
slog.Error("Failed setting up OLTP", "err", err)
return nil, err
}
te, err = otlptracehttp.New(ctx)
if err != nil {
slog.Error("Failed setting up OLTP: ", err)
slog.Error("Failed setting up OLTP", "err", err)
return nil, err
}
}