### set_context(params) Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Sets the current process context, merging the provided parameters with any existing context. Deeply nested data may be overwritten. ```APIDOC ## set_context(params) ### Description Sets the current process context. The given context will be merged into the current process context. The given context may override existing keys from the current process context. ### Parameters #### Path Parameters - **params** (context()) - Required - The context parameters to set. Should contain serializable types. ### Response #### Success Response (200) - **context** (context()) - The updated process context. ``` -------------------------------- ### report(exception, stacktrace, given_context) Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Reports an exception to be stored in the Error Tracker. This function is useful for custom error reporting, as many common Elixir/Phoenix contexts report automatically. ```APIDOC ## report(exception, stacktrace, given_context) ### Description Report an exception to be stored. Returns the occurrence stored or `:noop` if the ErrorTracker is disabled by configuration or the exception has not been stored. ### Parameters #### Path Parameters - **exception** (exception()) - Required - The exception to report. Can be an exception struct or a `{kind, exception}` tuple. - **stacktrace** (Exception.stacktrace()) - Required - The stacktrace of the exception. - **given_context** (context()) - Optional - A context map to be merged with the current process context. Defaults to an empty map. ### Response #### Success Response (200) - **occurrence** (ErrorTracker.Occurrence.t()) - The stored occurrence object. - **noop** (:noop) - Returned if the ErrorTracker is disabled or the exception is not stored. ``` -------------------------------- ### Set Process Context Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Sets the current process context, merging with or overriding existing context. Ensure context data is JSON serializable. ```Elixir @spec set_context(context()) :: context() ``` -------------------------------- ### ErrorTracker.get_context/0 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Retrieves the context currently set for the process. ```APIDOC ## ErrorTracker.get_context/0 ### Description Obtains the context that is currently set for the process. ### Function Signature `get_context()` ### Returns - `context()`: The current context map. ``` -------------------------------- ### ErrorTracker.set_context/1 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Sets arbitrary context for the current process, which will be stored with any reported errors. ```APIDOC ## ErrorTracker.set_context/1 ### Description Sets arbitrary context for the current process. This context will be associated with any errors reported from this process. ### Function Signature `set_context(params)` ### Parameters - `params` (context()): A map containing the context to set. ``` -------------------------------- ### Manually Report Error with Context Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Manually report an error using ErrorTracker.report/3, optionally including extra context. ```elixir ErrorTracker.report(exception, stacktrace, given_context) ``` -------------------------------- ### ErrorTracker.report/3 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Manually reports an exception to be stored. Allows for optional context to be included. ```APIDOC ## ErrorTracker.report/3 ### Description Reports an exception to be stored, optionally with additional context. ### Function Signature `report(exception, stacktrace, given_context \\ %{})` ### Parameters - `exception` (exception()): The exception to report. - `stacktrace` (list()): The stacktrace of the exception. - `given_context` (context()): Optional map of extra context to include with the error. ``` -------------------------------- ### Set Context for a Phoenix Request Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Automatically include user ID in errors tracked during a Phoenix request by setting context in an authentication Plug. ```elixir ErrorTracker.set_context(%{user_id: conn.assigns.current_user.id}) ``` -------------------------------- ### Report an Exception Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Reports an exception to be stored. Automatically called for exceptions in Phoenix controllers, LiveViews, and Oban jobs. Use this for custom error reporting. ```Elixir @spec report(exception(), Exception.stacktrace(), context()) :: ErrorTracker.Occurrence.t() | :noop ``` ```Elixir try do # your code catch e -> ErrorTracker.report(e, __STACKTRACE__) end ``` -------------------------------- ### ErrorTracker.unresolve/1 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Marks a specific error as unresolved. ```APIDOC ## ErrorTracker.unresolve/1 ### Description Marks the specified error as unresolved. ### Function Signature `unresolve(error)` ### Parameters - `error` (exception()): The error to mark as unresolved. ``` -------------------------------- ### ErrorTracker.resolve/1 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Marks a specific error as resolved. ```APIDOC ## ErrorTracker.resolve/1 ### Description Marks the specified error as resolved. ### Function Signature `resolve(error)` ### Parameters - `error` (exception()): The error to mark as resolved. ``` -------------------------------- ### Add a Breadcrumb Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Add a breadcrumb to the current process to track code execution points. Breadcrumbs can be viewed in the dashboard. ```elixir ErrorTracker.add_breadcrumb("Executed my super secret code") ``` -------------------------------- ### ErrorTracker.get_breadcrumbs/0 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Retrieves all breadcrumbs recorded for the current process. ```APIDOC ## ErrorTracker.get_breadcrumbs/0 ### Description Obtains the list of breadcrumbs recorded for the current process. ### Function Signature `get_breadcrumbs()` ### Returns - `[String.t()]`: A list of breadcrumb strings. ``` -------------------------------- ### Unresolve an Error Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Marks an error as unresolved. ```Elixir @spec unresolve(ErrorTracker.Error.t()) :: {:ok, ErrorTracker.Error.t()} | {:error, Ecto.Changeset.t()} ``` -------------------------------- ### ErrorTracker.add_breadcrumb/1 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Adds a breadcrumb to the current process, which can be viewed later in the dashboard. ```APIDOC ## ErrorTracker.add_breadcrumb/1 ### Description Adds a breadcrumb string to the current process's list of breadcrumbs. ### Function Signature `add_breadcrumb(breadcrumb)` ### Parameters - `breadcrumb` (String.t()): The breadcrumb message to add. ``` -------------------------------- ### unresolve(error) Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Marks an error as unresolved. ```APIDOC ## unresolve(error) ### Description Marks an error as unresolved. ### Parameters #### Path Parameters - **error** (ErrorTracker.Error.t()) - Required - The error to mark as unresolved. ### Response #### Success Response (200) - **ok** (ErrorTracker.Error.t()) - The unresolved error object. #### Error Response - **error** (Ecto.Changeset.t()) - A changeset if the operation fails. ``` -------------------------------- ### resolve(error) Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Marks an error as resolved. If the error occurs again, it will automatically be marked as unresolved. ```APIDOC ## resolve(error) ### Description Marks an error as resolved. If an error is marked as resolved and it happens again, it will automatically appear as unresolved again. ### Parameters #### Path Parameters - **error** (ErrorTracker.Error.t()) - Required - The error to resolve. ### Response #### Success Response (200) - **ok** (ErrorTracker.Error.t()) - The resolved error object. #### Error Response - **error** (Ecto.Changeset.t()) - A changeset if the operation fails. ``` -------------------------------- ### Resolve an Error Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Marks an error as resolved. If the error occurs again, it will automatically be marked as unresolved. ```Elixir @spec resolve(ErrorTracker.Error.t()) :: {:ok, ErrorTracker.Error.t()} | {:error, Ecto.Changeset.t()} ``` -------------------------------- ### unmute(error) Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Unmutes an error, re-enabling telemetry events for new occurrences. This reverses the effect of the `mute/1` function. ```APIDOC ## unmute(error) ### Description Unmutes the error so new occurrences will send telemetry events again. This reverses the effect of `mute/1`. ### Parameters #### Path Parameters - **error** (ErrorTracker.Error.t()) - Required - The error to unmute. ### Response #### Success Response (200) - **ok** (ErrorTracker.Error.t()) - The unmuted error object. #### Error Response - **error** (Ecto.Changeset.t()) - A changeset if the operation fails. ``` -------------------------------- ### ErrorTracker.unmute/1 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Unmutes a previously muted error, allowing new occurrences to send telemetry events. ```APIDOC ## ErrorTracker.unmute/1 ### Description Unmutes the specified error, allowing new occurrences to trigger telemetry events again. ### Function Signature `unmute(error)` ### Parameters - `error` (exception()): The error to unmute. ``` -------------------------------- ### ErrorTracker.mute/1 Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Mutes a specific error, preventing new occurrences from sending telemetry events. ```APIDOC ## ErrorTracker.mute/1 ### Description Mutes the specified error, so that new occurrences of this error will not trigger telemetry events. ### Function Signature `mute(error)` ### Parameters - `error` (exception()): The error to mute. ``` -------------------------------- ### mute(error) Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Mutes an error to prevent new occurrences from sending telemetry events. New occurrences are still tracked and visible in the UI but do not trigger notifications. ```APIDOC ## mute(error) ### Description Mutes the error so new occurrences won't send telemetry events. ### Parameters #### Path Parameters - **error** (ErrorTracker.Error.t()) - Required - The error to mute. ### Response #### Success Response (200) - **ok** (ErrorTracker.Error.t()) - The muted error object. #### Error Response - **error** (Ecto.Changeset.t()) - A changeset if the operation fails. ``` -------------------------------- ### Unmute an Error Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Unmutes an error, allowing new occurrences to send telemetry events again. This reverses the effect of `mute/1`. ```Elixir @spec unmute(ErrorTracker.Error.t()) :: {:ok, ErrorTracker.Error.t()} | {:error, Ecto.Changeset.t()} ``` -------------------------------- ### Mute an Error Source: https://hexdocs.pm/error_tracker/ErrorTracker.html Mutes an error to prevent new occurrences from sending telemetry events. New occurrences are still tracked but do not trigger notifications. ```Elixir @spec mute(ErrorTracker.Error.t()) :: {:ok, ErrorTracker.Error.t()} | {:error, Ecto.Changeset.t()} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.