Documentation
¶
Overview ¶
Package datadogexport exports workflow metrics to Datadog. It manages per-tenant Datadog API configurations and periodically queries workflow statistics (count by status) and sends them as gauge metrics to the Datadog Metrics API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct{}
Config holds optional configuration for the datadog-export plugin.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin exports workflow metrics to Datadog.
func (*Plugin) Info ¶
func (p *Plugin) Info() plugin.PluginInfo
Info returns plugin metadata for discovery and documentation.
func (*Plugin) Init ¶
Init initializes the plugin with the given environment. It creates an HTTP client with a 30-second timeout for Datadog API requests.
func (*Plugin) Migrations ¶
Migrations returns the database schema for Datadog export configs. The table is idempotent (IF NOT EXISTS) and safe to run multiple times.
func (*Plugin) Run ¶
Run starts the background metric export loop. Leader election is performed via the plugin_lease table: every 30 seconds the worker tries to acquire or renew the lease. Only the leader (the worker holding the lease) exports metrics every 60 seconds. Returns when ctx is cancelled.