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]any
- 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 any)
- func (o *Observability) GetHealthStatus() *HealthCheck
- func (o *Observability) GetPrometheusHandler() any
- func (o *Observability) GetStats() map[string]any
- 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 ...any) (context.Context, any)
- 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, any) 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]any
- 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 `default:"true" yaml:"enable_metrics"`
EnableAlerts bool `default:"true" yaml:"enable_alerts"`
EnableHealth bool `default:"true" yaml:"enable_health"`
EnableUptime bool `default:"true" yaml:"enable_uptime"`
EnablePerformance bool `default:"true" yaml:"enable_performance"`
CheckInterval time.Duration `default:"30s" yaml:"check_interval"`
AlertTimeout time.Duration `default:"5m" yaml:"alert_timeout"`
RetentionPeriod time.Duration `default:"7d" yaml:"retention_period"`
MaxMetrics int `default:"10000" yaml:"max_metrics"`
MaxAlerts int `default:"1000" yaml:"max_alerts"`
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]any
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 `default:"forge-service" yaml:"service_name"`
ServiceVersion string `default:"1.0.0" yaml:"service_version"`
Environment string `default:"development" yaml:"environment"`
SamplingRate float64 `default:"1.0" yaml:"sampling_rate"`
MaxSpans int `default:"10000" yaml:"max_spans"`
FlushInterval time.Duration `default:"5s" yaml:"flush_interval"`
// Exporters
EnableJaeger bool `default:"false" yaml:"enable_jaeger"`
JaegerEndpoint string `default:"http://localhost:14268/api/traces" yaml:"jaeger_endpoint"`
EnableOTLP bool `default:"true" yaml:"enable_otlp"`
OTLPEndpoint string `default:"http://localhost:4318/v1/traces" yaml:"otlp_endpoint"`
EnableConsole bool `default:"false" yaml:"enable_console"`
// Propagation
EnableB3 bool `default:"true" yaml:"enable_b3"`
EnableW3C bool `default:"true" yaml:"enable_w3c"`
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) GetHealthStatus ¶
func (o *Observability) GetHealthStatus() *HealthCheck
GetHealthStatus returns the current health status.
func (*Observability) GetPrometheusHandler ¶
func (o *Observability) GetPrometheusHandler() any
GetPrometheusHandler returns the Prometheus metrics HTTP handler.
func (*Observability) GetStats ¶
func (o *Observability) GetStats() map[string]any
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 ...any) (context.Context, any)
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 `default:"true" yaml:"enable_metrics"`
EnableTracing bool `default:"true" yaml:"enable_tracing"`
EnableAlerts bool `default:"true" yaml:"enable_alerts"`
EnableHealth bool `default:"true" yaml:"enable_health"`
ShutdownTimeout time.Duration `default:"30s" yaml:"shutdown_timeout"`
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 `default:"true" yaml:"enable_metrics"`
EnableRuntime bool `default:"true" yaml:"enable_runtime"`
ListenAddress string `default:":9090" yaml:"listen_address"`
MetricsPath string `default:"/metrics" yaml:"metrics_path"`
EnableGoMetrics bool `default:"true" yaml:"enable_go_metrics"`
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]any
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 `default:"forge-service" yaml:"service_name"`
ServiceVersion string `default:"1.0.0" yaml:"service_version"`
Environment string `default:"development" yaml:"environment"`
SamplingRate float64 `default:"1.0" yaml:"sampling_rate"`
MaxSpans int `default:"10000" yaml:"max_spans"`
FlushInterval time.Duration `default:"5s" yaml:"flush_interval"`
EnableB3 bool `default:"true" yaml:"enable_b3"`
EnableW3C bool `default:"true" yaml:"enable_w3c"`
EnableJaeger bool `default:"false" yaml:"enable_jaeger"`
JaegerEndpoint string `default:"http://localhost:14268/api/traces" yaml:"jaeger_endpoint"`
EnableZipkin bool `default:"false" yaml:"enable_zipkin"`
ZipkinEndpoint string `default:"http://localhost:9411/api/v2/spans" yaml:"zipkin_endpoint"`
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