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"}andZHARP_KEY. Settings fromconfig :zharporZHARP_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 :zharpinruntime.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 theElixir.prefix, Erlang errors as Elixir names them, exits asexit; 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 runscript 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 sourceZharp.Release.package_source/1packs into amix release; nothing uploaded. Zharp.Plug: all request and response headers on the server span, secrets as[REDACTED]; user and session frombaggage; Plug.Router spans named by route.- Failed Ecto queries (Postgres, MySQL) reported once with
db.system,db.namespace,db.query.textand 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/1andZharp.Teslacarry 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=truesendsLoggerlines from the SDK.