-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
abstracting away most behavior from adapters, enabling storage strate…
…gies (#53)
- Loading branch information
1 parent
443a287
commit b1db34a
Showing
15 changed files
with
379 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
defmodule Spandex.Adapters.Adapter do | ||
@moduledoc """ | ||
Describes the callback for a tracing adapter. Can be used to provide different | ||
implementations of reporting/aggregating spans while still using the spandex | ||
internal implementation. | ||
The callbacks required to implement an adapter. | ||
""" | ||
@callback start_trace(String.t(), Keyword.t()) :: {:ok, term} | {:error, term} | ||
@callback start_span(String.t(), Keyword.t()) :: {:ok, term} | {:error, term} | ||
@callback update_span(Keyword.t()) :: :ok | {:error, term} | ||
@callback finish_span(Keyword.t()) :: :ok | {:error, term} | ||
@callback finish_trace(Keyword.t()) :: :ok | {:error, term} | ||
@callback span_error(Exception.t(), Keyword.t()) :: :ok | {:error, term} | ||
@callback current_trace_id(Keyword.t()) :: term | nil | {:error, term} | ||
@callback current_span_id(Keyword.t()) :: term | nil | {:error, term} | ||
@callback current_span(Keyword.t()) :: term | nil | ||
@callback continue_trace(String.t(), term, term, Keyword.t()) :: {:ok, term} | {:error, term} | ||
@callback continue_trace_from_span(String.t(), map, Keyword.t()) :: {:ok, term} | {:error, term} | ||
@callback update_top_span(Keyword.t()) :: :ok | {:error, term} | ||
@callback update_all_spans(Keyword.t()) :: :ok | {} | ||
|
||
@callback distributed_context(Plug.Conn.t(), Keyword.t()) :: {:ok, term} | {:error, term} | ||
@callback trace_id() :: term | ||
@callback span_id() :: term | ||
@callback now() :: term | ||
@callback default_sender() :: module | ||
end |
Oops, something went wrong.