Documentation
¶
Index ¶
- func WithAttributes(attributes map[string]string) trace.SpanStartOption
- func WithResource(resource map[string]string) trace.SpanStartOption
- func WithSpanKind(kind trace.SpanKind) trace.SpanStartOption
- type Alert
- type AlertHandler
- type AlertSeverity
- type AlertStatus
- type ApplicationMetricsCollector
- type EmailAlertHandler
- type HealthCheck
- type HealthStatus
- type JaegerExporter
- type LogAlertHandler
- type Metric
- type MetricExporter
- type MetricType
- type Monitor
- func (m *Monitor) AddAlert(alert *Alert) error
- func (m *Monitor) GetAlert(alertID string) (*Alert, error)
- func (m *Monitor) GetHealthStatus() *HealthCheck
- func (m *Monitor) GetMetric(name string) (*Metric, error)
- func (m *Monitor) GetStats() map[string]interface{}
- func (m *Monitor) ListAlerts() []*Alert
- func (m *Monitor) ListMetrics() []*Metric
- func (m *Monitor) RecordMetric(metric *Metric)
- func (m *Monitor) RegisterAlertHandler(handler AlertHandler)
- func (m *Monitor) RemoveAlert(alertID string) error
- func (m *Monitor) Shutdown(ctx context.Context) error
- func (m *Monitor) UnregisterAlertHandler(name string)
- func (m *Monitor) UpdateAlert(alert *Alert) error
- type MonitoringConfig
- type OTelTracer
- func (t *OTelTracer) AddEvent(span trace.Span, name string, attributes map[string]string)
- func (t *OTelTracer) AddLink(span trace.Span, traceID, spanID string, attributes map[string]string)
- func (t *OTelTracer) EndSpan(span trace.Span)
- func (t *OTelTracer) ExtractTraceContext(ctx context.Context, headers map[string]string) context.Context
- func (t *OTelTracer) GetSpanFromContext(ctx context.Context) trace.Span
- func (t *OTelTracer) GetSpanIDFromContext(ctx context.Context) string
- func (t *OTelTracer) GetStats() map[string]interface{}
- func (t *OTelTracer) GetTraceIDFromContext(ctx context.Context) string
- func (t *OTelTracer) InjectTraceContext(ctx context.Context, headers map[string]string)
- func (t *OTelTracer) SetAttribute(span trace.Span, key, value string)
- func (t *OTelTracer) SetStatus(span trace.Span, code codes.Code, description string)
- func (t *OTelTracer) Shutdown(ctx context.Context) error
- func (t *OTelTracer) StartSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
- type OTelTracingConfig
- type Observability
- func (o *Observability) AddAlert(alert *Alert) error
- func (o *Observability) EndSpan(span interface{})
- func (o *Observability) GetHealthStatus() *HealthCheck
- func (o *Observability) GetPrometheusHandler() interface{}
- func (o *Observability) GetStats() map[string]interface{}
- func (o *Observability) ObserveRequest(ctx context.Context, name string, handler func(context.Context) error) error
- func (o *Observability) RecordError(ctx context.Context, err error, attributes map[string]string) error
- func (o *Observability) RecordMetric(metric *Metric)
- func (o *Observability) RegisterAlertHandler(handler AlertHandler)
- func (o *Observability) Shutdown(ctx context.Context) error
- func (o *Observability) StartSpan(ctx context.Context, name string, opts ...interface{}) (context.Context, interface{})
- func (o *Observability) WithMetrics(name string, labels map[string]string, fn func() error) error
- func (o *Observability) WithSpan(ctx context.Context, name string, fn func(context.Context, interface{}) error) error
- type ObservabilityConfig
- type PrometheusConfig
- type PrometheusExporter
- func (p *PrometheusExporter) ExportMetric(ctx context.Context, metric *Metric) error
- func (p *PrometheusExporter) GetHandler() http.Handler
- func (p *PrometheusExporter) GetName() string
- func (p *PrometheusExporter) GetRegistry() *prometheus.Registry
- func (p *PrometheusExporter) GetStats() map[string]interface{}
- func (p *PrometheusExporter) Shutdown(ctx context.Context) error
- func (p *PrometheusExporter) Start() error
- func (p *PrometheusExporter) Stop(ctx context.Context) error
- type SlackAlertHandler
- type Span
- type SpanEvent
- type SpanExporter
- type SpanKind
- type SpanLink
- type SpanOption
- type SpanStatus
- type SystemMetricsCollector
- type TraceContext
- type Tracer
- func (t *Tracer) AddEvent(span *Span, name string, attributes map[string]string)
- func (t *Tracer) AddLink(span *Span, traceID, spanID string, attributes map[string]string)
- func (t *Tracer) EndSpan(span *Span)
- func (t *Tracer) ExtractTraceContext(ctx context.Context, headers map[string]string) context.Context
- func (t *Tracer) GetSpanFromContext(ctx context.Context) *Span
- func (t *Tracer) GetSpanIDFromContext(ctx context.Context) string
- func (t *Tracer) GetStats() map[string]interface{}
- func (t *Tracer) GetTraceIDFromContext(ctx context.Context) string
- func (t *Tracer) InjectTraceContext(ctx context.Context, headers map[string]string)
- func (t *Tracer) SetAttribute(span *Span, key, value string)
- func (t *Tracer) SetStatus(span *Span, status SpanStatus)
- func (t *Tracer) Shutdown(ctx context.Context) error
- func (t *Tracer) StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, *Span)
- type TracingConfig
- type ZipkinExporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAttributes ¶
func WithAttributes(attributes map[string]string) trace.SpanStartOption
WithAttributes sets span attributes
func WithResource ¶
func WithResource(resource map[string]string) trace.SpanStartOption
WithResource sets span resource attributes
func WithSpanKind ¶
func WithSpanKind(kind trace.SpanKind) trace.SpanStartOption
WithSpanKind sets the span kind
Types ¶
type Alert ¶
type Alert struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Severity AlertSeverity `json:"severity"`
Status AlertStatus `json:"status"`
Condition string `json:"condition"`
Threshold float64 `json:"threshold"`
Duration time.Duration `json:"duration"`
Labels map[string]string `json:"labels"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
FiredAt time.Time `json:"fired_at,omitempty"`
ResolvedAt time.Time `json:"resolved_at,omitempty"`
}
Alert represents an alert
type AlertHandler ¶
type AlertHandler interface {
HandleAlert(ctx context.Context, alert *Alert) error
GetName() string
}
AlertHandler handles alert notifications
type AlertSeverity ¶
type AlertSeverity int
AlertSeverity represents the severity of an alert
const ( AlertSeverityInfo AlertSeverity = iota AlertSeverityWarning AlertSeverityCritical AlertSeverityEmergency )
func (AlertSeverity) String ¶
func (s AlertSeverity) String() string
type AlertStatus ¶
type AlertStatus int
AlertStatus represents the status of an alert
const ( AlertStatusInactive AlertStatus = iota AlertStatusPending AlertStatusFiring AlertStatusResolved )
func (AlertStatus) String ¶
func (s AlertStatus) String() string
type ApplicationMetricsCollector ¶
type ApplicationMetricsCollector struct {
// contains filtered or unexported fields
}
ApplicationMetricsCollector collects application-level metrics
func NewApplicationMetricsCollector ¶
func NewApplicationMetricsCollector() *ApplicationMetricsCollector
NewApplicationMetricsCollector creates a new application metrics collector
func (*ApplicationMetricsCollector) Collect ¶
func (c *ApplicationMetricsCollector) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector
func (*ApplicationMetricsCollector) Describe ¶
func (c *ApplicationMetricsCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector
type EmailAlertHandler ¶
type EmailAlertHandler struct {
// contains filtered or unexported fields
}
EmailAlertHandler sends alerts via email
func NewEmailAlertHandler ¶
func NewEmailAlertHandler(recipients []string, smtpConfig map[string]string) *EmailAlertHandler
func (*EmailAlertHandler) GetName ¶
func (h *EmailAlertHandler) GetName() string
func (*EmailAlertHandler) HandleAlert ¶
func (h *EmailAlertHandler) HandleAlert(ctx context.Context, alert *Alert) error
type HealthCheck ¶
type HealthCheck struct {
Name string `json:"name"`
Status HealthStatus `json:"status"`
Message string `json:"message"`
Duration time.Duration `json:"duration"`
Timestamp time.Time `json:"timestamp"`
Attributes map[string]string `json:"attributes"`
}
HealthCheck represents a health check
type HealthStatus ¶
type HealthStatus int
HealthStatus represents the status of a health check
const ( HealthStatusUnknown HealthStatus = iota HealthStatusHealthy HealthStatusDegraded HealthStatusUnhealthy )
func (HealthStatus) String ¶
func (s HealthStatus) String() string
type JaegerExporter ¶
type JaegerExporter struct {
// contains filtered or unexported fields
}
JaegerExporter implements SpanExporter for Jaeger
func (*JaegerExporter) ExportSpans ¶
func (e *JaegerExporter) ExportSpans(ctx context.Context, spans []*Span) error
type LogAlertHandler ¶
type LogAlertHandler struct {
// contains filtered or unexported fields
}
LogAlertHandler logs alerts to the logger
func NewLogAlertHandler ¶
func NewLogAlertHandler(logger logger.Logger) *LogAlertHandler
func (*LogAlertHandler) GetName ¶
func (h *LogAlertHandler) GetName() string
func (*LogAlertHandler) HandleAlert ¶
func (h *LogAlertHandler) HandleAlert(ctx context.Context, alert *Alert) error
type Metric ¶
type Metric struct {
Name string `json:"name"`
Type MetricType `json:"type"`
Value float64 `json:"value"`
Unit string `json:"unit"`
Labels map[string]string `json:"labels"`
Timestamp time.Time `json:"timestamp"`
Description string `json:"description"`
}
Metric represents a monitoring metric
type MetricExporter ¶
type MetricExporter interface {
ExportMetric(ctx context.Context, metric *Metric) error
Shutdown(ctx context.Context) error
GetName() string
}
MetricExporter interface for metric exporters
type MetricType ¶
type MetricType int
MetricType represents the type of metric
const ( MetricTypeCounter MetricType = iota MetricTypeGauge MetricTypeHistogram MetricTypeSummary )
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor provides comprehensive monitoring and alerting
func NewMonitor ¶
func NewMonitor(config MonitoringConfig) *Monitor
NewMonitor creates a new monitor
func (*Monitor) GetHealthStatus ¶
func (m *Monitor) GetHealthStatus() *HealthCheck
GetHealthStatus returns the current health status
func (*Monitor) ListMetrics ¶
ListMetrics returns all metrics
func (*Monitor) RecordMetric ¶
RecordMetric records a metric
func (*Monitor) RegisterAlertHandler ¶
func (m *Monitor) RegisterAlertHandler(handler AlertHandler)
RegisterAlertHandler registers an alert handler
func (*Monitor) RemoveAlert ¶
RemoveAlert removes an alert
func (*Monitor) UnregisterAlertHandler ¶
UnregisterAlertHandler unregisters an alert handler
func (*Monitor) UpdateAlert ¶
UpdateAlert updates an existing alert
type MonitoringConfig ¶
type MonitoringConfig struct {
EnableMetrics bool `yaml:"enable_metrics" default:"true"`
EnableAlerts bool `yaml:"enable_alerts" default:"true"`
EnableHealth bool `yaml:"enable_health" default:"true"`
EnableUptime bool `yaml:"enable_uptime" default:"true"`
EnablePerformance bool `yaml:"enable_performance" default:"true"`
CheckInterval time.Duration `yaml:"check_interval" default:"30s"`
AlertTimeout time.Duration `yaml:"alert_timeout" default:"5m"`
RetentionPeriod time.Duration `yaml:"retention_period" default:"7d"`
MaxMetrics int `yaml:"max_metrics" default:"10000"`
MaxAlerts int `yaml:"max_alerts" default:"1000"`
Logger logger.Logger `yaml:"-"`
}
MonitoringConfig contains monitoring configuration
type OTelTracer ¶
type OTelTracer struct {
// contains filtered or unexported fields
}
OTelTracer provides OpenTelemetry-based distributed tracing
func NewOTelTracer ¶
func NewOTelTracer(config OTelTracingConfig) (*OTelTracer, error)
NewOTelTracer creates a new OpenTelemetry tracer
func (*OTelTracer) ExtractTraceContext ¶
func (t *OTelTracer) ExtractTraceContext(ctx context.Context, headers map[string]string) context.Context
ExtractTraceContext extracts trace context from headers
func (*OTelTracer) GetSpanFromContext ¶
func (t *OTelTracer) GetSpanFromContext(ctx context.Context) trace.Span
GetSpanFromContext gets the current span from context
func (*OTelTracer) GetSpanIDFromContext ¶
func (t *OTelTracer) GetSpanIDFromContext(ctx context.Context) string
GetSpanIDFromContext gets the span ID from context
func (*OTelTracer) GetStats ¶
func (t *OTelTracer) GetStats() map[string]interface{}
GetStats returns tracing statistics
func (*OTelTracer) GetTraceIDFromContext ¶
func (t *OTelTracer) GetTraceIDFromContext(ctx context.Context) string
GetTraceIDFromContext gets the trace ID from context
func (*OTelTracer) InjectTraceContext ¶
func (t *OTelTracer) InjectTraceContext(ctx context.Context, headers map[string]string)
InjectTraceContext injects trace context into headers
func (*OTelTracer) SetAttribute ¶
func (t *OTelTracer) SetAttribute(span trace.Span, key, value string)
SetAttribute sets an attribute on a span
type OTelTracingConfig ¶
type OTelTracingConfig struct {
ServiceName string `yaml:"service_name" default:"forge-service"`
ServiceVersion string `yaml:"service_version" default:"1.0.0"`
Environment string `yaml:"environment" default:"development"`
SamplingRate float64 `yaml:"sampling_rate" default:"1.0"`
MaxSpans int `yaml:"max_spans" default:"10000"`
FlushInterval time.Duration `yaml:"flush_interval" default:"5s"`
// Exporters
EnableJaeger bool `yaml:"enable_jaeger" default:"false"`
JaegerEndpoint string `yaml:"jaeger_endpoint" default:"http://localhost:14268/api/traces"`
EnableOTLP bool `yaml:"enable_otlp" default:"true"`
OTLPEndpoint string `yaml:"otlp_endpoint" default:"http://localhost:4318/v1/traces"`
EnableConsole bool `yaml:"enable_console" default:"false"`
// Propagation
EnableB3 bool `yaml:"enable_b3" default:"true"`
EnableW3C bool `yaml:"enable_w3c" default:"true"`
Logger logger.Logger `yaml:"-"`
}
OTelTracingConfig contains OpenTelemetry tracing configuration
type Observability ¶
type Observability struct {
// contains filtered or unexported fields
}
Observability provides unified observability functionality
func NewObservability ¶
func NewObservability(config ObservabilityConfig) (*Observability, error)
NewObservability creates a new observability instance
func (*Observability) AddAlert ¶
func (o *Observability) AddAlert(alert *Alert) error
AddAlert adds an alert
func (*Observability) EndSpan ¶
func (o *Observability) EndSpan(span interface{})
EndSpan ends a span
func (*Observability) GetHealthStatus ¶
func (o *Observability) GetHealthStatus() *HealthCheck
GetHealthStatus returns the current health status
func (*Observability) GetPrometheusHandler ¶
func (o *Observability) GetPrometheusHandler() interface{}
GetPrometheusHandler returns the Prometheus metrics HTTP handler
func (*Observability) GetStats ¶
func (o *Observability) GetStats() map[string]interface{}
GetStats returns observability statistics
func (*Observability) ObserveRequest ¶
func (o *Observability) ObserveRequest(ctx context.Context, name string, handler func(context.Context) error) error
ObserveRequest observes a request with tracing and metrics
func (*Observability) RecordError ¶
func (o *Observability) RecordError(ctx context.Context, err error, attributes map[string]string) error
RecordError records an error with tracing and metrics
func (*Observability) RecordMetric ¶
func (o *Observability) RecordMetric(metric *Metric)
RecordMetric records a metric
func (*Observability) RegisterAlertHandler ¶
func (o *Observability) RegisterAlertHandler(handler AlertHandler)
RegisterAlertHandler registers an alert handler
func (*Observability) Shutdown ¶
func (o *Observability) Shutdown(ctx context.Context) error
Shutdown shuts down the observability instance
func (*Observability) StartSpan ¶
func (o *Observability) StartSpan(ctx context.Context, name string, opts ...interface{}) (context.Context, interface{})
StartSpan starts a new span with tracing
func (*Observability) WithMetrics ¶
WithMetrics records metrics around a function execution
type ObservabilityConfig ¶
type ObservabilityConfig struct {
// Monitor configuration
Monitor MonitoringConfig `yaml:"monitor"`
// Tracer configuration
Tracer OTelTracingConfig `yaml:"tracer"`
// Prometheus configuration
Prometheus PrometheusConfig `yaml:"prometheus"`
// Global settings
EnableMetrics bool `yaml:"enable_metrics" default:"true"`
EnableTracing bool `yaml:"enable_tracing" default:"true"`
EnableAlerts bool `yaml:"enable_alerts" default:"true"`
EnableHealth bool `yaml:"enable_health" default:"true"`
ShutdownTimeout time.Duration `yaml:"shutdown_timeout" default:"30s"`
Logger logger.Logger `yaml:"-"`
}
ObservabilityConfig contains unified observability configuration
func CreateDefaultConfig ¶
func CreateDefaultConfig() ObservabilityConfig
CreateDefaultConfig creates a default observability configuration
type PrometheusConfig ¶
type PrometheusConfig struct {
EnableMetrics bool `yaml:"enable_metrics" default:"true"`
EnableRuntime bool `yaml:"enable_runtime" default:"true"`
ListenAddress string `yaml:"listen_address" default:":9090"`
MetricsPath string `yaml:"metrics_path" default:"/metrics"`
EnableGoMetrics bool `yaml:"enable_go_metrics" default:"true"`
Logger logger.Logger `yaml:"-"`
}
PrometheusConfig contains Prometheus configuration
type PrometheusExporter ¶
type PrometheusExporter struct {
// contains filtered or unexported fields
}
PrometheusExporter provides Prometheus metrics export
func NewPrometheusExporter ¶
func NewPrometheusExporter(config PrometheusConfig) (*PrometheusExporter, error)
NewPrometheusExporter creates a new Prometheus exporter
func (*PrometheusExporter) ExportMetric ¶
func (p *PrometheusExporter) ExportMetric(ctx context.Context, metric *Metric) error
ExportMetric exports a metric to Prometheus
func (*PrometheusExporter) GetHandler ¶
func (p *PrometheusExporter) GetHandler() http.Handler
GetHandler returns the HTTP handler for metrics
func (*PrometheusExporter) GetName ¶
func (p *PrometheusExporter) GetName() string
GetName returns the exporter name
func (*PrometheusExporter) GetRegistry ¶
func (p *PrometheusExporter) GetRegistry() *prometheus.Registry
GetRegistry returns the Prometheus registry
func (*PrometheusExporter) GetStats ¶
func (p *PrometheusExporter) GetStats() map[string]interface{}
GetStats returns Prometheus exporter statistics
func (*PrometheusExporter) Shutdown ¶
func (p *PrometheusExporter) Shutdown(ctx context.Context) error
Shutdown shuts down the exporter
func (*PrometheusExporter) Start ¶
func (p *PrometheusExporter) Start() error
Start starts the Prometheus metrics server
type SlackAlertHandler ¶
type SlackAlertHandler struct {
// contains filtered or unexported fields
}
SlackAlertHandler sends alerts to Slack
func NewSlackAlertHandler ¶
func NewSlackAlertHandler(webhookURL, channel string) *SlackAlertHandler
func (*SlackAlertHandler) GetName ¶
func (h *SlackAlertHandler) GetName() string
func (*SlackAlertHandler) HandleAlert ¶
func (h *SlackAlertHandler) HandleAlert(ctx context.Context, alert *Alert) error
type Span ¶
type Span struct {
TraceID string `json:"trace_id"`
SpanID string `json:"span_id"`
ParentSpanID string `json:"parent_span_id,omitempty"`
Name string `json:"name"`
Kind SpanKind `json:"kind"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time,omitempty"`
Duration time.Duration `json:"duration,omitempty"`
Status SpanStatus `json:"status"`
Attributes map[string]string `json:"attributes"`
Events []SpanEvent `json:"events"`
Links []SpanLink `json:"links"`
Resource map[string]string `json:"resource"`
// contains filtered or unexported fields
}
Span represents a tracing span
type SpanEvent ¶
type SpanEvent struct {
Name string `json:"name"`
Timestamp time.Time `json:"timestamp"`
Attributes map[string]string `json:"attributes"`
}
SpanEvent represents an event within a span
type SpanExporter ¶
type SpanExporter interface {
ExportSpans(ctx context.Context, spans []*Span) error
Shutdown(ctx context.Context) error
}
SpanExporter interface for exporting spans
func NewJaegerExporter ¶
func NewJaegerExporter(endpoint string) SpanExporter
NewJaegerExporter creates a new Jaeger exporter
func NewZipkinExporter ¶
func NewZipkinExporter(endpoint string) SpanExporter
NewZipkinExporter creates a new Zipkin exporter
type SpanLink ¶
type SpanLink struct {
TraceID string `json:"trace_id"`
SpanID string `json:"span_id"`
Attributes map[string]string `json:"attributes"`
}
SpanLink represents a link to another span
type SpanStatus ¶
type SpanStatus int
SpanStatus represents the status of a span
const ( SpanStatusUnset SpanStatus = iota SpanStatusOK SpanStatusError )
type SystemMetricsCollector ¶
type SystemMetricsCollector struct {
// contains filtered or unexported fields
}
SystemMetricsCollector collects system-level metrics
func NewSystemMetricsCollector ¶
func NewSystemMetricsCollector() *SystemMetricsCollector
NewSystemMetricsCollector creates a new system metrics collector
func (*SystemMetricsCollector) Collect ¶
func (c *SystemMetricsCollector) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector
func (*SystemMetricsCollector) Describe ¶
func (c *SystemMetricsCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector
type TraceContext ¶
type TraceContext struct {
TraceID string `json:"trace_id"`
SpanID string `json:"span_id"`
Sampled bool `json:"sampled"`
Flags string `json:"flags"`
}
TraceContext represents trace context information
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer provides distributed tracing functionality
func (*Tracer) ExtractTraceContext ¶
func (t *Tracer) ExtractTraceContext(ctx context.Context, headers map[string]string) context.Context
ExtractTraceContext extracts trace context from headers
func (*Tracer) GetSpanFromContext ¶
GetSpanFromContext gets the current span from context
func (*Tracer) GetSpanIDFromContext ¶
GetSpanIDFromContext gets the span ID from context
func (*Tracer) GetTraceIDFromContext ¶
GetTraceIDFromContext gets the trace ID from context
func (*Tracer) InjectTraceContext ¶
InjectTraceContext injects trace context into headers
func (*Tracer) SetAttribute ¶
SetAttribute sets an attribute on a span
func (*Tracer) SetStatus ¶
func (t *Tracer) SetStatus(span *Span, status SpanStatus)
SetStatus sets the status of a span
type TracingConfig ¶
type TracingConfig struct {
ServiceName string `yaml:"service_name" default:"forge-service"`
ServiceVersion string `yaml:"service_version" default:"1.0.0"`
Environment string `yaml:"environment" default:"development"`
SamplingRate float64 `yaml:"sampling_rate" default:"1.0"`
MaxSpans int `yaml:"max_spans" default:"10000"`
FlushInterval time.Duration `yaml:"flush_interval" default:"5s"`
EnableB3 bool `yaml:"enable_b3" default:"true"`
EnableW3C bool `yaml:"enable_w3c" default:"true"`
EnableJaeger bool `yaml:"enable_jaeger" default:"false"`
JaegerEndpoint string `yaml:"jaeger_endpoint" default:"http://localhost:14268/api/traces"`
EnableZipkin bool `yaml:"enable_zipkin" default:"false"`
ZipkinEndpoint string `yaml:"zipkin_endpoint" default:"http://localhost:9411/api/v2/spans"`
Logger logger.Logger `yaml:"-"`
}
TracingConfig contains tracing configuration
type ZipkinExporter ¶
type ZipkinExporter struct {
// contains filtered or unexported fields
}
ZipkinExporter implements SpanExporter for Zipkin
func (*ZipkinExporter) ExportSpans ¶
func (e *ZipkinExporter) ExportSpans(ctx context.Context, spans []*Span) error