You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,40 @@ config :sentry,
78
78
|`server_name`| False | None ||
79
79
|`use_error_logger`| False | False ||
80
80
81
+
## Testing Your Configuration
82
+
83
+
To ensure you've set up your configuration correctly we recommend running the
84
+
included mix task. It can be tested on different Mix environments and will tell you if it is not currently configured to send events in that environment:
85
+
86
+
```bash
87
+
$ MIX_ENV=dev mix sentry.send_test_event
88
+
Client configuration:
89
+
server: https://sentry.io/
90
+
public_key: public
91
+
secret_key: secret
92
+
included_environments: [:prod]
93
+
current environment_name: :dev
94
+
95
+
:dev is not in [:prod] so no test event will be sent
96
+
97
+
$ MIX_ENV=prod mix sentry.send_test_event
98
+
Client configuration:
99
+
server: https://sentry.io/
100
+
public_key: public
101
+
secret_key: secret
102
+
included_environments: [:prod]
103
+
current environment_name: :prod
104
+
105
+
Sending test event!
106
+
```
107
+
108
+
A couple of things to note:
109
+
110
+
* This won't test your environment configuration. The test CLI forces your
111
+
configuration to represent itself as if it were running in the production env.
112
+
* If you're running within Rails (or anywhere else that will bootstrap the
113
+
rake environment), you should be able to omit the DSN argument.
0 commit comments