ForgeOpsTracker.Client (forge_ops_tracker v0.16.0)

Copy Markdown View Source

Delivers one payload over HTTP via :httpc (Erlang's own HTTP client, part of the :inets application bundled with every OTP install: no Hex dependency needed, same reasoning as net/http in the Ruby gem and java.net.http.HttpClient in the Java/Kotlin clients). Every failure mode (DNS, connection, timeout, TLS, a non-2xx response) is caught here and turned into false rather than a raised exception, since a broken or unreachable tracker must never be able to break the host app.

Every deliver* function answers true only when the payload was delivered. The attempt_* functions next to the batch ones answer a ForgeOpsTracker.DeliveryStatus instead, which is what tells a flusher whether a batch that did not go out is worth another attempt.

Summary

Functions

attempt_infrastructure_metrics(config, entries)

@spec attempt_infrastructure_metrics(ForgeOpsTracker.Configuration.t(), [map()]) ::
  ForgeOpsTracker.DeliveryStatus.t()

attempt_metrics(config, entries)

attempt_performance_samples(config, samples)

@spec attempt_performance_samples(ForgeOpsTracker.Configuration.t(), [map()]) ::
  ForgeOpsTracker.DeliveryStatus.t()

deliver(config, payload)

@spec deliver(ForgeOpsTracker.Configuration.t(), map()) :: boolean()

deliver_change(config, change)

@spec deliver_change(ForgeOpsTracker.Configuration.t(), map()) :: boolean()

deliver_change_snapshot(config, snapshot)

@spec deliver_change_snapshot(ForgeOpsTracker.Configuration.t(), map()) :: boolean()

deliver_infrastructure_metrics(config, entries)

@spec deliver_infrastructure_metrics(ForgeOpsTracker.Configuration.t(), [map()]) ::
  boolean()

deliver_metrics(config, entries)

@spec deliver_metrics(ForgeOpsTracker.Configuration.t(), [map()]) :: boolean()

deliver_performance_samples(config, samples)

@spec deliver_performance_samples(ForgeOpsTracker.Configuration.t(), [map()]) ::
  boolean()

deliver_query_plan(config, plan)

@spec deliver_query_plan(ForgeOpsTracker.Configuration.t(), map()) :: boolean()

deliver_spans(config, trace)

@spec deliver_spans(ForgeOpsTracker.Configuration.t(), map()) :: boolean()