datadogexport

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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

func New

func New() plugin.Plugin

New creates a new Plugin instance.

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

func (p *Plugin) Init(ctx context.Context, env *plugin.Environment) error

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

func (p *Plugin) Migrations() []plugin.Migration

Migrations returns the database schema for Datadog export configs. The table is idempotent (IF NOT EXISTS) and safe to run multiple times.

func (*Plugin) RegisterRoutes

func (p *Plugin) RegisterRoutes(mux *http.ServeMux) error

func (*Plugin) Run

func (p *Plugin) Run(ctx context.Context) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL