0.1.0 (unreleased)

The first release: one zharp Hex package for Phoenix, LiveView, Plug on Bandit or Cowboy, Ecto, Oban, Finch/Req/Tesla, Absinthe and plain Elixir, built on OpenTelemetry Erlang (opentelemetry 1.7, opentelemetry_exporter 1.11) with opentelemetry_phoenix, opentelemetry_bandit and opentelemetry_ecto. Elixir 1.16+ on OTP 26+, Phoenix 1.7+.

  • Starts with the app (a dependency's OTP application), before the endpoint: {:zharp, "~> 0.1"} and ZHARP_KEY. Settings from config :zharp or ZHARP_KEY, ZHARP_SERVICE, ZHARP_ENVIRONMENT, ZHARP_RELEASE, ZHARP_ENDPOINT, ZHARP_SAMPLE_RATE, ZHARP_LOGS, ZHARP_LOG_LEVEL, ZHARP_LOG_CORRELATION, ZHARP_CAPTURE_HEADERS, ZHARP_CAPTURE_QUERY_ERRORS, ZHARP_CAPTURE_SOURCE_CONTEXT, ZHARP_CAPTURE_CRASHES, ZHARP_TRACING, ZHARP_DISABLED, read at runtime.
  • mix igniter.install zharp: the plug in each endpoint, config :zharp in runtime.exs (off in tests), the release step.
  • Traces as OTLP http/protobuf to <endpoint>/v1/traces (gzipped, Bearer key) through OpenTelemetry's default batch processor, nothing to configure for :opentelemetry; logs and errors outside a span as OTLP/JSON to <endpoint>/v1/logs.
  • Errors counted once across Bandit's or Cowboy's span, Phoenix's, LiveView's, Oban's, crash reports and Zharp.capture_exception; types without the Elixir. prefix, Erlang errors as Elixir names them, exits as exit; exceptions Plug answers below 500 kept on the span only.
  • Crash reports (GenServer, Task, supervised processes) as errors with their stack, in the trace of the request that started them; a mix run script that raises is reported before the VM halts.
  • zharp.in_app: the project's OTP applications (an umbrella's included), which is how Zharp tells your frames from Phoenix's.
  • The code that ran (zharp.source_context): read from disk in development, from the source Zharp.Release.package_source/1 packs into a mix release; nothing uploaded.
  • Zharp.Plug: all request and response headers on the server span, secrets as [REDACTED]; user and session from baggage; Plug.Router spans named by route.
  • Failed Ecto queries (Postgres, MySQL) reported once with db.system, db.namespace, db.query.text and the error code; handled ones as handled at the call site; changeset constraint violations left alone; values dropped from database messages.
  • Cowboy server spans, Oban job spans (in the request's trace with Zharp.Oban.insert/1), Finch client spans (Req, Tesla, Swoosh), Absinthe operations; Zharp.Req.attach/1 and Zharp.Tesla carry the trace to the service called.
  • trace_id=… span_id=… at the end of each console line written in a request (two fields on a JSON line); ZHARP_LOGS=true sends Logger lines from the SDK.