Artifact d1866dad3ed13031423bcc969a694f887e4494c29616295fc82df55ec7b86d89:
- File
docs/site/content/docs/reference/sdk/observer/otel/api.md
— part of check-in
[f30849a466]
at
2026-04-26 14:14:53
on branch trunk
— docs: usability improvements from DX audit (#9)
Implements all seven recommended changes from the docs audit:
1. SDK pages now show package names in nav. Add scripts/prepend-sdk-frontmatter.sh that prepends '--- title: <pkg> ---' to each gomarkdoc-generated api.md; wired into 'make docs-gen-sdk'. Sidebar previously showed five undifferentiated 'API' entries; now shows cli, db, dst, libfossil, observer/otel.
2. /examples/ populated with paragraphs + GitHub deep-links for embed-repo-api and wasm. No longer a placeholder pointing back at the repo.
3. Architecture page gets an inline SVG mirroring the landing-page diagram. Self-contained CSS (uses currentColor + ember accent) so it tracks Hextra's light/dark theme without depending on the landing's CSS scope.
4. Cross-links added: quickstart -> production + extension-points, migration -> architecture, architecture -> extension-points. Extension Points and Production patterns are now reachable via prose, not just the sidebar.
5. /docs/ landing expanded from 3 sentences to a 7-line subsection map calling out each page's purpose.
6. Version indicator in navbar (libfossil v0.4.2). Override layouts/_partials/navbar-title.html mimics Hextra's default and appends a small mono version tag from .Site.Params.version.
7. New /docs/production/ page covering error handling, context cancellation, telemetry wiring, repo-handle lifetime, and driver selection — the patterns the quickstart's log.Fatal shortcuts gloss over. (user: [email protected], size: 8585) [annotate] [blame] [check-ins using]
title: observer/otel
<!-- Code generated by gomarkdoc. DO NOT EDIT -->otel
import "github.com/danmestas/libfossil/observer/otel"
Package otel provides OpenTelemetry implementations of the libfossil SyncObserver and CheckoutObserver interfaces. Import this package only when you want OTel instrumentation — it pulls in the OTel SDK dependency.
Index
- type CheckoutObserver
- func NewCheckoutObserver() *CheckoutObserver
- func (o *CheckoutObserver) CommitCompleted(info libfossil.CommitEnd)
- func (o *CheckoutObserver) CommitStarted(info libfossil.CommitStart)
- func (o *CheckoutObserver) Error(err error)
- func (o *CheckoutObserver) ExtractCompleted(info libfossil.ExtractEnd)
- func (o *CheckoutObserver) ExtractFileCompleted(name string, change libfossil.UpdateChange)
- func (o *CheckoutObserver) ExtractStarted(info libfossil.ExtractStart)
- func (o *CheckoutObserver) ScanCompleted(info libfossil.ScanEnd)
- func (o *CheckoutObserver) ScanStarted(dir string)
- func (o *CheckoutObserver) String() string
- type SyncObserver
- func NewSyncObserver() *SyncObserver
- func (o *SyncObserver) Completed(info libfossil.SessionEnd)
- func (o *SyncObserver) Error(err error)
- func (o *SyncObserver) HandleCompleted(info libfossil.HandleEnd)
- func (o *SyncObserver) HandleStarted(info libfossil.HandleStart)
- func (o *SyncObserver) RoundCompleted(round int, stats libfossil.RoundStats)
- func (o *SyncObserver) RoundStarted(round int)
- func (o *SyncObserver) Started(info libfossil.SessionStart)
- func (o *SyncObserver) String() string
- func (o *SyncObserver) TableSyncCompleted(info libfossil.TableSyncEnd)
- func (o *SyncObserver) TableSyncStarted(info libfossil.TableSyncStart)
type CheckoutObserver
CheckoutObserver implements libfossil.CheckoutObserver using OpenTelemetry spans and metrics.
type CheckoutObserver struct {
// contains filtered or unexported fields
}
func NewCheckoutObserver
func NewCheckoutObserver() *CheckoutObserver
NewCheckoutObserver returns a CheckoutObserver that records spans and metrics using the OTel global tracer and meter providers.
func (*CheckoutObserver) CommitCompleted
func (o *CheckoutObserver) CommitCompleted(info libfossil.CommitEnd)
func (*CheckoutObserver) CommitStarted
func (o *CheckoutObserver) CommitStarted(info libfossil.CommitStart)
func (*CheckoutObserver) Error
func (o *CheckoutObserver) Error(err error)
func (*CheckoutObserver) ExtractCompleted
func (o *CheckoutObserver) ExtractCompleted(info libfossil.ExtractEnd)
func (*CheckoutObserver) ExtractFileCompleted
func (o *CheckoutObserver) ExtractFileCompleted(name string, change libfossil.UpdateChange)
func (*CheckoutObserver) ExtractStarted
func (o *CheckoutObserver) ExtractStarted(info libfossil.ExtractStart)
func (*CheckoutObserver) ScanCompleted
func (o *CheckoutObserver) ScanCompleted(info libfossil.ScanEnd)
func (*CheckoutObserver) ScanStarted
func (o *CheckoutObserver) ScanStarted(dir string)
func (*CheckoutObserver) String
func (o *CheckoutObserver) String() string
type SyncObserver
SyncObserver implements libfossil.SyncObserver using OpenTelemetry spans and metrics.
type SyncObserver struct {
// contains filtered or unexported fields
}
func NewSyncObserver
func NewSyncObserver() *SyncObserver
NewSyncObserver returns a SyncObserver that records spans and metrics using the OTel global tracer and meter providers.
func (*SyncObserver) Completed
func (o *SyncObserver) Completed(info libfossil.SessionEnd)
func (*SyncObserver) Error
func (o *SyncObserver) Error(err error)
func (*SyncObserver) HandleCompleted
func (o *SyncObserver) HandleCompleted(info libfossil.HandleEnd)
func (*SyncObserver) HandleStarted
func (o *SyncObserver) HandleStarted(info libfossil.HandleStart)
func (*SyncObserver) RoundCompleted
func (o *SyncObserver) RoundCompleted(round int, stats libfossil.RoundStats)
func (*SyncObserver) RoundStarted
func (o *SyncObserver) RoundStarted(round int)
func (*SyncObserver) Started
func (o *SyncObserver) Started(info libfossil.SessionStart)
func (*SyncObserver) String
func (o *SyncObserver) String() string
String returns a human-readable description.
func (*SyncObserver) TableSyncCompleted
func (o *SyncObserver) TableSyncCompleted(info libfossil.TableSyncEnd)
func (*SyncObserver) TableSyncStarted
func (o *SyncObserver) TableSyncStarted(info libfossil.TableSyncStart)
Generated by gomarkdoc