Documentation ¶
Index ¶
- Constants
- Variables
- func GetTracerProvider(serviceName string) rawtrace.TracerProvider
- func NewSpan(ctx context.Context, serviceName string, spanName string) (context.Context, rawtrace.Span)
- func RegisterTracerProvider(serviceName string, config *Config) errordeprecated
- func RegisterTracerProviderWithContext(ctx context.Context, serviceName string, config *Config) error
- func WrapK8sCache(c cache.Cache) cache.Cache
- func WrapK8sClient(c client.Client) client.Client
- type Config
- type ExporterType
- type FileConfig
- type JaegerConfig
- type K8sCacheWrapper
- type K8sClientWrapper
- func (c *K8sClientWrapper) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *K8sClientWrapper) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *K8sClientWrapper) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (c *K8sClientWrapper) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (c *K8sClientWrapper) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c *K8sClientWrapper) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (c *K8sClientWrapper) Status() client.StatusWriter
- func (c *K8sClientWrapper) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type K8sStatusWriterWrapper
- type OtlpGrpcConfig
- type OtlpHttpConfig
- type SamplerConfig
- type SamplerType
Constants ¶
View Source
const ( AdminClientTracer = "admin-client" AdminGormTracer = "admin-gorm" AdminServerTracer = "admin-server" BlobstoreClientTracer = "blobstore-client" DataCatalogClientTracer = "datacatalog-client" DataCatalogGormTracer = "datacatalog-gorm" DataCatalogServerTracer = "datacatalog-server" FlytePropellerTracer = "flytepropeller" K8sClientTracer = "k8s-client" )
Variables ¶
View Source
var (
ConfigSection = config.MustRegisterSection(configSectionKey, defaultConfig)
)
Functions ¶
func GetTracerProvider ¶
func GetTracerProvider(serviceName string) rawtrace.TracerProvider
GetTracerProvider returns the tracer provider for the given service name.
func NewSpan ¶
func NewSpan(ctx context.Context, serviceName string, spanName string) (context.Context, rawtrace.Span)
NewSpan creates a new span with the given service name and span name.
func RegisterTracerProvider
deprecated
Types ¶
type Config ¶
type Config struct { ExporterType ExporterType `json:"type" pflag:",Sets the type of exporter to configure [noop/file/jaeger/otlpgrpc/otlphttp]."` FileConfig FileConfig `json:"file" pflag:",Configuration for exporting telemetry traces to a file"` JaegerConfig JaegerConfig `json:"jaeger" pflag:",Configuration for exporting telemetry traces to a jaeger"` OtlpGrpcConfig OtlpGrpcConfig `json:"otlpgrpc" pflag:",Configuration for exporting telemetry traces to an OTLP gRPC collector"` OtlpHttpConfig OtlpHttpConfig `json:"otlphttp" pflag:",Configuration for exporting telemetry traces to an OTLP HTTP collector"` // nolint:golint SamplerConfig SamplerConfig `json:"sampler" pflag:",Configuration for the sampler to use for the tracer"` }
type ExporterType ¶
type ExporterType = string
const ( NoopExporter ExporterType = "noop" FileExporter ExporterType = "file" JaegerExporter ExporterType = "jaeger" OtlpGrpcExporter ExporterType = "otlpgrpc" OtlpHttpExporter ExporterType = "otlphttp" // nolint:golint )
type FileConfig ¶
type FileConfig struct {
Filename string `json:"filename" pflag:",Filename to store exported telemetry traces"`
}
type JaegerConfig ¶
type JaegerConfig struct {
Endpoint string `json:"endpoint" pflag:",Endpoint for the jaeger telemetry trace ingestor"`
}
type K8sCacheWrapper ¶
func (*K8sCacheWrapper) List ¶
func (c *K8sCacheWrapper) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
type K8sClientWrapper ¶
func (*K8sClientWrapper) Create ¶
func (c *K8sClientWrapper) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*K8sClientWrapper) Delete ¶
func (c *K8sClientWrapper) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*K8sClientWrapper) DeleteAllOf ¶
func (c *K8sClientWrapper) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
func (*K8sClientWrapper) List ¶
func (c *K8sClientWrapper) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*K8sClientWrapper) Patch ¶
func (c *K8sClientWrapper) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*K8sClientWrapper) Status ¶
func (c *K8sClientWrapper) Status() client.StatusWriter
func (*K8sClientWrapper) Update ¶
func (c *K8sClientWrapper) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type K8sStatusWriterWrapper ¶
type K8sStatusWriterWrapper struct {
client.StatusWriter
}
func (*K8sStatusWriterWrapper) Patch ¶
func (s *K8sStatusWriterWrapper) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error
func (*K8sStatusWriterWrapper) Update ¶
func (s *K8sStatusWriterWrapper) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error
type OtlpGrpcConfig ¶ added in v1.13.0
type OtlpGrpcConfig struct {
Endpoint string `json:"endpoint" pflag:",Endpoint for the OTLP telemetry trace collector"`
}
type OtlpHttpConfig ¶ added in v1.13.0
type OtlpHttpConfig struct {
Endpoint string `json:"endpoint" pflag:",Endpoint for the OTLP telemetry trace collector"`
}
type SamplerConfig ¶ added in v1.13.0
type SamplerConfig struct { ParentSampler SamplerType `json:"parentSampler" pflag:",Sets the parent sampler to use for the tracer"` TraceIDRatio float64 `json:"traceIdRatio" pflag:"-,Sets the trace id ratio for the TraceIdRatioBased sampler"` }
type SamplerType ¶ added in v1.13.0
type SamplerType = string
const ( AlwaysSample SamplerType = "always" TraceIDRatioBased SamplerType = "traceid" )
Click to show internal directories.
Click to hide internal directories.