Skip to content

Commit

Permalink
Temporarily Enable Sentry Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
f0o committed Sep 7, 2024
1 parent 152f283 commit b8cc9a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ COPY cmd/server /opt/cmd/server
COPY go.mod go.sum /opt/.
COPY --from=buf-builder /opt/protobuf /opt/protobuf
COPY --from=node-builder /opt/cmd/server/dist /opt/cmd/server/dist
RUN go mod tidy \
RUN apk --no-cache add ca-certificates \
&& go mod tidy \
&& go build -ldflags="-X github.com/AS203038/looking-glass/pkg/utils.release=${VERSION}" -o /opt/looking-glass /opt/cmd/server

FROM scratch
LABEL org.opencontainers.image.source https://github.com/AS203038/looking-glass
LABEL org.opencontainers.image.description Yet another looking glass project
LABEL org.opencontainers.image.licenses GPL-3.0-or-later
WORKDIR /
COPY --from=go-builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=go-builder /opt/looking-glass /looking-glass
ENTRYPOINT ["/looking-glass"]
3 changes: 2 additions & 1 deletion pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,12 @@ func ListenAndServe(ctx context.Context, cfg *utils.Config, rts utils.RouterMap,
ProfilesSampleRate: 1.0,
Release: strings.Split(utils.Version(), "+")[0],
Environment: cfg.Web.Sentry.Environment,
Debug: true,
})
if err != nil {
log.Println("WARNING: Failed to initialize Sentry:", err, "disabling Sentry middleware")
} else {
log.Println("NOTICE: Sentry initialized")
log.Printf("NOTICE: Sentry initialized: %+v", cfg.Web.Sentry)
handler = sentryhttp.New(
sentryhttp.Options{
Repanic: true,
Expand Down

0 comments on commit b8cc9a5

Please sign in to comment.