diff --git a/ENV_VARS.md b/ENV_VARS.md index 63f12c9..915787d 100644 --- a/ENV_VARS.md +++ b/ENV_VARS.md @@ -30,4 +30,5 @@ Agents can be configured using environment variables: | HT_JAVAAGENT_FILTER_JAR_PATHS | Is the list of path to filter jars, separated by `,`. The values should be separated by `,`. | | HT_TELEMETRY_STARTUP_SPAN_ENABLED | When `true`, an internal span is created and exported when the agent is initialized and started. It's useful to denote when the application the agent is in started. | | HT_TELEMETRY_METRICS_ENABLED | Whether to capture metrics or not. The metrics will be otel go metrics. See https://github.com/open-telemetry/opentelemetry-go/tree/main/metric | +| HT_TELEMETRY_LOGS_ENABLED | When true, logs from the agent will be exported to Traceable Platform Agent via Opentelemetry Logs pipeline. Reporting config is shared with the Traces pipeline. | | HT_GOAGENT_USE_CUSTOM_BSP | Use the custom batch_span_processor adapted from the one in opentelemetry go and supports some additional metrics | diff --git a/gen/go/go.mod b/gen/go/go.mod index 3063567..06e7fc7 100644 --- a/gen/go/go.mod +++ b/gen/go/go.mod @@ -1,11 +1,11 @@ module github.com/hypertrace/agent-config/gen/go -go 1.23.2 +go 1.24.4 require ( github.com/ghodss/yaml v1.0.0 - github.com/stretchr/testify v1.9.0 - google.golang.org/protobuf v1.35.1 + github.com/stretchr/testify v1.10.0 + google.golang.org/protobuf v1.36.7 ) require ( diff --git a/gen/go/go.sum b/gen/go/go.sum index 6b29beb..cd5fefc 100644 --- a/gen/go/go.sum +++ b/gen/go/go.sum @@ -6,12 +6,12 @@ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/gen/go/proto/v1/config.proto b/gen/go/proto/v1/config.proto index 95f3ab9..cebc39f 100644 --- a/gen/go/proto/v1/config.proto +++ b/gen/go/proto/v1/config.proto @@ -196,4 +196,27 @@ message Telemetry { // Whether to capture metrics or not. The metrics will be otel go metrics. // See https://github.com/open-telemetry/opentelemetry-go/tree/main/metric google.protobuf.BoolValue metrics_enabled = 2; + + // Configure logs export. + LogsExport logs = 3; +} + +enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0; + LOG_LEVEL_TRACE = 1; + LOG_LEVEL_DEBUG = 2; + LOG_LEVEL_INFO = 3; + LOG_LEVEL_WARN = 4; + LOG_LEVEL_ERROR = 5; } + +message LogsExport { + // when true, logs from the agent will be exported to Traceable Platform Agent + // via Opentelemetry Logs pipeline. Reporting config is shared with the Traces pipeline. + google.protobuf.BoolValue enabled = 1; + + // the level of logs to export, anything below that level will not be exported, + // it'll only be available in the local log file. + + LogLevel level = 2; +} \ No newline at end of file diff --git a/gen/go/v1/config.pb.go b/gen/go/v1/config.pb.go index 8fab5d5..c0e3c9d 100644 --- a/gen/go/v1/config.pb.go +++ b/gen/go/v1/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.6 // protoc (unknown) // source: hypertrace/agent/config/v1/config.proto @@ -12,6 +12,7 @@ import ( wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -202,16 +203,71 @@ func (MetricReporterType) EnumDescriptor() ([]byte, []int) { return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{2} } +type LogLevel int32 + +const ( + LogLevel_LOG_LEVEL_UNSPECIFIED LogLevel = 0 + LogLevel_LOG_LEVEL_TRACE LogLevel = 1 + LogLevel_LOG_LEVEL_DEBUG LogLevel = 2 + LogLevel_LOG_LEVEL_INFO LogLevel = 3 + LogLevel_LOG_LEVEL_WARN LogLevel = 4 + LogLevel_LOG_LEVEL_ERROR LogLevel = 5 +) + +// Enum value maps for LogLevel. +var ( + LogLevel_name = map[int32]string{ + 0: "LOG_LEVEL_UNSPECIFIED", + 1: "LOG_LEVEL_TRACE", + 2: "LOG_LEVEL_DEBUG", + 3: "LOG_LEVEL_INFO", + 4: "LOG_LEVEL_WARN", + 5: "LOG_LEVEL_ERROR", + } + LogLevel_value = map[string]int32{ + "LOG_LEVEL_UNSPECIFIED": 0, + "LOG_LEVEL_TRACE": 1, + "LOG_LEVEL_DEBUG": 2, + "LOG_LEVEL_INFO": 3, + "LOG_LEVEL_WARN": 4, + "LOG_LEVEL_ERROR": 5, + } +) + +func (x LogLevel) Enum() *LogLevel { + p := new(LogLevel) + *p = x + return p +} + +func (x LogLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LogLevel) Descriptor() protoreflect.EnumDescriptor { + return file_hypertrace_agent_config_v1_config_proto_enumTypes[3].Descriptor() +} + +func (LogLevel) Type() protoreflect.EnumType { + return &file_hypertrace_agent_config_v1_config_proto_enumTypes[3] +} + +func (x LogLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LogLevel.Descriptor instead. +func (LogLevel) EnumDescriptor() ([]byte, []int) { + return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{3} +} + // 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. type AgentConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // 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 @@ -225,20 +281,20 @@ type AgentConfig struct { // 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 `protobuf:"bytes,7,rep,name=resource_attributes,json=resourceAttributes,proto3" json:"resource_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ResourceAttributes map[string]string `protobuf:"bytes,7,rep,name=resource_attributes,json=resourceAttributes,proto3" json:"resource_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // telemetry Telemetry *Telemetry `protobuf:"bytes,8,opt,name=telemetry,proto3" json:"telemetry,omitempty"` // Goagent specific config - Goagent *GoAgent `protobuf:"bytes,9,opt,name=goagent,proto3" json:"goagent,omitempty"` + Goagent *GoAgent `protobuf:"bytes,9,opt,name=goagent,proto3" json:"goagent,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AgentConfig) Reset() { *x = AgentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentConfig) String() string { @@ -249,7 +305,7 @@ func (*AgentConfig) ProtoMessage() {} func (x *AgentConfig) ProtoReflect() protoreflect.Message { mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,10 +386,7 @@ func (x *AgentConfig) GetGoagent() *GoAgent { // Reporting covers the options related to the mechanics for sending data to the // tracing server o collector. type Reporting struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // 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 @@ -355,15 +408,15 @@ type Reporting struct { MetricReporterType MetricReporterType `protobuf:"varint,8,opt,name=metric_reporter_type,json=metricReporterType,proto3,enum=hypertrace.agent.config.v1.MetricReporterType" json:"metric_reporter_type,omitempty"` // When `true`, modifies grpc resolver to use dns instead of passthrough and configure round robin client side loadbalancing EnableGrpcLoadbalancing *wrapperspb.BoolValue `protobuf:"bytes,9,opt,name=enable_grpc_loadbalancing,json=enableGrpcLoadbalancing,proto3" json:"enable_grpc_loadbalancing,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Reporting) Reset() { *x = Reporting{} - if protoimpl.UnsafeEnabled { - mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reporting) String() string { @@ -374,7 +427,7 @@ func (*Reporting) ProtoMessage() {} func (x *Reporting) ProtoReflect() protoreflect.Message { mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,23 +500,20 @@ func (x *Reporting) GetEnableGrpcLoadbalancing() *wrapperspb.BoolValue { // Message describes what message should be considered for certain DataCapture option type Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // 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"` + Response *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -474,7 +524,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,10 +555,7 @@ func (x *Message) GetResponse() *wrapperspb.BoolValue { // DataCapture describes the elements to be captured by the agent instrumentation type DataCapture struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // 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 @@ -532,15 +579,15 @@ type DataCapture struct { // default should be json, x-www-form-urlencoded // ex: ["json"] will record any request bodies that have a content-type header that includes "json" AllowedContentTypes []*wrapperspb.StringValue `protobuf:"bytes,10,rep,name=allowed_content_types,json=allowedContentTypes,proto3" json:"allowed_content_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DataCapture) Reset() { *x = DataCapture{} - if protoimpl.UnsafeEnabled { - mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataCapture) String() string { @@ -551,7 +598,7 @@ func (*DataCapture) ProtoMessage() {} func (x *DataCapture) ProtoReflect() protoreflect.Message { mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,21 +664,18 @@ func (x *DataCapture) GetAllowedContentTypes() []*wrapperspb.StringValue { // JavaAgent has the configs specific to javaagent type JavaAgent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // 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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *JavaAgent) Reset() { *x = JavaAgent{} - if protoimpl.UnsafeEnabled { - mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JavaAgent) String() string { @@ -642,7 +686,7 @@ func (*JavaAgent) ProtoMessage() {} func (x *JavaAgent) ProtoReflect() protoreflect.Message { mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -666,22 +710,19 @@ func (x *JavaAgent) GetFilterJarPaths() []*wrapperspb.StringValue { // GoAgent has the configs specific to goagent type GoAgent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // use the custom batch_span_processor adapted from the one in opentelemetry go // and supports some additional metrics - UseCustomBsp *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=use_custom_bsp,json=useCustomBsp,proto3" json:"use_custom_bsp,omitempty"` + UseCustomBsp *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=use_custom_bsp,json=useCustomBsp,proto3" json:"use_custom_bsp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GoAgent) Reset() { *x = GoAgent{} - if protoimpl.UnsafeEnabled { - mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoAgent) String() string { @@ -692,7 +733,7 @@ func (*GoAgent) ProtoMessage() {} func (x *GoAgent) ProtoReflect() protoreflect.Message { mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -717,25 +758,24 @@ func (x *GoAgent) GetUseCustomBsp() *wrapperspb.BoolValue { // Telemetry has config for agent telemetry: traces and metrics on agent's // performance and events. type Telemetry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // when `true`, an internal span is created and exported when the agent is initialized and started. // It's useful to denote when the application the agent is in started. StartupSpanEnabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=startup_span_enabled,json=startupSpanEnabled,proto3" json:"startup_span_enabled,omitempty"` // Whether to capture metrics or not. The metrics will be otel go metrics. // See https://github.com/open-telemetry/opentelemetry-go/tree/main/metric MetricsEnabled *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=metrics_enabled,json=metricsEnabled,proto3" json:"metrics_enabled,omitempty"` + // Configure logs export. + Logs *LogsExport `protobuf:"bytes,3,opt,name=logs,proto3" json:"logs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Telemetry) Reset() { *x = Telemetry{} - if protoimpl.UnsafeEnabled { - mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Telemetry) String() string { @@ -746,7 +786,7 @@ func (*Telemetry) ProtoMessage() {} func (x *Telemetry) ProtoReflect() protoreflect.Message { mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -775,258 +815,215 @@ func (x *Telemetry) GetMetricsEnabled() *wrapperspb.BoolValue { return nil } -var File_hypertrace_agent_config_v1_config_proto protoreflect.FileDescriptor +func (x *Telemetry) GetLogs() *LogsExport { + if x != nil { + return x.Logs + } + return nil +} + +type LogsExport struct { + state protoimpl.MessageState `protogen:"open.v1"` + // when true, logs from the agent will be exported to Traceable Platform Agent + // via Opentelemetry Logs pipeline. Reporting config is shared with the Traces pipeline. + Enabled *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=hypertrace.agent.config.v1.LogLevel" json:"level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LogsExport) Reset() { + *x = LogsExport{} + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogsExport) String() string { + return protoimpl.X.MessageStringOf(x) +} -var file_hypertrace_agent_config_v1_config_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x68, 0x79, 0x70, 0x65, 0x72, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x05, 0x0a, 0x0b, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x79, 0x70, 0x65, - 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x52, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, - 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x70, 0x61, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x43, 0x0a, - 0x09, 0x6a, 0x61, 0x76, 0x61, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x61, - 0x76, 0x61, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x6a, 0x61, 0x76, 0x61, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x12, 0x70, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, - 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x09, - 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x07, 0x67, 0x6f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x79, 0x70, - 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, - 0x07, 0x67, 0x6f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x1a, 0x45, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xc8, 0x04, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, - 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x5d, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x68, - 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, - 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x08, 0x63, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x60, 0x0a, 0x14, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, - 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x56, 0x0a, 0x19, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x4c, 0x6f, 0x61, - 0x64, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x22, 0x77, 0x0a, 0x07, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x9e, 0x04, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x70, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x46, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x79, 0x70, 0x65, - 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, - 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x46, 0x0a, - 0x0c, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x72, 0x70, - 0x63, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x4a, 0x0a, 0x13, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, - 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x10, 0x62, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x12, 0x5f, 0x0a, 0x1e, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x62, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x78, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x50, 0x0a, 0x15, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x09, 0x4a, 0x61, 0x76, 0x61, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x12, 0x46, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6a, 0x61, 0x72, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x4a, 0x61, 0x72, 0x50, 0x61, 0x74, 0x68, 0x73, 0x22, 0x4b, 0x0a, 0x07, 0x47, 0x6f, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x5f, 0x62, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x42, 0x73, 0x70, 0x22, 0x9e, 0x01, 0x0a, 0x09, 0x54, 0x65, 0x6c, 0x65, 0x6d, - 0x65, 0x74, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x5f, - 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x53, 0x70, 0x61, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2a, 0x2d, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x61, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x06, 0x0a, 0x02, - 0x42, 0x33, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x52, 0x41, 0x43, 0x45, 0x43, 0x4f, 0x4e, - 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x2a, 0x60, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x5a, 0x49, 0x50, 0x4b, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x54, 0x4c, 0x50, - 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x47, 0x47, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, - 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x54, 0x4c, - 0x50, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x10, 0x05, 0x2a, 0xbf, 0x01, 0x0a, 0x12, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x24, 0x0a, 0x20, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, - 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, - 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x54, - 0x4c, 0x50, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x52, - 0x45, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, - 0x4d, 0x45, 0x54, 0x48, 0x45, 0x55, 0x53, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x4d, 0x45, 0x54, - 0x52, 0x49, 0x43, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4c, 0x4f, 0x47, 0x47, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x4d, - 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x52, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x04, 0x42, 0x6b, 0x0a, 0x1e, 0x6f, 0x72, - 0x67, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x5a, 0x2c, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x79, 0x70, 0x65, 0x72, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x1a, 0x48, 0x79, 0x70, - 0x65, 0x72, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (*LogsExport) ProtoMessage() {} + +func (x *LogsExport) ProtoReflect() protoreflect.Message { + mi := &file_hypertrace_agent_config_v1_config_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogsExport.ProtoReflect.Descriptor instead. +func (*LogsExport) Descriptor() ([]byte, []int) { + return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{7} +} + +func (x *LogsExport) GetEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.Enabled + } + return nil +} + +func (x *LogsExport) GetLevel() LogLevel { + if x != nil { + return x.Level + } + return LogLevel_LOG_LEVEL_UNSPECIFIED } +var File_hypertrace_agent_config_v1_config_proto protoreflect.FileDescriptor + +const file_hypertrace_agent_config_v1_config_proto_rawDesc = "" + + "\n" + + "'hypertrace/agent/config/v1/config.proto\x12\x1ahypertrace.agent.config.v1\x1a\x1egoogle/protobuf/wrappers.proto\"\xf7\x05\n" + + "\vAgentConfig\x12?\n" + + "\fservice_name\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\vserviceName\x12C\n" + + "\treporting\x18\x02 \x01(\v2%.hypertrace.agent.config.v1.ReportingR\treporting\x12J\n" + + "\fdata_capture\x18\x03 \x01(\v2'.hypertrace.agent.config.v1.DataCaptureR\vdataCapture\x12^\n" + + "\x13propagation_formats\x18\x04 \x03(\x0e2-.hypertrace.agent.config.v1.PropagationFormatR\x12propagationFormats\x124\n" + + "\aenabled\x18\x05 \x01(\v2\x1a.google.protobuf.BoolValueR\aenabled\x12C\n" + + "\tjavaagent\x18\x06 \x01(\v2%.hypertrace.agent.config.v1.JavaAgentR\tjavaagent\x12p\n" + + "\x13resource_attributes\x18\a \x03(\v2?.hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntryR\x12resourceAttributes\x12C\n" + + "\ttelemetry\x18\b \x01(\v2%.hypertrace.agent.config.v1.TelemetryR\ttelemetry\x12=\n" + + "\agoagent\x18\t \x01(\v2#.hypertrace.agent.config.v1.GoAgentR\agoagent\x1aE\n" + + "\x17ResourceAttributesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xc8\x04\n" + + "\tReporting\x128\n" + + "\bendpoint\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\bendpoint\x122\n" + + "\x06secure\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x06secure\x122\n" + + "\x05token\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\x05token\x12]\n" + + "\x13trace_reporter_type\x18\x05 \x01(\x0e2-.hypertrace.agent.config.v1.TraceReporterTypeR\x11traceReporterType\x129\n" + + "\tcert_file\x18\x06 \x01(\v2\x1c.google.protobuf.StringValueR\bcertFile\x12E\n" + + "\x0fmetric_endpoint\x18\a \x01(\v2\x1c.google.protobuf.StringValueR\x0emetricEndpoint\x12`\n" + + "\x14metric_reporter_type\x18\b \x01(\x0e2..hypertrace.agent.config.v1.MetricReporterTypeR\x12metricReporterType\x12V\n" + + "\x19enable_grpc_loadbalancing\x18\t \x01(\v2\x1a.google.protobuf.BoolValueR\x17enableGrpcLoadbalancing\"w\n" + + "\aMessage\x124\n" + + "\arequest\x18\x01 \x01(\v2\x1a.google.protobuf.BoolValueR\arequest\x126\n" + + "\bresponse\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\bresponse\"\x9e\x04\n" + + "\vDataCapture\x12F\n" + + "\fhttp_headers\x18\x01 \x01(\v2#.hypertrace.agent.config.v1.MessageR\vhttpHeaders\x12@\n" + + "\thttp_body\x18\x02 \x01(\v2#.hypertrace.agent.config.v1.MessageR\bhttpBody\x12F\n" + + "\frpc_metadata\x18\x03 \x01(\v2#.hypertrace.agent.config.v1.MessageR\vrpcMetadata\x12>\n" + + "\brpc_body\x18\x04 \x01(\v2#.hypertrace.agent.config.v1.MessageR\arpcBody\x12J\n" + + "\x13body_max_size_bytes\x18\x05 \x01(\v2\x1b.google.protobuf.Int32ValueR\x10bodyMaxSizeBytes\x12_\n" + + "\x1ebody_max_processing_size_bytes\x18\x06 \x01(\v2\x1b.google.protobuf.Int32ValueR\x1abodyMaxProcessingSizeBytes\x12P\n" + + "\x15allowed_content_types\x18\n" + + " \x03(\v2\x1c.google.protobuf.StringValueR\x13allowedContentTypes\"S\n" + + "\tJavaAgent\x12F\n" + + "\x10filter_jar_paths\x18\x01 \x03(\v2\x1c.google.protobuf.StringValueR\x0efilterJarPaths\"K\n" + + "\aGoAgent\x12@\n" + + "\x0euse_custom_bsp\x18\x01 \x01(\v2\x1a.google.protobuf.BoolValueR\fuseCustomBsp\"\xda\x01\n" + + "\tTelemetry\x12L\n" + + "\x14startup_span_enabled\x18\x01 \x01(\v2\x1a.google.protobuf.BoolValueR\x12startupSpanEnabled\x12C\n" + + "\x0fmetrics_enabled\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x0emetricsEnabled\x12:\n" + + "\x04logs\x18\x03 \x01(\v2&.hypertrace.agent.config.v1.LogsExportR\x04logs\"~\n" + + "\n" + + "LogsExport\x124\n" + + "\aenabled\x18\x01 \x01(\v2\x1a.google.protobuf.BoolValueR\aenabled\x12:\n" + + "\x05level\x18\x02 \x01(\x0e2$.hypertrace.agent.config.v1.LogLevelR\x05level*-\n" + + "\x11PropagationFormat\x12\x06\n" + + "\x02B3\x10\x00\x12\x10\n" + + "\fTRACECONTEXT\x10\x01*`\n" + + "\x11TraceReporterType\x12\x0f\n" + + "\vUNSPECIFIED\x10\x00\x12\n" + + "\n" + + "\x06ZIPKIN\x10\x01\x12\b\n" + + "\x04OTLP\x10\x02\x12\v\n" + + "\aLOGGING\x10\x03\x12\b\n" + + "\x04NONE\x10\x04\x12\r\n" + + "\tOTLP_HTTP\x10\x05*\xbf\x01\n" + + "\x12MetricReporterType\x12$\n" + + " METRIC_REPORTER_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n" + + "\x19METRIC_REPORTER_TYPE_OTLP\x10\x01\x12#\n" + + "\x1fMETRIC_REPORTER_TYPE_PROMETHEUS\x10\x02\x12 \n" + + "\x1cMETRIC_REPORTER_TYPE_LOGGING\x10\x03\x12\x1d\n" + + "\x19METRIC_REPORTER_TYPE_NONE\x10\x04*\x8c\x01\n" + + "\bLogLevel\x12\x19\n" + + "\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x13\n" + + "\x0fLOG_LEVEL_TRACE\x10\x01\x12\x13\n" + + "\x0fLOG_LEVEL_DEBUG\x10\x02\x12\x12\n" + + "\x0eLOG_LEVEL_INFO\x10\x03\x12\x12\n" + + "\x0eLOG_LEVEL_WARN\x10\x04\x12\x13\n" + + "\x0fLOG_LEVEL_ERROR\x10\x05Bk\n" + + "\x1eorg.hypertrace.agent.config.v1Z,github.com/hypertrace/agent-config/gen/go/v1\xaa\x02\x1aHypertrace.Agent.Config.V1b\x06proto3" + var ( file_hypertrace_agent_config_v1_config_proto_rawDescOnce sync.Once - file_hypertrace_agent_config_v1_config_proto_rawDescData = file_hypertrace_agent_config_v1_config_proto_rawDesc + file_hypertrace_agent_config_v1_config_proto_rawDescData []byte ) func file_hypertrace_agent_config_v1_config_proto_rawDescGZIP() []byte { file_hypertrace_agent_config_v1_config_proto_rawDescOnce.Do(func() { - file_hypertrace_agent_config_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_hypertrace_agent_config_v1_config_proto_rawDescData) + file_hypertrace_agent_config_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_hypertrace_agent_config_v1_config_proto_rawDesc), len(file_hypertrace_agent_config_v1_config_proto_rawDesc))) }) return file_hypertrace_agent_config_v1_config_proto_rawDescData } -var file_hypertrace_agent_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_hypertrace_agent_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_hypertrace_agent_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_hypertrace_agent_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_hypertrace_agent_config_v1_config_proto_goTypes = []any{ (PropagationFormat)(0), // 0: hypertrace.agent.config.v1.PropagationFormat (TraceReporterType)(0), // 1: hypertrace.agent.config.v1.TraceReporterType (MetricReporterType)(0), // 2: hypertrace.agent.config.v1.MetricReporterType - (*AgentConfig)(nil), // 3: hypertrace.agent.config.v1.AgentConfig - (*Reporting)(nil), // 4: hypertrace.agent.config.v1.Reporting - (*Message)(nil), // 5: hypertrace.agent.config.v1.Message - (*DataCapture)(nil), // 6: hypertrace.agent.config.v1.DataCapture - (*JavaAgent)(nil), // 7: hypertrace.agent.config.v1.JavaAgent - (*GoAgent)(nil), // 8: hypertrace.agent.config.v1.GoAgent - (*Telemetry)(nil), // 9: hypertrace.agent.config.v1.Telemetry - nil, // 10: hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry - (*wrapperspb.StringValue)(nil), // 11: google.protobuf.StringValue - (*wrapperspb.BoolValue)(nil), // 12: google.protobuf.BoolValue - (*wrapperspb.Int32Value)(nil), // 13: google.protobuf.Int32Value + (LogLevel)(0), // 3: hypertrace.agent.config.v1.LogLevel + (*AgentConfig)(nil), // 4: hypertrace.agent.config.v1.AgentConfig + (*Reporting)(nil), // 5: hypertrace.agent.config.v1.Reporting + (*Message)(nil), // 6: hypertrace.agent.config.v1.Message + (*DataCapture)(nil), // 7: hypertrace.agent.config.v1.DataCapture + (*JavaAgent)(nil), // 8: hypertrace.agent.config.v1.JavaAgent + (*GoAgent)(nil), // 9: hypertrace.agent.config.v1.GoAgent + (*Telemetry)(nil), // 10: hypertrace.agent.config.v1.Telemetry + (*LogsExport)(nil), // 11: hypertrace.agent.config.v1.LogsExport + nil, // 12: hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry + (*wrapperspb.StringValue)(nil), // 13: google.protobuf.StringValue + (*wrapperspb.BoolValue)(nil), // 14: google.protobuf.BoolValue + (*wrapperspb.Int32Value)(nil), // 15: google.protobuf.Int32Value } var file_hypertrace_agent_config_v1_config_proto_depIdxs = []int32{ - 11, // 0: hypertrace.agent.config.v1.AgentConfig.service_name:type_name -> google.protobuf.StringValue - 4, // 1: hypertrace.agent.config.v1.AgentConfig.reporting:type_name -> hypertrace.agent.config.v1.Reporting - 6, // 2: hypertrace.agent.config.v1.AgentConfig.data_capture:type_name -> hypertrace.agent.config.v1.DataCapture + 13, // 0: hypertrace.agent.config.v1.AgentConfig.service_name:type_name -> google.protobuf.StringValue + 5, // 1: hypertrace.agent.config.v1.AgentConfig.reporting:type_name -> hypertrace.agent.config.v1.Reporting + 7, // 2: hypertrace.agent.config.v1.AgentConfig.data_capture:type_name -> hypertrace.agent.config.v1.DataCapture 0, // 3: hypertrace.agent.config.v1.AgentConfig.propagation_formats:type_name -> hypertrace.agent.config.v1.PropagationFormat - 12, // 4: hypertrace.agent.config.v1.AgentConfig.enabled:type_name -> google.protobuf.BoolValue - 7, // 5: hypertrace.agent.config.v1.AgentConfig.javaagent:type_name -> hypertrace.agent.config.v1.JavaAgent - 10, // 6: hypertrace.agent.config.v1.AgentConfig.resource_attributes:type_name -> hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry - 9, // 7: hypertrace.agent.config.v1.AgentConfig.telemetry:type_name -> hypertrace.agent.config.v1.Telemetry - 8, // 8: hypertrace.agent.config.v1.AgentConfig.goagent:type_name -> hypertrace.agent.config.v1.GoAgent - 11, // 9: hypertrace.agent.config.v1.Reporting.endpoint:type_name -> google.protobuf.StringValue - 12, // 10: hypertrace.agent.config.v1.Reporting.secure:type_name -> google.protobuf.BoolValue - 11, // 11: hypertrace.agent.config.v1.Reporting.token:type_name -> google.protobuf.StringValue + 14, // 4: hypertrace.agent.config.v1.AgentConfig.enabled:type_name -> google.protobuf.BoolValue + 8, // 5: hypertrace.agent.config.v1.AgentConfig.javaagent:type_name -> hypertrace.agent.config.v1.JavaAgent + 12, // 6: hypertrace.agent.config.v1.AgentConfig.resource_attributes:type_name -> hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry + 10, // 7: hypertrace.agent.config.v1.AgentConfig.telemetry:type_name -> hypertrace.agent.config.v1.Telemetry + 9, // 8: hypertrace.agent.config.v1.AgentConfig.goagent:type_name -> hypertrace.agent.config.v1.GoAgent + 13, // 9: hypertrace.agent.config.v1.Reporting.endpoint:type_name -> google.protobuf.StringValue + 14, // 10: hypertrace.agent.config.v1.Reporting.secure:type_name -> google.protobuf.BoolValue + 13, // 11: hypertrace.agent.config.v1.Reporting.token:type_name -> google.protobuf.StringValue 1, // 12: hypertrace.agent.config.v1.Reporting.trace_reporter_type:type_name -> hypertrace.agent.config.v1.TraceReporterType - 11, // 13: hypertrace.agent.config.v1.Reporting.cert_file:type_name -> google.protobuf.StringValue - 11, // 14: hypertrace.agent.config.v1.Reporting.metric_endpoint:type_name -> google.protobuf.StringValue + 13, // 13: hypertrace.agent.config.v1.Reporting.cert_file:type_name -> google.protobuf.StringValue + 13, // 14: hypertrace.agent.config.v1.Reporting.metric_endpoint:type_name -> google.protobuf.StringValue 2, // 15: hypertrace.agent.config.v1.Reporting.metric_reporter_type:type_name -> hypertrace.agent.config.v1.MetricReporterType - 12, // 16: hypertrace.agent.config.v1.Reporting.enable_grpc_loadbalancing:type_name -> google.protobuf.BoolValue - 12, // 17: hypertrace.agent.config.v1.Message.request:type_name -> google.protobuf.BoolValue - 12, // 18: hypertrace.agent.config.v1.Message.response:type_name -> google.protobuf.BoolValue - 5, // 19: hypertrace.agent.config.v1.DataCapture.http_headers:type_name -> hypertrace.agent.config.v1.Message - 5, // 20: hypertrace.agent.config.v1.DataCapture.http_body:type_name -> hypertrace.agent.config.v1.Message - 5, // 21: hypertrace.agent.config.v1.DataCapture.rpc_metadata:type_name -> hypertrace.agent.config.v1.Message - 5, // 22: hypertrace.agent.config.v1.DataCapture.rpc_body:type_name -> hypertrace.agent.config.v1.Message - 13, // 23: hypertrace.agent.config.v1.DataCapture.body_max_size_bytes:type_name -> google.protobuf.Int32Value - 13, // 24: hypertrace.agent.config.v1.DataCapture.body_max_processing_size_bytes:type_name -> google.protobuf.Int32Value - 11, // 25: hypertrace.agent.config.v1.DataCapture.allowed_content_types:type_name -> google.protobuf.StringValue - 11, // 26: hypertrace.agent.config.v1.JavaAgent.filter_jar_paths:type_name -> google.protobuf.StringValue - 12, // 27: hypertrace.agent.config.v1.GoAgent.use_custom_bsp:type_name -> google.protobuf.BoolValue - 12, // 28: hypertrace.agent.config.v1.Telemetry.startup_span_enabled:type_name -> google.protobuf.BoolValue - 12, // 29: hypertrace.agent.config.v1.Telemetry.metrics_enabled:type_name -> google.protobuf.BoolValue - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 14, // 16: hypertrace.agent.config.v1.Reporting.enable_grpc_loadbalancing:type_name -> google.protobuf.BoolValue + 14, // 17: hypertrace.agent.config.v1.Message.request:type_name -> google.protobuf.BoolValue + 14, // 18: hypertrace.agent.config.v1.Message.response:type_name -> google.protobuf.BoolValue + 6, // 19: hypertrace.agent.config.v1.DataCapture.http_headers:type_name -> hypertrace.agent.config.v1.Message + 6, // 20: hypertrace.agent.config.v1.DataCapture.http_body:type_name -> hypertrace.agent.config.v1.Message + 6, // 21: hypertrace.agent.config.v1.DataCapture.rpc_metadata:type_name -> hypertrace.agent.config.v1.Message + 6, // 22: hypertrace.agent.config.v1.DataCapture.rpc_body:type_name -> hypertrace.agent.config.v1.Message + 15, // 23: hypertrace.agent.config.v1.DataCapture.body_max_size_bytes:type_name -> google.protobuf.Int32Value + 15, // 24: hypertrace.agent.config.v1.DataCapture.body_max_processing_size_bytes:type_name -> google.protobuf.Int32Value + 13, // 25: hypertrace.agent.config.v1.DataCapture.allowed_content_types:type_name -> google.protobuf.StringValue + 13, // 26: hypertrace.agent.config.v1.JavaAgent.filter_jar_paths:type_name -> google.protobuf.StringValue + 14, // 27: hypertrace.agent.config.v1.GoAgent.use_custom_bsp:type_name -> google.protobuf.BoolValue + 14, // 28: hypertrace.agent.config.v1.Telemetry.startup_span_enabled:type_name -> google.protobuf.BoolValue + 14, // 29: hypertrace.agent.config.v1.Telemetry.metrics_enabled:type_name -> google.protobuf.BoolValue + 11, // 30: hypertrace.agent.config.v1.Telemetry.logs:type_name -> hypertrace.agent.config.v1.LogsExport + 14, // 31: hypertrace.agent.config.v1.LogsExport.enabled:type_name -> google.protobuf.BoolValue + 3, // 32: hypertrace.agent.config.v1.LogsExport.level:type_name -> hypertrace.agent.config.v1.LogLevel + 33, // [33:33] is the sub-list for method output_type + 33, // [33:33] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name } func init() { file_hypertrace_agent_config_v1_config_proto_init() } @@ -1034,99 +1031,13 @@ func file_hypertrace_agent_config_v1_config_proto_init() { if File_hypertrace_agent_config_v1_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_hypertrace_agent_config_v1_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AgentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hypertrace_agent_config_v1_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Reporting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hypertrace_agent_config_v1_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hypertrace_agent_config_v1_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataCapture); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hypertrace_agent_config_v1_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*JavaAgent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hypertrace_agent_config_v1_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GoAgent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hypertrace_agent_config_v1_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Telemetry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_hypertrace_agent_config_v1_config_proto_rawDesc, - NumEnums: 3, - NumMessages: 8, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_hypertrace_agent_config_v1_config_proto_rawDesc), len(file_hypertrace_agent_config_v1_config_proto_rawDesc)), + NumEnums: 4, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, @@ -1136,7 +1047,6 @@ func file_hypertrace_agent_config_v1_config_proto_init() { MessageInfos: file_hypertrace_agent_config_v1_config_proto_msgTypes, }.Build() File_hypertrace_agent_config_v1_config_proto = out.File - file_hypertrace_agent_config_v1_config_proto_rawDesc = nil file_hypertrace_agent_config_v1_config_proto_goTypes = nil file_hypertrace_agent_config_v1_config_proto_depIdxs = nil } diff --git a/gen/go/v1/config.pbloader.go b/gen/go/v1/config.pbloader.go index a7ce030..20fd150 100644 --- a/gen/go/v1/config.pbloader.go +++ b/gen/go/v1/config.pbloader.go @@ -303,4 +303,33 @@ func (x *Telemetry) loadFromEnv(prefix string, defaultValues *Telemetry) { x.MetricsEnabled = &wrappers.BoolValue{Value: defaultValues.MetricsEnabled.Value} } } + if x.Logs == nil { + x.Logs = new(LogsExport) + } + if defaultValues == nil { + x.Logs.loadFromEnv(prefix+"LOGS_", nil) + } else { + x.Logs.loadFromEnv(prefix+"LOGS_", defaultValues.Logs) + } + +} + +// loadFromEnv loads the data from env vars, defaults and makes sure all values are initialized. +func (x *LogsExport) loadFromEnv(prefix string, defaultValues *LogsExport) { + if val, ok := getBoolEnv(prefix + "ENABLED"); ok { + x.Enabled = &wrappers.BoolValue{Value: val} + } else if x.Enabled == nil { + // when there is no value to set we still prefer to initialize the variable to avoid + // `nil` checks in the consumers. + x.Enabled = new(wrappers.BoolValue) + if defaultValues != nil && defaultValues.Enabled != nil { + x.Enabled = &wrappers.BoolValue{Value: defaultValues.Enabled.Value} + } + } + if rawVal, ok := getStringEnv(prefix + "LEVEL"); ok { + x.Level = LogLevel(LogLevel_value[rawVal]) + } else if x.Level == LogLevel(0) && defaultValues != nil && defaultValues.Level != LogLevel(0) { + x.Level = defaultValues.Level + } + } diff --git a/proto/hypertrace/agent/config/v1/config.proto b/proto/hypertrace/agent/config/v1/config.proto index 95f3ab9..cebc39f 100644 --- a/proto/hypertrace/agent/config/v1/config.proto +++ b/proto/hypertrace/agent/config/v1/config.proto @@ -196,4 +196,27 @@ message Telemetry { // Whether to capture metrics or not. The metrics will be otel go metrics. // See https://github.com/open-telemetry/opentelemetry-go/tree/main/metric google.protobuf.BoolValue metrics_enabled = 2; + + // Configure logs export. + LogsExport logs = 3; +} + +enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0; + LOG_LEVEL_TRACE = 1; + LOG_LEVEL_DEBUG = 2; + LOG_LEVEL_INFO = 3; + LOG_LEVEL_WARN = 4; + LOG_LEVEL_ERROR = 5; } + +message LogsExport { + // when true, logs from the agent will be exported to Traceable Platform Agent + // via Opentelemetry Logs pipeline. Reporting config is shared with the Traces pipeline. + google.protobuf.BoolValue enabled = 1; + + // the level of logs to export, anything below that level will not be exported, + // it'll only be available in the local log file. + + LogLevel level = 2; +} \ No newline at end of file diff --git a/tools/go-generator/cmd/generator/main.go b/tools/go-generator/cmd/generator/main.go index c8cb4e5..3957011 100644 --- a/tools/go-generator/cmd/generator/main.go +++ b/tools/go-generator/cmd/generator/main.go @@ -173,7 +173,7 @@ func generateLoaderForProtoFile(pkgFqpn string, pf pbparser.ProtoFile) ([]byte, envPrefix, ) c += fmt.Sprintf(" x.%s = %s(%s_value[rawVal])\n", fieldName, namedType.Name(), namedType.Name()) - c += fmt.Sprintf(" } else if x.%s == %s(0) && defaultValues != nil && defaultValues.%s != %s(0) {\n", fieldName, fieldName, fieldName, fieldName) + c += fmt.Sprintf(" } else if x.%s == %s(0) && defaultValues != nil && defaultValues.%s != %s(0) {\n", fieldName, namedType.Name(), fieldName, namedType.Name()) c += fmt.Sprintf(" x.%s = defaultValues.%s\n", fieldName, fieldName) c += fmt.Sprintf(" }\n\n") } else {