Documentation
¶
Index ¶
- Variables
- func Bool(val bool) *wrapperspb.BoolValue
- func Int32(val int32) *wrapperspb.Int32Value
- func String(val string) *wrapperspb.StringValue
- type AgentConfig
- func (*AgentConfig) Descriptor() ([]byte, []int)deprecated
- func (x *AgentConfig) GetDataCapture() *DataCapture
- func (x *AgentConfig) GetEnabled() *wrapperspb.BoolValue
- func (x *AgentConfig) GetJavaagent() *JavaAgent
- func (x *AgentConfig) GetPropagationFormats() []PropagationFormat
- func (x *AgentConfig) GetReporting() *Reporting
- func (x *AgentConfig) GetResourceAttributes() map[string]string
- func (x *AgentConfig) GetServiceName() *wrapperspb.StringValue
- func (x *AgentConfig) LoadFromEnv()
- func (*AgentConfig) ProtoMessage()
- func (x *AgentConfig) ProtoReflect() protoreflect.Message
- func (x *AgentConfig) PutResourceAttributes(m map[string]string)
- func (x *AgentConfig) Reset()
- func (x *AgentConfig) String() string
- type DataCapture
- func (*DataCapture) Descriptor() ([]byte, []int)deprecated
- func (x *DataCapture) GetBodyMaxSizeBytes() *wrapperspb.Int32Value
- func (x *DataCapture) GetHttpBody() *Message
- func (x *DataCapture) GetHttpHeaders() *Message
- func (x *DataCapture) GetRpcBody() *Message
- func (x *DataCapture) GetRpcMetadata() *Message
- func (*DataCapture) ProtoMessage()
- func (x *DataCapture) ProtoReflect() protoreflect.Message
- func (x *DataCapture) Reset()
- func (x *DataCapture) String() string
- type JavaAgent
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetRequest() *wrapperspb.BoolValue
- func (x *Message) GetResponse() *wrapperspb.BoolValue
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Opa
- func (*Opa) Descriptor() ([]byte, []int)deprecated
- func (x *Opa) GetEnabled() *wrapperspb.BoolValue
- func (x *Opa) GetEndpoint() *wrapperspb.StringValue
- func (x *Opa) GetPollPeriodSeconds() *wrapperspb.Int32Value
- func (*Opa) ProtoMessage()
- func (x *Opa) ProtoReflect() protoreflect.Message
- func (x *Opa) Reset()
- func (x *Opa) String() string
- type PropagationFormat
- func (PropagationFormat) Descriptor() protoreflect.EnumDescriptor
- func (x PropagationFormat) Enum() *PropagationFormat
- func (PropagationFormat) EnumDescriptor() ([]byte, []int)deprecated
- func (x PropagationFormat) Number() protoreflect.EnumNumber
- func (x PropagationFormat) String() string
- func (PropagationFormat) Type() protoreflect.EnumType
- type Reporting
- func (*Reporting) Descriptor() ([]byte, []int)deprecated
- func (x *Reporting) GetEndpoint() *wrapperspb.StringValue
- func (x *Reporting) GetOpa() *Opa
- func (x *Reporting) GetSecure() *wrapperspb.BoolValue
- func (x *Reporting) GetToken() *wrapperspb.StringValue
- func (x *Reporting) GetTraceReporterType() TraceReporterType
- func (*Reporting) ProtoMessage()
- func (x *Reporting) ProtoReflect() protoreflect.Message
- func (x *Reporting) Reset()
- func (x *Reporting) String() string
- type TraceReporterType
- func (TraceReporterType) Descriptor() protoreflect.EnumDescriptor
- func (x TraceReporterType) Enum() *TraceReporterType
- func (TraceReporterType) EnumDescriptor() ([]byte, []int)deprecated
- func (x TraceReporterType) Number() protoreflect.EnumNumber
- func (x TraceReporterType) String() string
- func (TraceReporterType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( PropagationFormat_name = map[int32]string{ 0: "B3", 1: "TRACECONTEXT", } PropagationFormat_value = map[string]int32{ "B3": 0, "TRACECONTEXT": 1, } )
Enum value maps for PropagationFormat.
var ( TraceReporterType_name = map[int32]string{ 0: "UNSPECIFIED", 1: "ZIPKIN", 2: "OTLP", } TraceReporterType_value = map[string]int32{ "UNSPECIFIED": 0, "ZIPKIN": 1, "OTLP": 2, } )
Enum value maps for TraceReporterType.
var File_config_proto protoreflect.FileDescriptor
Functions ¶
func Bool ¶
func Bool(val bool) *wrapperspb.BoolValue
Bool wraps the scalar value to be used in the AgentConfig object
func Int32 ¶ added in v0.3.0
func Int32(val int32) *wrapperspb.Int32Value
func String ¶
func String(val string) *wrapperspb.StringValue
String wraps the scalar value to be used in the AgentConfig object
Types ¶
type AgentConfig ¶
type AgentConfig struct { // service_name identifies the service/process running e.g. "my service" ServiceName *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // reporting holds the reporting settings for the agent Reporting *Reporting `protobuf:"bytes,2,opt,name=reporting,proto3" json:"reporting,omitempty"` // data_capture describes the data being captured by instrumentation DataCapture *DataCapture `protobuf:"bytes,3,opt,name=data_capture,json=dataCapture,proto3" json:"data_capture,omitempty"` // propagation_formats list the supported propagation formats PropagationFormats []PropagationFormat `` /* 174-byte string literal not displayed */ // when `false`, disables the agent Enabled *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=enabled,proto3" json:"enabled,omitempty"` // javaagent has the configs specific to javaagent Javaagent *JavaAgent `protobuf:"bytes,6,opt,name=javaagent,proto3" json:"javaagent,omitempty"` // resource_attributes map define the static list of resources which is configured on the tracer ResourceAttributes map[string]string `` /* 203-byte string literal not displayed */ // contains filtered or unexported fields }
AgentConfig covers the config for agents. The config uses wrappers for primitive types to allow nullable values. The nullable values are used for instance to explicitly disable data capture or secure connection. Since the wrappers change structure of the objects the marshalling and unmarshalling have to be done via protobuf marshallers.
func Load ¶
func Load() *AgentConfig
Load loads the configuration from the default values, config file and env vars.
func LoadFromFile ¶
func LoadFromFile(configFile string) *AgentConfig
LoadFromFile loads the configuration from the default values, config file and env vars.
func (*AgentConfig) Descriptor
deprecated
func (*AgentConfig) Descriptor() ([]byte, []int)
Deprecated: Use AgentConfig.ProtoReflect.Descriptor instead.
func (*AgentConfig) GetDataCapture ¶
func (x *AgentConfig) GetDataCapture() *DataCapture
func (*AgentConfig) GetEnabled ¶
func (x *AgentConfig) GetEnabled() *wrapperspb.BoolValue
func (*AgentConfig) GetJavaagent ¶
func (x *AgentConfig) GetJavaagent() *JavaAgent
func (*AgentConfig) GetPropagationFormats ¶
func (x *AgentConfig) GetPropagationFormats() []PropagationFormat
func (*AgentConfig) GetReporting ¶
func (x *AgentConfig) GetReporting() *Reporting
func (*AgentConfig) GetResourceAttributes ¶
func (x *AgentConfig) GetResourceAttributes() map[string]string
func (*AgentConfig) GetServiceName ¶
func (x *AgentConfig) GetServiceName() *wrapperspb.StringValue
func (*AgentConfig) LoadFromEnv ¶
func (x *AgentConfig) LoadFromEnv()
LoadFromEnv loads env and default values on existing AgentConfig instance where defaults only overrides empty values while env vars can override all of them.
func (*AgentConfig) ProtoMessage ¶
func (*AgentConfig) ProtoMessage()
func (*AgentConfig) ProtoReflect ¶
func (x *AgentConfig) ProtoReflect() protoreflect.Message
func (*AgentConfig) PutResourceAttributes ¶
func (x *AgentConfig) PutResourceAttributes(m map[string]string)
PutResourceAttributes sets values in the ResourceAttributes map.
func (*AgentConfig) Reset ¶
func (x *AgentConfig) Reset()
func (*AgentConfig) String ¶
func (x *AgentConfig) String() string
type DataCapture ¶
type DataCapture struct { // http_headers enables/disables the capture of the request/response headers in HTTP HttpHeaders *Message `protobuf:"bytes,1,opt,name=http_headers,json=httpHeaders,proto3" json:"http_headers,omitempty"` // http_body enables/disables the capture of the request/response body in HTTP HttpBody *Message `protobuf:"bytes,2,opt,name=http_body,json=httpBody,proto3" json:"http_body,omitempty"` // rpc_metadata enables/disables the capture of the request/response metadata in RPC RpcMetadata *Message `protobuf:"bytes,3,opt,name=rpc_metadata,json=rpcMetadata,proto3" json:"rpc_metadata,omitempty"` // rpc_body enables/disables the capture of the request/response body in RPC RpcBody *Message `protobuf:"bytes,4,opt,name=rpc_body,json=rpcBody,proto3" json:"rpc_body,omitempty"` // maximum size of captured body in bytes. Default should be 131_072 (128 KiB). BodyMaxSizeBytes *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=body_max_size_bytes,json=bodyMaxSizeBytes,proto3" json:"body_max_size_bytes,omitempty"` // contains filtered or unexported fields }
DataCapture describes the elements to be captured by the agent instrumentation
func (*DataCapture) Descriptor
deprecated
func (*DataCapture) Descriptor() ([]byte, []int)
Deprecated: Use DataCapture.ProtoReflect.Descriptor instead.
func (*DataCapture) GetBodyMaxSizeBytes ¶
func (x *DataCapture) GetBodyMaxSizeBytes() *wrapperspb.Int32Value
func (*DataCapture) GetHttpBody ¶
func (x *DataCapture) GetHttpBody() *Message
func (*DataCapture) GetHttpHeaders ¶
func (x *DataCapture) GetHttpHeaders() *Message
func (*DataCapture) GetRpcBody ¶
func (x *DataCapture) GetRpcBody() *Message
func (*DataCapture) GetRpcMetadata ¶
func (x *DataCapture) GetRpcMetadata() *Message
func (*DataCapture) ProtoMessage ¶
func (*DataCapture) ProtoMessage()
func (*DataCapture) ProtoReflect ¶
func (x *DataCapture) ProtoReflect() protoreflect.Message
func (*DataCapture) Reset ¶
func (x *DataCapture) Reset()
func (*DataCapture) String ¶
func (x *DataCapture) String() string
type JavaAgent ¶
type JavaAgent struct { // filter_jar_paths is the list of path to filter jars, separated by `,` FilterJarPaths []*wrapperspb.StringValue `protobuf:"bytes,1,rep,name=filter_jar_paths,json=filterJarPaths,proto3" json:"filter_jar_paths,omitempty"` // contains filtered or unexported fields }
JavaAgent has the configs specific to javaagent
func (*JavaAgent) Descriptor
deprecated
func (*JavaAgent) GetFilterJarPaths ¶
func (x *JavaAgent) GetFilterJarPaths() []*wrapperspb.StringValue
func (*JavaAgent) ProtoMessage ¶
func (*JavaAgent) ProtoMessage()
func (*JavaAgent) ProtoReflect ¶
func (x *JavaAgent) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct { // when `false` it disables the capture for the request in a client/request operation Request *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // when `false` it disables the capture for the response in a client/request operation Response *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
Message describes what message should be considered for certain DataCapture option
func (*Message) Descriptor
deprecated
func (*Message) GetRequest ¶
func (x *Message) GetRequest() *wrapperspb.BoolValue
func (*Message) GetResponse ¶
func (x *Message) GetResponse() *wrapperspb.BoolValue
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Opa ¶
type Opa struct { // endpoint represents the endpoint for polling OPA config file e.g. http://opa.traceableai:8181/ Endpoint *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // poll period in seconds to query OPA service PollPeriodSeconds *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=poll_period_seconds,json=pollPeriodSeconds,proto3" json:"poll_period_seconds,omitempty"` // when `true` Open Policy Agent evaluation is enabled to block request Enabled *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=enabled,proto3" json:"enabled,omitempty"` // contains filtered or unexported fields }
Opa covers the options related to the mechanics for getting Open Policy Agent configuration file. The client should use secure and token option from reporting settings.
func (*Opa) Descriptor
deprecated
func (*Opa) GetEnabled ¶
func (x *Opa) GetEnabled() *wrapperspb.BoolValue
func (*Opa) GetEndpoint ¶
func (x *Opa) GetEndpoint() *wrapperspb.StringValue
func (*Opa) GetPollPeriodSeconds ¶
func (x *Opa) GetPollPeriodSeconds() *wrapperspb.Int32Value
func (*Opa) ProtoMessage ¶
func (*Opa) ProtoMessage()
func (*Opa) ProtoReflect ¶
func (x *Opa) ProtoReflect() protoreflect.Message
type PropagationFormat ¶
type PropagationFormat int32
PropagationFormat represents the propagation formats supported by agents
const ( // B3 propagation format, agents should support both multi and single value formats // see https://github.com/openzipkin/b3-propagation PropagationFormat_B3 PropagationFormat = 0 // W3C Propagation format // see https://www.w3.org/TR/trace-context/ PropagationFormat_TRACECONTEXT PropagationFormat = 1 )
func (PropagationFormat) Descriptor ¶
func (PropagationFormat) Descriptor() protoreflect.EnumDescriptor
func (PropagationFormat) Enum ¶
func (x PropagationFormat) Enum() *PropagationFormat
func (PropagationFormat) EnumDescriptor
deprecated
func (PropagationFormat) EnumDescriptor() ([]byte, []int)
Deprecated: Use PropagationFormat.Descriptor instead.
func (PropagationFormat) Number ¶
func (x PropagationFormat) Number() protoreflect.EnumNumber
func (PropagationFormat) String ¶
func (x PropagationFormat) String() string
func (PropagationFormat) Type ¶
func (PropagationFormat) Type() protoreflect.EnumType
type Reporting ¶
type Reporting struct { // endpoint represents the endpoint for reporting the traces // For ZIPKIN reporter type use http://api.traceable.ai:9411/api/v2/spans // For OTLP reporter type use http://api.traceable.ai:4317 Endpoint *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // when `true`, connects to endpoints over TLS. Secure *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=secure,proto3" json:"secure,omitempty"` // user specific token to access Traceable API Token *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` // opa describes the setting related to the Open Policy Agent Opa *Opa `protobuf:"bytes,4,opt,name=opa,proto3" json:"opa,omitempty"` // reporter type for traces. TraceReporterType TraceReporterType `` /* 166-byte string literal not displayed */ // contains filtered or unexported fields }
Reporting covers the options related to the mechanics for sending data to the tracing server o collector.
func (*Reporting) Descriptor
deprecated
func (*Reporting) GetEndpoint ¶
func (x *Reporting) GetEndpoint() *wrapperspb.StringValue
func (*Reporting) GetSecure ¶
func (x *Reporting) GetSecure() *wrapperspb.BoolValue
func (*Reporting) GetToken ¶
func (x *Reporting) GetToken() *wrapperspb.StringValue
func (*Reporting) GetTraceReporterType ¶
func (x *Reporting) GetTraceReporterType() TraceReporterType
func (*Reporting) ProtoMessage ¶
func (*Reporting) ProtoMessage()
func (*Reporting) ProtoReflect ¶
func (x *Reporting) ProtoReflect() protoreflect.Message
type TraceReporterType ¶
type TraceReporterType int32
TraceReporterType represents the reporting format for trace data.
const ( // Default to none. Agent will use it's default reporting type TraceReporterType_UNSPECIFIED TraceReporterType = 0 // Zipkin protobuf reporting format. // see https://github.com/openzipkin/zipkin-api TraceReporterType_ZIPKIN TraceReporterType = 1 // OpenTelemetry protobuf reporting format. // see https://github.com/open-telemetry/opentelemetry-proto TraceReporterType_OTLP TraceReporterType = 2 )
func (TraceReporterType) Descriptor ¶
func (TraceReporterType) Descriptor() protoreflect.EnumDescriptor
func (TraceReporterType) Enum ¶
func (x TraceReporterType) Enum() *TraceReporterType
func (TraceReporterType) EnumDescriptor
deprecated
func (TraceReporterType) EnumDescriptor() ([]byte, []int)
Deprecated: Use TraceReporterType.Descriptor instead.
func (TraceReporterType) Number ¶
func (x TraceReporterType) Number() protoreflect.EnumNumber
func (TraceReporterType) String ¶
func (x TraceReporterType) String() string
func (TraceReporterType) Type ¶
func (TraceReporterType) Type() protoreflect.EnumType