Skip to content

Commit

Permalink
Allow enabling external configuration (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
mping-exo committed Mar 21, 2024
1 parent 76c311c commit 528823f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ If you want an interpolated message, you need to provide the full map, i.e.,
## Additional Initialisation Options

| key | description | default
| ------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------| -------
|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| -------
| `:enable-external-configuration` | Enable loading configuration from the properties file, system properties or environment variables |
| `:environment` | Set the environment on which Sentry events will be logged, e.g., \"production\" | production
| `:debug` | Enable SDK logging at the debug level | false
| `:release` | All events are assigned to a particular release |
Expand Down
6 changes: 5 additions & 1 deletion src/sentry_clj/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@
^SentryOptions
([dsn] (sentry-options dsn {}))
([dsn config]
(let [{:keys [environment
(let [{:keys [enable-external-configuration
environment
debug
logger
diagnostic-level
Expand All @@ -195,6 +196,8 @@

(.setDsn sentry-options dsn)

(when enable-external-configuration
(.setEnableExternalConfiguration sentry-options enable-external-configuration))
(when environment
(.setEnvironment sentry-options environment))
;;
Expand Down Expand Up @@ -272,6 +275,7 @@
| key | description | default
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -------
| `:enable-external-configuration` | Enable loading configuration from the properties file, system properties or environment variables |
| `:environment` | Set the environment on which Sentry events will be logged, e.g., \"production\" | production
| `:enabled` | Enable or disable sentry. | true
| `:debug` | Enable SDK logging at the debug level | false
Expand Down

0 comments on commit 528823f

Please sign in to comment.