View Source TelemetryMetricsSplunk.Hec.Api (TelemetryMetricsSplunk v0.0.3-alpha)

Sends metrics to the Splunk HTTP Event Collector (HEC).

alias TelemetryMetricsSplunk.Hec.Api

measurements = %{
  "vm.memory.total.summary" => 500
}

options = [
  finch: MyFinch,
  token: "00000000-0000-0000-0000-000000000000",
  url: "https://example.splunkcloud.com:8088/services/collector"
]

metadata = %{
  "server" => "alpha"
}

Api.send(measurements, options, metadata)

NOTE Metadata is optional and gets sent as dimensions.

Summary

Functions

Sends metrics to the Splunk HTTP Event Collector (HEC).

Types

@type options() :: [finch: Finch.name(), token: String.t(), url: String.t()]

Functions

Link to this function

send(measurements, options, metadata \\ %{})

View Source
@spec send(measurements :: map(), options :: options(), metadata :: map()) :: :ok

Sends metrics to the Splunk HTTP Event Collector (HEC).