Documentation
¶
Index ¶
Constants ¶
const (
// TracerName is the name of the tracer
TracerName = "github.com/dagu-org/dagu"
)
Variables ¶
This section is empty.
Functions ¶
func ExtractTraceContext ¶
ExtractTraceContext extracts trace context from environment variables
func InitializePropagators ¶
func InitializePropagators()
InitializePropagators sets up W3C trace context propagator as the global propagator
func InjectTraceContext ¶
InjectTraceContext injects the trace context from the current span into environment variables
func NewRegistry ¶
func NewRegistry(collector *Collector) *prometheus.Registry
NewRegistry creates a new Prometheus registry with Dagu collectors
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector implements prometheus.Collector interface
func NewCollector ¶
func NewCollector( version string, dagStore execution.DAGStore, dagRunStore execution.DAGRunStore, queueStore execution.QueueStore, serviceRegistry execution.ServiceRegistry, ) *Collector
NewCollector creates a new metrics collector
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector
func (*Collector) RegisterCache ¶ added in v1.30.0
func (c *Collector) RegisterCache(cache fileutil.CacheMetrics)
RegisterCache adds a cache to be monitored for metrics
type TraceContextCarrier ¶
type TraceContextCarrier struct {
// contains filtered or unexported fields
}
TraceContextCarrier is a carrier for W3C trace context propagation via environment variables
func NewTraceContextCarrier ¶
func NewTraceContextCarrier() *TraceContextCarrier
NewTraceContextCarrier creates a new carrier for trace context propagation
func (*TraceContextCarrier) Get ¶
func (c *TraceContextCarrier) Get(key string) string
Get returns the value associated with the passed key
func (*TraceContextCarrier) Keys ¶
func (c *TraceContextCarrier) Keys() []string
Keys lists the keys stored in this carrier
func (*TraceContextCarrier) Set ¶
func (c *TraceContextCarrier) Set(key string, value string)
Set stores the key-value pair
func (*TraceContextCarrier) ToEnv ¶
func (c *TraceContextCarrier) ToEnv() []string
ToEnv converts the carrier to environment variables format
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer wraps OpenTelemetry tracer with DAG-specific configuration