Documentation
¶
Index ¶
- Variables
- type Trace
- func (*Trace) Descriptor() ([]byte, []int)deprecated
- func (x *Trace) GetEndpoint() string
- func (x *Trace) GetName() string
- func (x *Trace) GetRatio() float64
- func (x *Trace) GetServiceName() string
- func (x *Trace) GetTimeout() *durationpb.Duration
- func (*Trace) ProtoMessage()
- func (x *Trace) ProtoReflect() protoreflect.Message
- func (x *Trace) Reset()
- func (x *Trace) String() string
- func (m *Trace) Validate() error
- func (m *Trace) ValidateAll() error
- type TraceMultiError
- type TraceValidationError
Constants ¶
This section is empty.
Variables ¶
var File_runtime_trace_v1_trace_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Trace ¶
type Trace struct {
// name specifies the tracing system to use (e.g., "jaeger", "zipkin", "otlp").
// This can be used to select a registered TracerProvider.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// endpoint is the address of the tracing collector/agent.
// e.g., "localhost:6831" for Jaeger agent, or "localhost:4317" for OTLP gRPC.
Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
// service_name is the name of the service reporting traces.
// If not set, it might default to the application's name.
ServiceName string `protobuf:"bytes,3,opt,name=service_name,proto3" json:"service_name,omitempty"`
// timeout for trace operations, e.g., exporting spans.
Timeout *durationpb.Duration `protobuf:"bytes,4,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// ratio is the sampling probability (e.g., 0.01 for 1%).
// A value of 1.0 means always sample, 0.0 means never sample.
// If not set, a default sampling strategy might be applied.
Ratio *float64 `protobuf:"fixed64,5,opt,name=ratio,proto3,oneof" json:"ratio,omitempty"`
// contains filtered or unexported fields
}
Trace defines the basic configuration for distributed tracing. This provides a minimal set of options, allowing for future expansion.
func (*Trace) Descriptor
deprecated
func (*Trace) GetEndpoint ¶
func (*Trace) GetServiceName ¶
func (*Trace) GetTimeout ¶
func (x *Trace) GetTimeout() *durationpb.Duration
func (*Trace) ProtoMessage ¶
func (*Trace) ProtoMessage()
func (*Trace) ProtoReflect ¶
func (x *Trace) ProtoReflect() protoreflect.Message
func (*Trace) Validate ¶
Validate checks the field values on Trace with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Trace) ValidateAll ¶
ValidateAll checks the field values on Trace with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TraceMultiError, or nil if none found.
type TraceMultiError ¶
type TraceMultiError []error
TraceMultiError is an error wrapping multiple validation errors returned by Trace.ValidateAll() if the designated constraints aren't met.
func (TraceMultiError) AllErrors ¶
func (m TraceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TraceMultiError) Error ¶
func (m TraceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TraceValidationError ¶
type TraceValidationError struct {
// contains filtered or unexported fields
}
TraceValidationError is the validation error returned by Trace.Validate if the designated constraints aren't met.
func (TraceValidationError) Cause ¶
func (e TraceValidationError) Cause() error
Cause function returns cause value.
func (TraceValidationError) Error ¶
func (e TraceValidationError) Error() string
Error satisfies the builtin error interface
func (TraceValidationError) ErrorName ¶
func (e TraceValidationError) ErrorName() string
ErrorName returns error name.
func (TraceValidationError) Field ¶
func (e TraceValidationError) Field() string
Field function returns field value.
func (TraceValidationError) Key ¶
func (e TraceValidationError) Key() bool
Key function returns key value.
func (TraceValidationError) Reason ¶
func (e TraceValidationError) Reason() string
Reason function returns reason value.