Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLocalProvider ¶
func InitLocalProvider(ctx context.Context, config Config, exportToConsole bool) (func(ctx context.Context) error, error)
InitLocalProvider creates an OpenTelemetry provider for the concrete service. If exportToConsole is `true`, the traces will be written in the console for debugging purposes.
Types ¶
type Config ¶
type Config struct {
// ServiceName is the name of the instrumented library/service
ServiceName string `mapstructure:"tracing-config-service-name" description:"Set the tracing service name used in traces"`
// ServiceVersion is the version of the instrumented library/service
// It must be in Semver format `<MAYOR>.<MINOR>.<PATCH>`
ServiceVersion string `mapstructure:"tracing-config-service-version" description:"Set the tracing service version used in traces"`
// CollectorEndpoint is the target of the collector.
// Must be in the format `<DOMAIN>:<PORT>` without prefixed protocol
// Ignored in the case of a LocalProvider
CollectorEndpoint string `` /* 134-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.