Documentation
¶
Overview ¶
Package otel provides opt-in OpenTelemetry adapters for generated Spice HTTP routes and typed module-event interactions. It uses caller-owned providers and never installs global state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifest ¶
func Manifest() spicestarter.Manifest
Manifest returns OpenTelemetry starter compatibility and review metadata.
Types ¶
type EventObserver ¶
type EventObserver struct {
// contains filtered or unexported fields
}
EventObserver creates one bounded span and metric set for each generated publisher-to-subscriber interaction. It records identities owned by the compiler and never records event payloads or error text.
func NewEventObserver ¶
func NewEventObserver(options Options) (*EventObserver, error)
NewEventObserver constructs the OpenTelemetry event adapter. Both providers are required so enabling it cannot silently emit partial telemetry.
func (*EventObserver) BeginEvent ¶
func (observer *EventObserver) BeginEvent( ctx context.Context, interaction spiceevent.Interaction, ) (context.Context, func(spiceevent.Result))
BeginEvent implements event.Observer.
type HTTPObserver ¶
type HTTPObserver struct {
// contains filtered or unexported fields
}
HTTPObserver creates module-aware server spans and bounded route metrics.
func NewHTTPObserver ¶
func NewHTTPObserver(options Options) (*HTTPObserver, error)
NewHTTPObserver constructs the OpenTelemetry HTTP adapter. Both providers are required so enabling the starter cannot silently emit partial telemetry.
func (*HTTPObserver) BeginHTTP ¶
func (observer *HTTPObserver) BeginHTTP( ctx context.Context, route web.RouteMetadata, ) (context.Context, func(web.HTTPResult))
BeginHTTP implements web.HTTPObserver.
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer is the generated application-level OpenTelemetry adapter. It composes HTTP route and typed module-event telemetry without global state.
func NewObserver ¶
NewObserver constructs the complete generated application observer.
func (*Observer) BeginEvent ¶
func (observer *Observer) BeginEvent( ctx context.Context, interaction spiceevent.Interaction, ) (context.Context, func(spiceevent.Result))
BeginEvent implements event.Observer.
type Options ¶
type Options struct {
TracerProvider trace.TracerProvider
MeterProvider metric.MeterProvider
}
Options supplies the application-owned OpenTelemetry providers.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
starter-otel-release
command
Command starter-otel-release builds deterministic signed library artifacts.
|
Command starter-otel-release builds deterministic signed library artifacts. |
|
internal
|
|
|
qualitygate
command
Command qualitygate runs starter-otel's repository-owned cross-platform checks.
|
Command qualitygate runs starter-otel's repository-owned cross-platform checks. |
|
release
Package release builds deterministic, signed source releases from exact Git commits.
|
Package release builds deterministic, signed source releases from exact Git commits. |