Spandex v1.0.4 API Reference
Modules
Provides the entry point for the application, in addition to a standardized interface. The functions here call the corresponding functions on the configured adapter
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
A datadog APM implementation for spandex
Helper functions and macros for adapters
Provides functions for communicating with a datadog service using the apm api
Exists to easily swap out the network implementation
In charge of holding the datadog span attributes, and for starting/ending
spans. This also handles serialization via to_map/1
, and span inheritance
via child_of/3
Simply sends the data that would have been sent to datadog to self() as a message so that the test can assert on payloads that would have been sent to datadog
A set of common utils specific (for now) to DataDog APM)
A trace builder that can be given to ecto as a logger. It will try to get the trace_id and span_id from the caller pid in the case that the particular query is being run asynchronously (as in the case of parallel preloads)
Adds request context to the top span of the trace, setting the resource, method, url, service, type and env
Finishes a trace, setting status and error based on the HTTP status
Starts a trace, skipping ignored routes or methods. Store info in Conn assigns if we actually trace the request
Helper methods for accessing Spandex plug assigns
Provides an alternative to Task.async/1
that takes a name
and makes sure that the child task’s spans are appropriately
tied to the current span of the caller
defmodule Foo do use Spandex.TraceDecorator