LogHog.Config (log_hog v0.3.0)

View Source

LogHog configuration

Configuration Schema

  • :enable (boolean/0) - Automatically start LogHog? The default value is true.

  • :public_url (String.t/0) - Required. https://us.i.posthog.com for US cloud or https://eu.i.posthog.com for EU cloud

  • :api_key (String.t/0) - Required. Your PostHog Project API key. Find it in your project's settings under Project ID section

  • :api_client_module (atom/0) - API Client to use The default value is LogHog.API.Client.

  • :supervisor_name (atom/0) - Name of the supervisor process running LogHog The default value is LogHog.

  • :metadata (list of atom/0) - List of metadata keys to include in event properties The default value is [].

  • :capture_level - Minimum level for logs that should be captured as errors. Errors with crash_reason are always captured. The default value is :error.

  • :in_app_otp_apps (list of atom/0) - List of OTP app names of your applications. Stacktrace entries that belong to these apps will be marked as "in_app" The default value is [].

Summary

Functions

Reads and validates config from global application configuration

Validates configuration against the schema

Types

config()

@type config() :: map()

Functions

read!()

@spec read!() :: config()

Reads and validates config from global application configuration

validate(raw_options)

@spec validate(options :: keyword() | map()) ::
  {:ok, config()} | {:error, NimbleOptions.ValidationError.t()}

Validates configuration against the schema

validate!(options)

@spec validate!(options :: keyword() | map()) :: config()

See validate/1