add sentry to umbrella maybe?

4953b57 · gmorell · 2023-03-07 04:40

19 files +75 -25

Files changed

modified app.yml
+5 −5
@@ -56,11 +56,11 @@ spec:
56 56 # initialDelaySeconds: 90
57 57 # periodSeconds: 3
58 58 env:
59 − # - name: RAVEN_DSN
60 − # valueFrom:
61 − # secretKeyRef:
62 − # name: wed4u-secrets
63 − # key: sentrydsn
59 + - name: SENTRY_DSN
60 + valueFrom:
61 + secretKeyRef:
62 + name: ac-secrets
63 + key: sentry_dsn
64 64 - name: SECRET_KEY_BASE
65 65 valueFrom:
66 66 secretKeyRef:
modified apps/room_hermes/lib/room_hermes_web/endpoint.ex
+3 −0
@@ -1,5 +1,6 @@
1 1 defmodule RoomHermesWeb.Endpoint do
2 2 use Phoenix.Endpoint, otp_app: :room_hermes
3 + use Sentry.PlugCapture
3 4
4 5 # The session will be stored in the cookie and signed,
5 6 # this means its contents can be read but not tampered with.
@@ -49,6 +50,8 @@ defmodule RoomHermesWeb.Endpoint do
49 50 pass: ["*/*"],
50 51 json_decoder: Phoenix.json_library()
51 52
53 + plug Sentry.PlugContext
54 +
52 55 plug Plug.MethodOverride
53 56 plug Plug.Head
54 57 plug Plug.Session, @session_options
modified apps/room_sanctum/config/config.exs
+2 −1
@@ -65,7 +65,8 @@ config :tailwind,
65 65 config :logger,
66 66 :console,
67 67 format: "$time $metadata[$level] $message\n",
68 − metadata: [:request_id]
68 + metadata: [:request_id],
69 + backends: [:console, Sentry.LoggerBackend]
69 70
70 71 # Use Jason for JSON parsing in Phoenix
71 72 config :phoenix, :json_library, Jason
modified apps/room_sanctum/lib/room_sanctum_web/endpoint.ex
+3 −0
@@ -1,5 +1,6 @@
1 1 defmodule RoomSanctumWeb.Endpoint do
2 2 use Phoenix.Endpoint, otp_app: :room_sanctum
3 + use Sentry.PlugCapture
3 4
4 5 # The session will be stored in the cookie and signed,
5 6 # this means its contents can be read but not tampered with.
@@ -43,6 +44,8 @@ defmodule RoomSanctumWeb.Endpoint do
43 44 pass: ["*/*"],
44 45 json_decoder: Phoenix.json_library()
45 46
47 + plug Sentry.PlugContext
48 +
46 49 plug Plug.MethodOverride
47 50 plug Plug.Head
48 51 plug Plug.Session, @session_options
modified clients/lilygo4.7/cmd.md
+31 −18
@@ -1,3 +1,34 @@
1 +# Client Setup Commands
2 +
3 +## micropython post-flash library prep
4 +
5 +drop them onto the fs, the roboto ones may take a bit @ 115200 ;)
6 +
7 +```shell
8 +sudo ampy --port /dev/ttyACM1 put RobotoCondensedRegular12.py
9 +sudo ampy --port /dev/ttyACM1 put RobotoCondensedRegular16.py
10 +sudo ampy --port /dev/ttyACM1 put RobotoCondensedRegular20.py
11 +sudo ampy --port /dev/ttyACM1 put RobotoCondensedLight12.py
12 +sudo ampy --port /dev/ttyACM1 put RobotoCondensedLight16.py
13 +sudo ampy --port /dev/ttyACM1 put RobotoCondensedLight20.py
14 +sudo ampy --port /dev/ttyACM1 put FontAwesomeFreeSolid16.py
15 +sudo ampy --port /dev/ttyACM1 put FontAwesomeFreeSolid20.py
16 +sudo ampy --port /dev/ttyACM1 put FontAwesomeFreeSolid28.py
17 +sudo ampy --port /dev/ttyACM1 put FontAwesomeFreeRegular16.py
18 +sudo ampy --port /dev/ttyACM1 put FontAwesomeFreeRegular20.py
19 +sudo ampy --port /dev/ttyACM1 put FontAwesomeFreeRegular28.py
20 +sudo ampy --port /dev/ttyACM1 put fb2.py
21 +sudo ampy --port /dev/ttyACM1 put main.py
22 +sudo ampy --port /dev/ttyACM1 put yourconfig.py config.py
23 +
24 +```
25 +
26 +```shell
27 +import upip
28 +upip.install("umqtt.simple")
29 +```
30 +
31 +## Conversion Reference
1 32 ```shell
2 33 python3 fontconvert.py --compress RobotoCondensedRegular12 12 Roboto_Condensed/RobotoCondensed-Regular.ttf > RobotoCondensedRegular12.py
3 34 python3 fontconvert.py --compress RobotoCondensedRegular16 16 Roboto_Condensed/RobotoCondensed-Regular.ttf > RobotoCondensedRegular16.py
@@ -18,21 +49,3 @@ python3 fontconvert.py --interval fa-intervals-regular.json --compress fa20 20 f
18 49 python3 fontconvert.py --interval fa-intervals-regular.json --compress fa28 28 fontawesome-free-6.2.0-desktop/otfs/Font\ Awesome\ 6\ Free-Regular-400.otf> FontAwesomeFreeRegular28.py
19 50 ```
20 51
21 −drop them onto the fs, the roboto ones may take a bit @ 115200 ;)
22 −
23 −```shell
24 −sudo ampy --port /dev/ttyACM0 put RobotoCondensedRegular12.py
25 −sudo ampy --port /dev/ttyACM0 put RobotoCondensedRegular16.py
26 −sudo ampy --port /dev/ttyACM0 put RobotoCondensedRegular20.py
27 −sudo ampy --port /dev/ttyACM0 put RobotoCondensedLight12.py
28 −sudo ampy --port /dev/ttyACM0 put RobotoCondensedLight16.py
29 −sudo ampy --port /dev/ttyACM0 put RobotoCondensedLight20.py
30 −sudo ampy --port /dev/ttyACM0 put FontAwesomeFreeSolid16.py
31 −sudo ampy --port /dev/ttyACM0 put FontAwesomeFreeSolid20.py
32 −sudo ampy --port /dev/ttyACM0 put FontAwesomeFreeSolid28.py
33 −sudo ampy --port /dev/ttyACM0 put FontAwesomeFreeRegular16.py
34 −sudo ampy --port /dev/ttyACM0 put FontAwesomeFreeRegular20.py
35 −sudo ampy --port /dev/ttyACM0 put FontAwesomeFreeRegular28.py
36 −sudo ampy --port /dev/ttyACM0 put fb2.py
37 −
38 −```
modified config/runtime.exs
+23 −0
@@ -161,4 +161,27 @@ if config_env() == :prod do
161 161 # config :swoosh, :api_client, Swoosh.ApiClient.Hackney
162 162 #
163 163 # See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.
164 + config :sentry,
165 + dsn: System.get_env("SENTRY_DSN"),
166 + environment_name: :prod,
167 + enable_source_code_context: true,
168 + root_source_code_paths: [
169 + "#{File.cwd!()}/apps/room_air_quality",
170 + "#{File.cwd!()}/apps/room_calendar",
171 + "#{File.cwd!()}/apps/room_cronos",
172 + "#{File.cwd!()}/apps/room_ephem",
173 + "#{File.cwd!()}/apps/room_gbfs",
174 + "#{File.cwd!()}/apps/room_gtfs",
175 + "#{File.cwd!()}/apps/room_hass",
176 + "#{File.cwd!()}/apps/room_hermes",
177 + "#{File.cwd!()}/apps/room_rideshare",
178 + "#{File.cwd!()}/apps/room_sanctum",
179 + "#{File.cwd!()}/apps/room_tidal",
180 + "#{File.cwd!()}/apps/room_weather",
181 + "#{File.cwd!()}/apps/room_zeus",
182 + ],
183 + tags: %{
184 + env: "production"
185 + },
186 + included_environments: [:prod]
164 187 end
modified mix.exs
+7 −1
@@ -40,6 +40,12 @@ defmodule ApollosCrib.MixProject do
40 40 #
41 41 # Run "mix help deps" for examples and options.
42 42 defp deps do
43 − []
43 + [
44 + {:sentry, "~> 8.0"},
45 + {:jason, "~> 1.1"},
46 + {:hackney, "~> 1.8"},
47 + # if you are using plug_cowboy
48 + {:plug_cowboy, "~> 2.3"}
49 + ]
44 50 end
45 51 end
modified mix.lock
+1 −0
@@ -62,6 +62,7 @@
62 62 "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
63 63 "recon": {:hex, :recon, "2.5.2", "cba53fa8db83ad968c9a652e09c3ed7ddcc4da434f27c3eaa9ca47ffb2b1ff03", [:mix, :rebar3], [], "hexpm", "2c7523c8dee91dff41f6b3d63cba2bd49eb6d2fe5bf1eec0df7f87eb5e230e1c"},
64 64 "seg_seg": {:hex, :seg_seg, "0.1.1", "a7a5c072ad9de3af1bb5e155492c2c7a0fd5f381700efe9b9ba38c95fb997bd7", [:mix], [{:vector, "~> 1.0", [hex: :vector, repo: "hexpm", optional: false]}], "hexpm", "60830e037b6ac9e1b7d360d2eec0e02834c26bba7f1bebad4dd90a00d31ab119"},
65 + "sentry": {:hex, :sentry, "8.0.6", "c8de1bf0523bc120ec37d596c55260901029ecb0994e7075b0973328779ceef7", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "051a2d0472162f3137787c7c9d6e6e4ef239de9329c8c45b1f1bf1e9379e1883"},
65 66 "shards": {:hex, :shards, "1.0.1", "1bdbbf047db27f3c3eb800a829d4a47062c84d5543cbfebcfc4c14d038bf9220", [:make, :rebar3], [], "hexpm", "2c57788afbf053c4024366772892beee89b8b72e884e764fb0a075dfa7442041"},
66 67 "sleeplocks": {:hex, :sleeplocks, "1.1.1", "3d462a0639a6ef36cc75d6038b7393ae537ab394641beb59830a1b8271faeed3", [:rebar3], [], "hexpm", "84ee37aeff4d0d92b290fff986d6a95ac5eedf9b383fadfd1d88e9b84a1c02e1"},
67 68 "solarex": {:hex, :solarex, "0.1.2", "549915e2440dbe8bcbb92e5b3592121281db2e30249f25813760c5d0f28f011f", [:mix], [{:timex, "~> 3.0", [hex: :timex, repo: "hexpm", optional: false]}], "hexpm", "d10d8eb855b8f5d1e968f6fa7070e6b1a3970d54ee30ab6fcc8d2301d163bdb9"},

Parents: ac41e8d