mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-27 02:10:27 +00:00
e3adc0684f
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
41 lines
842 B
Elixir
41 lines
842 B
Elixir
defmodule Mobilizon.Service.FrontEndAnalytics.Sentry do
|
|
@moduledoc """
|
|
Sentry analytics provider
|
|
"""
|
|
|
|
alias Mobilizon.Service.FrontEndAnalytics
|
|
@behaviour FrontEndAnalytics
|
|
|
|
@impl FrontEndAnalytics
|
|
def id, do: "sentry"
|
|
|
|
@doc """
|
|
Whether the service is enabled
|
|
"""
|
|
@impl FrontEndAnalytics
|
|
def enabled? do
|
|
:mobilizon
|
|
|> Application.get_env(__MODULE__, [])
|
|
|> Keyword.get(:enabled, false)
|
|
end
|
|
|
|
@doc """
|
|
The configuration for the service
|
|
"""
|
|
@impl FrontEndAnalytics
|
|
def configuration do
|
|
:mobilizon
|
|
|> Application.get_env(__MODULE__, [])
|
|
|> Keyword.drop([:enabled, :csp])
|
|
end
|
|
|
|
@doc """
|
|
The CSP configuration to add for the service to work
|
|
"""
|
|
@impl FrontEndAnalytics
|
|
def csp do
|
|
:mobilizon
|
|
|> Application.get_env(__MODULE__, [])
|
|
|> Keyword.get(:csp, [])
|
|
end
|
|
end
|