Documentation ¶
Index ¶
- Constants
- Variables
- func GaugeMillisecond(ctx context.Context, si64 *stats.Int64Measure, value int64, ...)
- func IncrementInt64Counter(ctx context.Context, si64 *stats.Int64Measure, tagMutator ...tag.Mutator)
- func Init(ctx context.Context, cfg Config, lg log.Logger)
- type Config
- type MessagingTracer
- type PostgresTracer
- type Transport
Constants ¶
View Source
const ( HookConditionPreHookDB = "prehookdb" HookConditionPostHookDB = "posthookdb" HookConditionPreHookQueue = "prehookqueue" HookConditionPostHookQueue = "posthookqueue" )
Variables ¶
View Source
var ( TagReceiverType = tag.MustNewKey("receiver_type") TagNotificationType = tag.MustNewKey("notification_type") TagMessageStatus = tag.MustNewKey("status") TagHookCondition = tag.MustNewKey("hook_condition") MetricNotificationMessageQueueTime = stats.Int64("notification.message.queue.time", "time of message from enqueued to be picked up", stats.UnitMilliseconds) MetricNotificationMessageCounter = stats.Int64("notification.message", "notification messages counter", stats.UnitDimensionless) MetricNotificationSubscriberNotFound = stats.Int64("notification.subscriber.notfound", "notification does not match any subscription", stats.UnitDimensionless) MetricReceiverHookFailed = stats.Int64("receiver.hook.failed", "failed hook condition", stats.UnitDimensionless) )
Functions ¶
func GaugeMillisecond ¶
func IncrementInt64Counter ¶
Types ¶
type Config ¶
type Config struct { // Debug sets the bind address for pprof & zpages server. Debug string `mapstructure:"debug_addr" yaml:"debug_addr" default:"localhost:8083"` // OpenCensus trace & metrics configurations. EnableCPU bool `mapstructure:"enable_cpu" yaml:"enable_cpu" default:"true"` EnableMemory bool `mapstructure:"enable_memory" yaml:"enable_memory" default:"true"` SamplingFraction float64 `mapstructure:"sampling_fraction" yaml:"sampling_fraction" default:"1"` // OpenCensus exporter configurations. ServiceName string `mapstructure:"service_name" yaml:"service_name" default:"siren"` // NewRelic exporter. EnableNewrelic bool `mapstructure:"enable_newrelic" yaml:"enable_newrelic" default:"false"` NewRelicAPIKey string `mapstructure:"newrelic_api_key" yaml:"newrelic_api_key" default:"____LICENSE_STRING_OF_40_CHARACTERS_____"` // OpenTelemetry Agent exporter. EnableOtelAgent bool `mapstructure:"enable_otel_agent" yaml:"enable_otel_agent" default:"false"` OpenTelAgentAddr string `mapstructure:"otel_agent_addr" yaml:"otel_agent_addr" default:"localhost:55678"` }
type MessagingTracer ¶
type MessagingTracer struct {
// contains filtered or unexported fields
}
func NewMessagingTracer ¶
func NewMessagingTracer(queueSystem string) *MessagingTracer
func (*MessagingTracer) StopSpan ¶ added in v0.6.7
func (msg *MessagingTracer) StopSpan()
type PostgresTracer ¶
type PostgresTracer struct {
// contains filtered or unexported fields
}
func NewPostgresTracer ¶
func NewPostgresTracer(url string) (*PostgresTracer, error)
func (*PostgresTracer) StopSpan ¶ added in v0.6.7
func (d *PostgresTracer) StopSpan()
Click to show internal directories.
Click to hide internal directories.