Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ServiceInstanceId string `default:"" split_words:"true"` // nolint:revive
HostName string `default:"" split_words:"true"`
Debug bool `default:"false"`
DebugPrettyPrint bool `default:"true" split_words:"true"`
ExporterType string `default:"grpc" split_words:"true"`
// OpenTelemetry official env vars
// https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration
ServiceName string `required:"true" split_words:"true"`
SdkDisabled bool `default:"false" split_words:"true"`
// https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_endpoint
// https://opentelemetry.io/docs/specs/otel/protocol/exporter/#configuration-options
ExporterOtlpEndpoint string `default:"" split_words:"true"`
ExporterOtlpCertificate string `default:"" split_words:"true"` // CA Certificate
ExporterOtlpClientKey string `default:"" split_words:"true"`
ExporterOtlpClientCertificate string `default:"" split_words:"true"`
// https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#periodic-exporting-metricreader
MetricExportInterval time.Duration `default:"10s" split_words:"true"`
}
type InitOpt ¶ added in v0.8.0
type InitOpt func(defaultAptions *initDefaultOptions)
func WithDefaultAttributes ¶ added in v0.8.0
func WithServiceVersionAttribute ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.