@@ -7,7 +7,7 @@ This behavior is configured by the `:posthog` option in your global configuratio
77config :posthog ,
88 enable: true ,
99 enable_error_tracking: true ,
10- public_url : " https://us.i.posthog.com" ,
10+ api_host : " https://us.i.posthog.com" ,
1111 api_key: " phc_asdf"
1212 .. .
1313```
@@ -22,7 +22,7 @@ to your application tree with its own configuration:
2222config :posthog , enable: false
2323
2424config :my_app , :posthog ,
25- public_url : " https://us.i.posthog.com" ,
25+ api_host : " https://us.i.posthog.com" ,
2626 api_key: " phc_asdf"
2727
2828# application.ex
@@ -32,7 +32,7 @@ defmodule MyApp.Application do
3232
3333 def start (_type , _args ) do
3434 posthog_config = Application .fetch_env! (:my_app , :posthog ) |> PostHog .Config .validate! ()
35-
35+
3636 :logger .add_handler (:posthog , PostHog .Handler , %{config: posthog_config})
3737
3838 children = [
@@ -53,21 +53,21 @@ one of which can be the default one:
5353``` elixir
5454# config.exs
5555config :posthog ,
56- public_url : " https://us.i.posthog.com" ,
56+ api_host : " https://us.i.posthog.com" ,
5757 api_key: " phc_key1"
5858
5959config :my_app , :another_posthog ,
60- public_url : " https://us.i.posthog.com" ,
60+ api_host : " https://us.i.posthog.com" ,
6161 api_key: " phc_key2" ,
6262 supervisor_name: AnotherPostHog
63-
63+
6464# application.ex
6565defmodule MyApp .Application do
6666 use Application
6767
6868 def start (_type , _args ) do
6969 posthog_config = Application .fetch_env! (:my_app , :another_posthog ) |> PostHog .Config .validate! ()
70-
70+
7171 children = [
7272 {PostHog .Supervisor , posthog_config}
7373 ]
0 commit comments