Documentation ¶
Index ¶
- Constants
- Variables
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetJaeger() *Jaeger
- func (x *Conf) GetOtlp() *Otlp
- func (x *Conf) GetProm() *Prometheus
- func (x *Conf) GetStdout() *Stdout
- func (*Conf) ProtoMessage()
- func (x *Conf) ProtoReflect() protoreflect.Message
- func (x *Conf) Reset()
- func (x *Conf) String() string
- func (m *Conf) Validate() error
- func (m *Conf) ValidateAll() error
- type ConfMultiError
- type ConfValidationError
- type Jaeger
- func (*Jaeger) Descriptor() ([]byte, []int)deprecated
- func (x *Jaeger) GetEnable() bool
- func (x *Jaeger) GetEndpoint() string
- func (x *Jaeger) GetMetrics() bool
- func (x *Jaeger) GetTraces() bool
- func (*Jaeger) ProtoMessage()
- func (x *Jaeger) ProtoReflect() protoreflect.Message
- func (x *Jaeger) Reset()
- func (x *Jaeger) String() string
- func (m *Jaeger) Validate() error
- func (m *Jaeger) ValidateAll() error
- type JaegerMultiError
- type JaegerValidationError
- type Metadata
- type Otlp
- func (*Otlp) Descriptor() ([]byte, []int)deprecated
- func (x *Otlp) GetEnable() bool
- func (x *Otlp) GetEndpoint() string
- func (x *Otlp) GetMetrics() bool
- func (x *Otlp) GetTraces() bool
- func (x *Otlp) GetXray() bool
- func (*Otlp) ProtoMessage()
- func (x *Otlp) ProtoReflect() protoreflect.Message
- func (x *Otlp) Reset()
- func (x *Otlp) String() string
- func (m *Otlp) Validate() error
- func (m *Otlp) ValidateAll() error
- type OtlpMultiError
- type OtlpValidationError
- type Prometheus
- func (*Prometheus) Descriptor() ([]byte, []int)deprecated
- func (x *Prometheus) GetEnable() bool
- func (x *Prometheus) GetMetrics() bool
- func (*Prometheus) ProtoMessage()
- func (x *Prometheus) ProtoReflect() protoreflect.Message
- func (x *Prometheus) Reset()
- func (x *Prometheus) String() string
- func (m *Prometheus) Validate() error
- func (m *Prometheus) ValidateAll() error
- type PrometheusMultiError
- type PrometheusValidationError
- type Provider
- type Stdout
- func (*Stdout) Descriptor() ([]byte, []int)deprecated
- func (x *Stdout) GetEnable() bool
- func (x *Stdout) GetMetricOutput() string
- func (x *Stdout) GetMetrics() bool
- func (x *Stdout) GetTraceOutput() string
- func (x *Stdout) GetTraces() bool
- func (*Stdout) ProtoMessage()
- func (x *Stdout) ProtoReflect() protoreflect.Message
- func (x *Stdout) Reset()
- func (x *Stdout) String() string
- func (m *Stdout) Validate() error
- func (m *Stdout) ValidateAll() error
- type StdoutMultiError
- type StdoutValidationError
- type TraceContext
Constants ¶
const ServiceHeader = "x-md-service-name"
Variables ¶
var File_otel_conf_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { Jaeger *Jaeger `protobuf:"bytes,1,opt,name=jaeger,proto3" json:"jaeger,omitempty"` Stdout *Stdout `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"` Otlp *Otlp `protobuf:"bytes,3,opt,name=otlp,proto3" json:"otlp,omitempty"` Prom *Prometheus `protobuf:"bytes,4,opt,name=prom,proto3" json:"prom,omitempty"` // contains filtered or unexported fields }
func (*Conf) Descriptor
deprecated
func (*Conf) GetProm ¶
func (x *Conf) GetProm() *Prometheus
func (*Conf) ProtoMessage ¶
func (*Conf) ProtoMessage()
func (*Conf) ProtoReflect ¶
func (x *Conf) ProtoReflect() protoreflect.Message
func (*Conf) Validate ¶
Validate checks the field values on Conf 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 (*Conf) ValidateAll ¶
ValidateAll checks the field values on Conf 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 ConfMultiError, or nil if none found.
type ConfMultiError ¶
type ConfMultiError []error
ConfMultiError is an error wrapping multiple validation errors returned by Conf.ValidateAll() if the designated constraints aren't met.
func (ConfMultiError) AllErrors ¶
func (m ConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfMultiError) Error ¶
func (m ConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfValidationError ¶
type ConfValidationError struct {
// contains filtered or unexported fields
}
ConfValidationError is the validation error returned by Conf.Validate if the designated constraints aren't met.
func (ConfValidationError) Cause ¶
func (e ConfValidationError) Cause() error
Cause function returns cause value.
func (ConfValidationError) Error ¶
func (e ConfValidationError) Error() string
Error satisfies the builtin error interface
func (ConfValidationError) ErrorName ¶
func (e ConfValidationError) ErrorName() string
ErrorName returns error name.
func (ConfValidationError) Field ¶
func (e ConfValidationError) Field() string
Field function returns field value.
func (ConfValidationError) Key ¶
func (e ConfValidationError) Key() bool
Key function returns key value.
func (ConfValidationError) Reason ¶
func (e ConfValidationError) Reason() string
Reason function returns reason value.
type Jaeger ¶
type Jaeger struct { Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` Metrics bool `protobuf:"varint,3,opt,name=metrics,proto3" json:"metrics,omitempty"` Traces bool `protobuf:"varint,4,opt,name=traces,proto3" json:"traces,omitempty"` // contains filtered or unexported fields }
func (*Jaeger) Descriptor
deprecated
func (*Jaeger) GetEndpoint ¶
func (*Jaeger) GetMetrics ¶
func (*Jaeger) ProtoMessage ¶
func (*Jaeger) ProtoMessage()
func (*Jaeger) ProtoReflect ¶
func (x *Jaeger) ProtoReflect() protoreflect.Message
func (*Jaeger) Validate ¶
Validate checks the field values on Jaeger 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 (*Jaeger) ValidateAll ¶
ValidateAll checks the field values on Jaeger 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 JaegerMultiError, or nil if none found.
type JaegerMultiError ¶
type JaegerMultiError []error
JaegerMultiError is an error wrapping multiple validation errors returned by Jaeger.ValidateAll() if the designated constraints aren't met.
func (JaegerMultiError) AllErrors ¶
func (m JaegerMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (JaegerMultiError) Error ¶
func (m JaegerMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type JaegerValidationError ¶
type JaegerValidationError struct {
// contains filtered or unexported fields
}
JaegerValidationError is the validation error returned by Jaeger.Validate if the designated constraints aren't met.
func (JaegerValidationError) Cause ¶
func (e JaegerValidationError) Cause() error
Cause function returns cause value.
func (JaegerValidationError) Error ¶
func (e JaegerValidationError) Error() string
Error satisfies the builtin error interface
func (JaegerValidationError) ErrorName ¶
func (e JaegerValidationError) ErrorName() string
ErrorName returns error name.
func (JaegerValidationError) Field ¶
func (e JaegerValidationError) Field() string
Field function returns field value.
func (JaegerValidationError) Key ¶
func (e JaegerValidationError) Key() bool
Key function returns key value.
func (JaegerValidationError) Reason ¶
func (e JaegerValidationError) Reason() string
Reason function returns reason value.
type Metadata ¶
type Metadata struct{}
Metadata is otel metadata propagator
func (Metadata) Extract ¶
func (b Metadata) Extract(parent context.Context, carrier propagation.TextMapCarrier) context.Context
Extract returns a copy of parent with the metadata from the carrier added.
func (Metadata) Inject ¶
func (b Metadata) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject sets metadata key-values from ctx into the carrier.
type Otlp ¶
type Otlp struct { Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` Metrics bool `protobuf:"varint,3,opt,name=metrics,proto3" json:"metrics,omitempty"` Traces bool `protobuf:"varint,4,opt,name=traces,proto3" json:"traces,omitempty"` Xray bool `protobuf:"varint,5,opt,name=xray,proto3" json:"xray,omitempty"` // contains filtered or unexported fields }
func (*Otlp) Descriptor
deprecated
func (*Otlp) GetEndpoint ¶
func (*Otlp) GetMetrics ¶
func (*Otlp) ProtoMessage ¶
func (*Otlp) ProtoMessage()
func (*Otlp) ProtoReflect ¶
func (x *Otlp) ProtoReflect() protoreflect.Message
func (*Otlp) Validate ¶
Validate checks the field values on Otlp 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 (*Otlp) ValidateAll ¶
ValidateAll checks the field values on Otlp 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 OtlpMultiError, or nil if none found.
type OtlpMultiError ¶
type OtlpMultiError []error
OtlpMultiError is an error wrapping multiple validation errors returned by Otlp.ValidateAll() if the designated constraints aren't met.
func (OtlpMultiError) AllErrors ¶
func (m OtlpMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OtlpMultiError) Error ¶
func (m OtlpMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OtlpValidationError ¶
type OtlpValidationError struct {
// contains filtered or unexported fields
}
OtlpValidationError is the validation error returned by Otlp.Validate if the designated constraints aren't met.
func (OtlpValidationError) Cause ¶
func (e OtlpValidationError) Cause() error
Cause function returns cause value.
func (OtlpValidationError) Error ¶
func (e OtlpValidationError) Error() string
Error satisfies the builtin error interface
func (OtlpValidationError) ErrorName ¶
func (e OtlpValidationError) ErrorName() string
ErrorName returns error name.
func (OtlpValidationError) Field ¶
func (e OtlpValidationError) Field() string
Field function returns field value.
func (OtlpValidationError) Key ¶
func (e OtlpValidationError) Key() bool
Key function returns key value.
func (OtlpValidationError) Reason ¶
func (e OtlpValidationError) Reason() string
Reason function returns reason value.
type Prometheus ¶
type Prometheus struct { Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` Metrics bool `protobuf:"varint,2,opt,name=metrics,proto3" json:"metrics,omitempty"` // contains filtered or unexported fields }
func (*Prometheus) Descriptor
deprecated
func (*Prometheus) Descriptor() ([]byte, []int)
Deprecated: Use Prometheus.ProtoReflect.Descriptor instead.
func (*Prometheus) GetEnable ¶
func (x *Prometheus) GetEnable() bool
func (*Prometheus) GetMetrics ¶
func (x *Prometheus) GetMetrics() bool
func (*Prometheus) ProtoMessage ¶
func (*Prometheus) ProtoMessage()
func (*Prometheus) ProtoReflect ¶
func (x *Prometheus) ProtoReflect() protoreflect.Message
func (*Prometheus) Reset ¶
func (x *Prometheus) Reset()
func (*Prometheus) String ¶
func (x *Prometheus) String() string
func (*Prometheus) Validate ¶
func (m *Prometheus) Validate() error
Validate checks the field values on Prometheus 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 (*Prometheus) ValidateAll ¶
func (m *Prometheus) ValidateAll() error
ValidateAll checks the field values on Prometheus 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 PrometheusMultiError, or nil if none found.
type PrometheusMultiError ¶
type PrometheusMultiError []error
PrometheusMultiError is an error wrapping multiple validation errors returned by Prometheus.ValidateAll() if the designated constraints aren't met.
func (PrometheusMultiError) AllErrors ¶
func (m PrometheusMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PrometheusMultiError) Error ¶
func (m PrometheusMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PrometheusValidationError ¶
type PrometheusValidationError struct {
// contains filtered or unexported fields
}
PrometheusValidationError is the validation error returned by Prometheus.Validate if the designated constraints aren't met.
func (PrometheusValidationError) Cause ¶
func (e PrometheusValidationError) Cause() error
Cause function returns cause value.
func (PrometheusValidationError) Error ¶
func (e PrometheusValidationError) Error() string
Error satisfies the builtin error interface
func (PrometheusValidationError) ErrorName ¶
func (e PrometheusValidationError) ErrorName() string
ErrorName returns error name.
func (PrometheusValidationError) Field ¶
func (e PrometheusValidationError) Field() string
Field function returns field value.
func (PrometheusValidationError) Key ¶
func (e PrometheusValidationError) Key() bool
Key function returns key value.
func (PrometheusValidationError) Reason ¶
func (e PrometheusValidationError) Reason() string
Reason function returns reason value.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
NewProvider Get trace provider
type Stdout ¶
type Stdout struct { Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` Traces bool `protobuf:"varint,2,opt,name=traces,proto3" json:"traces,omitempty"` TraceOutput string `protobuf:"bytes,3,opt,name=trace_output,json=traceOutput,proto3" json:"trace_output,omitempty"` Metrics bool `protobuf:"varint,4,opt,name=metrics,proto3" json:"metrics,omitempty"` MetricOutput string `protobuf:"bytes,5,opt,name=metric_output,json=metricOutput,proto3" json:"metric_output,omitempty"` // contains filtered or unexported fields }
func (*Stdout) Descriptor
deprecated
func (*Stdout) GetMetricOutput ¶
func (*Stdout) GetMetrics ¶
func (*Stdout) GetTraceOutput ¶
func (*Stdout) ProtoMessage ¶
func (*Stdout) ProtoMessage()
func (*Stdout) ProtoReflect ¶
func (x *Stdout) ProtoReflect() protoreflect.Message
func (*Stdout) Validate ¶
Validate checks the field values on Stdout 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 (*Stdout) ValidateAll ¶
ValidateAll checks the field values on Stdout 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 StdoutMultiError, or nil if none found.
type StdoutMultiError ¶
type StdoutMultiError []error
StdoutMultiError is an error wrapping multiple validation errors returned by Stdout.ValidateAll() if the designated constraints aren't met.
func (StdoutMultiError) AllErrors ¶
func (m StdoutMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StdoutMultiError) Error ¶
func (m StdoutMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StdoutValidationError ¶
type StdoutValidationError struct {
// contains filtered or unexported fields
}
StdoutValidationError is the validation error returned by Stdout.Validate if the designated constraints aren't met.
func (StdoutValidationError) Cause ¶
func (e StdoutValidationError) Cause() error
Cause function returns cause value.
func (StdoutValidationError) Error ¶
func (e StdoutValidationError) Error() string
Error satisfies the builtin error interface
func (StdoutValidationError) ErrorName ¶
func (e StdoutValidationError) ErrorName() string
ErrorName returns error name.
func (StdoutValidationError) Field ¶
func (e StdoutValidationError) Field() string
Field function returns field value.
func (StdoutValidationError) Key ¶
func (e StdoutValidationError) Key() bool
Key function returns key value.
func (StdoutValidationError) Reason ¶
func (e StdoutValidationError) Reason() string
Reason function returns reason value.
type TraceContext ¶
type TraceContext struct{}
TraceContext is a propagator that supports the W3C Trace Context format (https://www.w3.org/TR/trace-context/)
This propagator will propagate the traceparent and tracestate headers to guarantee traces are not broken. It is up to the users of this propagator to choose if they want to participate in a trace by modifying the traceparent header and relevant parts of the tracestate header containing their proprietary information.
func (TraceContext) Extract ¶
func (tc TraceContext) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
Extract reads tracecontext from the carrier into a returned Context.
The returned Context will be a copy of ctx and contain the extracted tracecontext as the remote SpanContext. If the extracted tracecontext is invalid, the passed ctx will be returned directly instead.
func (TraceContext) Fields ¶
func (tc TraceContext) Fields() []string
Fields returns the keys who's values are set with Inject.
func (TraceContext) Inject ¶
func (tc TraceContext) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject set tracecontext from the Context into the carrier.