Documentation
¶
Index ¶
- Constants
- Variables
- func Configure(config Configuration) ([]trace.TracerProviderOption, error)
- type Configuration
- type ProbabilityAttributeProcessor
- func (pap *ProbabilityAttributeProcessor) ForceFlush(ctx context.Context) error
- func (pap *ProbabilityAttributeProcessor) OnEnd(s sdktrace.ReadOnlySpan)
- func (pap *ProbabilityAttributeProcessor) OnStart(parent context.Context, s sdktrace.ReadWriteSpan)
- func (pap *ProbabilityAttributeProcessor) Shutdown(ctx context.Context) error
- type Sampler
- type SpanExporter
Constants ¶
View Source
const (
PROBABILITY_SCALE_FACTOR_32 float64 = 4_294_967_295 // (2 ** 32) - 1
)
View Source
const Version = "1.0.0"
Version defines the version of this Bugsnag performance module
Variables ¶
View Source
var (
PROBABILITY_SCALE_FACTOR_64 = new(big.Float).SetUint64(math.MaxUint64) // (2 ** 64) - 1
)
View Source
var REQUEST_HEADERS = map[string]string{/* contains filtered or unexported fields */}
Functions ¶
func Configure ¶
func Configure(config Configuration) ([]trace.TracerProviderOption, error)
Configure Bugsnag. The only required setting is the APIKey, which can be obtained by clicking on "Settings" in your Bugsnag dashboard. Returns OTeL sampler, probability attribute processor, trace exporter and error
Types ¶
type Configuration ¶
type Configuration struct { // Your Bugsnag API key, e.g. "c9d60ae4c7e70c4b6c4ebd3e8056d2b8". You can // find this by clicking Settings on https://bugsnag.com/. APIKey string // The currently running version of the app. This is used to filter errors // in the Bugsnag dasboard. If you set this then Bugsnag will only re-open // resolved errors if they happen in different app versions. AppVersion string // Address to which bugsnag will send traces to Endpoint string // The current release stage. This defaults to "production" and is used to // filter errors in the Bugsnag dashboard. // Should have the same value as "deployment.environment" otel resource attribute ReleaseStage string // The Release stages to send traces in. If you set this then bugsnag-go-performance will // only send traces to Bugsnag if the ReleaseStage is listed here. EnabledReleaseStages []string // Context created in the main program // Used in probability fetcher - after this context is marked Done // the goroutine will switch to a graceful shutdown // and stop querying for new probability values. MainContext context.Context // Provide custom sampler to use // If not provided, the default sampler will be used CustomSampler trace.Sampler // Resource to be merged with BugSnag resource data // If not provided, the default resource will be used Resource *resource.Resource // Sets the value of the service.name resource attribute // We also recommend you set it to the same name as your // BugSnag project name to identify spans on the dashboard // if Distributed Tracing is used. ServiceName string // The http Transport to use, defaults to the default http Transport. This // can be configured if you are in an environment // that has stringent conditions on making http requests. Transport http.RoundTripper // Logger to use for debug messages Logger *log.Logger }
var Config Configuration
Config is the configuration for the default Bugsnag performance module
type ProbabilityAttributeProcessor ¶
type ProbabilityAttributeProcessor struct {
// contains filtered or unexported fields
}
func (*ProbabilityAttributeProcessor) ForceFlush ¶
func (pap *ProbabilityAttributeProcessor) ForceFlush(ctx context.Context) error
func (*ProbabilityAttributeProcessor) OnEnd ¶
func (pap *ProbabilityAttributeProcessor) OnEnd(s sdktrace.ReadOnlySpan)
func (*ProbabilityAttributeProcessor) OnStart ¶
func (pap *ProbabilityAttributeProcessor) OnStart(parent context.Context, s sdktrace.ReadWriteSpan)
type Sampler ¶
type Sampler struct {
// contains filtered or unexported fields
}
func (*Sampler) Description ¶
func (*Sampler) ShouldSample ¶
func (s *Sampler) ShouldSample(parameters sdktrace.SamplingParameters) sdktrace.SamplingResult
type SpanExporter ¶
type SpanExporter struct {
// contains filtered or unexported fields
}
func (*SpanExporter) ExportSpans ¶
func (sp *SpanExporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.