Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: sentry DSN for config endpoint #394

Merged
merged 3 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/api/handlers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ func (ctx *Context) GetConfig(c *gin.Context) {
TzKTEndpoints: tzktEndpoints,
}

if ctx.Config.API.SentryEnabled {
cfg.SentryDSN = ctx.Config.Sentry.FrontURI
}

c.JSON(http.StatusOK, cfg)
}
1 change: 1 addition & 0 deletions cmd/api/handlers/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ type ConfigResponse struct {
OauthEnabled bool `json:"oauth_enabled"`
RPCEndpoints map[string]string `json:"rpc_endpoints"`
TzKTEndpoints map[string]string `json:"tzkt_endpoints"`
SentryDSN string `json:"sentry_dsn"`
}

// DApp -
Expand Down
3 changes: 1 addition & 2 deletions configs/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ oauth:
sentry:
environment: development
uri: ${SENTRY_DSN}
front_uri: ${SENTRY_DSN_FRONT}
debug: true

share_path: ${HOME}/.bcd
Expand Down Expand Up @@ -115,8 +116,6 @@ indexer:
networks:
mainnet:
boost: tzkt
# carthagenet:
# boost: tzkt
# delphinet:
# boost: tzkt
# dalphanet:
Expand Down
1 change: 1 addition & 0 deletions configs/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ oauth:
sentry:
environment: production
uri: ${SENTRY_DSN}
front_uri: ${SENTRY_DSN_FRONT}
debug: false

share_path: /etc/bcd
Expand Down
1 change: 1 addition & 0 deletions configs/you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ oauth:
sentry:
environment: staging
uri: ${SENTRY_DSN}
front_uri: ${SENTRY_DSN_FRONT}
debug: false

share_path: /etc/bcd
Expand Down
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ type SeedConfig struct {
type SentryConfig struct {
Environment string `yaml:"environment"`
URI string `yaml:"uri"`
FrontURI string `yaml:"front_uri"`
Debug bool `yaml:"debug"`
}

Expand Down