Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
562 B
Go
20 lines
562 B
Go
package sentry
|
|
|
|
// A SamplingContext is passed to a TracesSampler to determine a sampling
|
|
// decision.
|
|
//
|
|
// TODO(tracing): possibly expand SamplingContext to include custom /
|
|
// user-provided data.
|
|
type SamplingContext struct {
|
|
Span *Span // The current span, always non-nil.
|
|
Parent *Span // The parent span, may be nil.
|
|
}
|
|
|
|
// The TracesSample type is an adapter to allow the use of ordinary
|
|
// functions as a TracesSampler.
|
|
type TracesSampler func(ctx SamplingContext) float64
|
|
|
|
func (f TracesSampler) Sample(ctx SamplingContext) float64 {
|
|
return f(ctx)
|
|
}
|