diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 43ee8d0..4b15034 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -7,7 +7,7 @@ on: jobs: static-analysis: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v3 diff --git a/gen/go/go.mod b/gen/go/go.mod index 24e032f..3449ecc 100644 --- a/gen/go/go.mod +++ b/gen/go/go.mod @@ -5,7 +5,7 @@ go 1.24 require ( github.com/ghodss/yaml v1.0.0 github.com/stretchr/testify v1.11.1 - google.golang.org/protobuf v1.36.10 + google.golang.org/protobuf v1.36.11 ) require ( diff --git a/gen/go/go.sum b/gen/go/go.sum index ab3a2f5..37a9df2 100644 --- a/gen/go/go.sum +++ b/gen/go/go.sum @@ -8,8 +8,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= -google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= 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 a2fd9fe..264d6bc 100644 --- a/gen/go/proto/v1/config.proto +++ b/gen/go/proto/v1/config.proto @@ -76,6 +76,9 @@ message Reporting { // Compression type CompressionType compression_type = 10; + + // Span Processor type + SpanProcessorType span_processor_type = 11; } // Message describes what message should be considered for certain DataCapture option @@ -155,6 +158,15 @@ enum TraceReporterType { OTLP_HTTP = 5; } +enum SpanProcessorType { + // Default to none. Agent will use it's default span processor(typically batch) + SPAN_PROCESSOR_TYPE_UNSPECIFIED = 0; + + SPAN_PROCESSOR_TYPE_BATCH = 1; + + SPAN_PROCESSOR_TYPE_SIMPLE = 2; +} + // MetricReporterType represents the reporting format for metric data. enum MetricReporterType { diff --git a/gen/go/v1/config.pb.go b/gen/go/v1/config.pb.go index 03118e5..30ef33c 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.36.6 +// protoc-gen-go v1.36.11 // protoc (unknown) // source: hypertrace/agent/config/v1/config.proto @@ -140,6 +140,56 @@ func (TraceReporterType) EnumDescriptor() ([]byte, []int) { return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{1} } +type SpanProcessorType int32 + +const ( + // Default to none. Agent will use it's default span processor(typically batch) + SpanProcessorType_SPAN_PROCESSOR_TYPE_UNSPECIFIED SpanProcessorType = 0 + SpanProcessorType_SPAN_PROCESSOR_TYPE_BATCH SpanProcessorType = 1 + SpanProcessorType_SPAN_PROCESSOR_TYPE_SIMPLE SpanProcessorType = 2 +) + +// Enum value maps for SpanProcessorType. +var ( + SpanProcessorType_name = map[int32]string{ + 0: "SPAN_PROCESSOR_TYPE_UNSPECIFIED", + 1: "SPAN_PROCESSOR_TYPE_BATCH", + 2: "SPAN_PROCESSOR_TYPE_SIMPLE", + } + SpanProcessorType_value = map[string]int32{ + "SPAN_PROCESSOR_TYPE_UNSPECIFIED": 0, + "SPAN_PROCESSOR_TYPE_BATCH": 1, + "SPAN_PROCESSOR_TYPE_SIMPLE": 2, + } +) + +func (x SpanProcessorType) Enum() *SpanProcessorType { + p := new(SpanProcessorType) + *p = x + return p +} + +func (x SpanProcessorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SpanProcessorType) Descriptor() protoreflect.EnumDescriptor { + return file_hypertrace_agent_config_v1_config_proto_enumTypes[2].Descriptor() +} + +func (SpanProcessorType) Type() protoreflect.EnumType { + return &file_hypertrace_agent_config_v1_config_proto_enumTypes[2] +} + +func (x SpanProcessorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SpanProcessorType.Descriptor instead. +func (SpanProcessorType) EnumDescriptor() ([]byte, []int) { + return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{2} +} + // MetricReporterType represents the reporting format for metric data. type MetricReporterType int32 @@ -187,11 +237,11 @@ func (x MetricReporterType) String() string { } func (MetricReporterType) Descriptor() protoreflect.EnumDescriptor { - return file_hypertrace_agent_config_v1_config_proto_enumTypes[2].Descriptor() + return file_hypertrace_agent_config_v1_config_proto_enumTypes[3].Descriptor() } func (MetricReporterType) Type() protoreflect.EnumType { - return &file_hypertrace_agent_config_v1_config_proto_enumTypes[2] + return &file_hypertrace_agent_config_v1_config_proto_enumTypes[3] } func (x MetricReporterType) Number() protoreflect.EnumNumber { @@ -200,7 +250,7 @@ func (x MetricReporterType) Number() protoreflect.EnumNumber { // Deprecated: Use MetricReporterType.Descriptor instead. func (MetricReporterType) EnumDescriptor() ([]byte, []int) { - return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{2} + return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{3} } type LogLevel int32 @@ -245,11 +295,11 @@ func (x LogLevel) String() string { } func (LogLevel) Descriptor() protoreflect.EnumDescriptor { - return file_hypertrace_agent_config_v1_config_proto_enumTypes[3].Descriptor() + return file_hypertrace_agent_config_v1_config_proto_enumTypes[4].Descriptor() } func (LogLevel) Type() protoreflect.EnumType { - return &file_hypertrace_agent_config_v1_config_proto_enumTypes[3] + return &file_hypertrace_agent_config_v1_config_proto_enumTypes[4] } func (x LogLevel) Number() protoreflect.EnumNumber { @@ -258,7 +308,7 @@ func (x LogLevel) Number() protoreflect.EnumNumber { // Deprecated: Use LogLevel.Descriptor instead. func (LogLevel) EnumDescriptor() ([]byte, []int) { - return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{3} + return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{4} } type CompressionType int32 @@ -291,11 +341,11 @@ func (x CompressionType) String() string { } func (CompressionType) Descriptor() protoreflect.EnumDescriptor { - return file_hypertrace_agent_config_v1_config_proto_enumTypes[4].Descriptor() + return file_hypertrace_agent_config_v1_config_proto_enumTypes[5].Descriptor() } func (CompressionType) Type() protoreflect.EnumType { - return &file_hypertrace_agent_config_v1_config_proto_enumTypes[4] + return &file_hypertrace_agent_config_v1_config_proto_enumTypes[5] } func (x CompressionType) Number() protoreflect.EnumNumber { @@ -304,7 +354,7 @@ func (x CompressionType) Number() protoreflect.EnumNumber { // Deprecated: Use CompressionType.Descriptor instead. func (CompressionType) EnumDescriptor() ([]byte, []int) { - return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{4} + return file_hypertrace_agent_config_v1_config_proto_rawDescGZIP(), []int{5} } // AgentConfig covers the config for agents. @@ -456,8 +506,10 @@ type Reporting struct { EnableGrpcLoadbalancing *wrapperspb.BoolValue `protobuf:"bytes,9,opt,name=enable_grpc_loadbalancing,json=enableGrpcLoadbalancing,proto3" json:"enable_grpc_loadbalancing,omitempty"` // Compression type CompressionType CompressionType `protobuf:"varint,10,opt,name=compression_type,json=compressionType,proto3,enum=hypertrace.agent.config.v1.CompressionType" json:"compression_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Span Processor type + SpanProcessorType SpanProcessorType `protobuf:"varint,11,opt,name=span_processor_type,json=spanProcessorType,proto3,enum=hypertrace.agent.config.v1.SpanProcessorType" json:"span_processor_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Reporting) Reset() { @@ -553,6 +605,13 @@ func (x *Reporting) GetCompressionType() CompressionType { return CompressionType_COMPRESSION_TYPE_UNSPECIFIED } +func (x *Reporting) GetSpanProcessorType() SpanProcessorType { + if x != nil { + return x.SpanProcessorType + } + return SpanProcessorType_SPAN_PROCESSOR_TYPE_UNSPECIFIED +} + // Message describes what message should be considered for certain DataCapture option type Message struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -948,7 +1007,7 @@ const file_hypertrace_agent_config_v1_config_proto_rawDesc = "" + "\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\"\xa0\x05\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xff\x05\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" + @@ -959,7 +1018,8 @@ const file_hypertrace_agent_config_v1_config_proto_rawDesc = "" + "\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\x12V\n" + "\x10compression_type\x18\n" + - " \x01(\x0e2+.hypertrace.agent.config.v1.CompressionTypeR\x0fcompressionType\"w\n" + + " \x01(\x0e2+.hypertrace.agent.config.v1.CompressionTypeR\x0fcompressionType\x12]\n" + + "\x13span_processor_type\x18\v \x01(\x0e2-.hypertrace.agent.config.v1.SpanProcessorTypeR\x11spanProcessorType\"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" + @@ -994,7 +1054,11 @@ const file_hypertrace_agent_config_v1_config_proto_rawDesc = "" + "\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" + + "\tOTLP_HTTP\x10\x05*w\n" + + "\x11SpanProcessorType\x12#\n" + + "\x1fSPAN_PROCESSOR_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n" + + "\x19SPAN_PROCESSOR_TYPE_BATCH\x10\x01\x12\x1e\n" + + "\x1aSPAN_PROCESSOR_TYPE_SIMPLE\x10\x02*\xbf\x01\n" + "\x12MetricReporterType\x12$\n" + " METRIC_REPORTER_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n" + "\x19METRIC_REPORTER_TYPE_OTLP\x10\x01\x12#\n" + @@ -1025,67 +1089,69 @@ func file_hypertrace_agent_config_v1_config_proto_rawDescGZIP() []byte { return file_hypertrace_agent_config_v1_config_proto_rawDescData } -var file_hypertrace_agent_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_hypertrace_agent_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 6) 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 - (LogLevel)(0), // 3: hypertrace.agent.config.v1.LogLevel - (CompressionType)(0), // 4: hypertrace.agent.config.v1.CompressionType - (*AgentConfig)(nil), // 5: hypertrace.agent.config.v1.AgentConfig - (*Reporting)(nil), // 6: hypertrace.agent.config.v1.Reporting - (*Message)(nil), // 7: hypertrace.agent.config.v1.Message - (*DataCapture)(nil), // 8: hypertrace.agent.config.v1.DataCapture - (*JavaAgent)(nil), // 9: hypertrace.agent.config.v1.JavaAgent - (*GoAgent)(nil), // 10: hypertrace.agent.config.v1.GoAgent - (*Telemetry)(nil), // 11: hypertrace.agent.config.v1.Telemetry - (*LogsExport)(nil), // 12: hypertrace.agent.config.v1.LogsExport - nil, // 13: hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry - (*wrapperspb.StringValue)(nil), // 14: google.protobuf.StringValue - (*wrapperspb.BoolValue)(nil), // 15: google.protobuf.BoolValue - (*wrapperspb.Int32Value)(nil), // 16: google.protobuf.Int32Value + (SpanProcessorType)(0), // 2: hypertrace.agent.config.v1.SpanProcessorType + (MetricReporterType)(0), // 3: hypertrace.agent.config.v1.MetricReporterType + (LogLevel)(0), // 4: hypertrace.agent.config.v1.LogLevel + (CompressionType)(0), // 5: hypertrace.agent.config.v1.CompressionType + (*AgentConfig)(nil), // 6: hypertrace.agent.config.v1.AgentConfig + (*Reporting)(nil), // 7: hypertrace.agent.config.v1.Reporting + (*Message)(nil), // 8: hypertrace.agent.config.v1.Message + (*DataCapture)(nil), // 9: hypertrace.agent.config.v1.DataCapture + (*JavaAgent)(nil), // 10: hypertrace.agent.config.v1.JavaAgent + (*GoAgent)(nil), // 11: hypertrace.agent.config.v1.GoAgent + (*Telemetry)(nil), // 12: hypertrace.agent.config.v1.Telemetry + (*LogsExport)(nil), // 13: hypertrace.agent.config.v1.LogsExport + nil, // 14: hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry + (*wrapperspb.StringValue)(nil), // 15: google.protobuf.StringValue + (*wrapperspb.BoolValue)(nil), // 16: google.protobuf.BoolValue + (*wrapperspb.Int32Value)(nil), // 17: google.protobuf.Int32Value } var file_hypertrace_agent_config_v1_config_proto_depIdxs = []int32{ - 14, // 0: hypertrace.agent.config.v1.AgentConfig.service_name:type_name -> google.protobuf.StringValue - 6, // 1: hypertrace.agent.config.v1.AgentConfig.reporting:type_name -> hypertrace.agent.config.v1.Reporting - 8, // 2: hypertrace.agent.config.v1.AgentConfig.data_capture:type_name -> hypertrace.agent.config.v1.DataCapture + 15, // 0: hypertrace.agent.config.v1.AgentConfig.service_name:type_name -> google.protobuf.StringValue + 7, // 1: hypertrace.agent.config.v1.AgentConfig.reporting:type_name -> hypertrace.agent.config.v1.Reporting + 9, // 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 - 15, // 4: hypertrace.agent.config.v1.AgentConfig.enabled:type_name -> google.protobuf.BoolValue - 9, // 5: hypertrace.agent.config.v1.AgentConfig.javaagent:type_name -> hypertrace.agent.config.v1.JavaAgent - 13, // 6: hypertrace.agent.config.v1.AgentConfig.resource_attributes:type_name -> hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry - 11, // 7: hypertrace.agent.config.v1.AgentConfig.telemetry:type_name -> hypertrace.agent.config.v1.Telemetry - 10, // 8: hypertrace.agent.config.v1.AgentConfig.goagent:type_name -> hypertrace.agent.config.v1.GoAgent - 14, // 9: hypertrace.agent.config.v1.Reporting.endpoint:type_name -> google.protobuf.StringValue - 15, // 10: hypertrace.agent.config.v1.Reporting.secure:type_name -> google.protobuf.BoolValue - 14, // 11: hypertrace.agent.config.v1.Reporting.token:type_name -> google.protobuf.StringValue + 16, // 4: hypertrace.agent.config.v1.AgentConfig.enabled:type_name -> google.protobuf.BoolValue + 10, // 5: hypertrace.agent.config.v1.AgentConfig.javaagent:type_name -> hypertrace.agent.config.v1.JavaAgent + 14, // 6: hypertrace.agent.config.v1.AgentConfig.resource_attributes:type_name -> hypertrace.agent.config.v1.AgentConfig.ResourceAttributesEntry + 12, // 7: hypertrace.agent.config.v1.AgentConfig.telemetry:type_name -> hypertrace.agent.config.v1.Telemetry + 11, // 8: hypertrace.agent.config.v1.AgentConfig.goagent:type_name -> hypertrace.agent.config.v1.GoAgent + 15, // 9: hypertrace.agent.config.v1.Reporting.endpoint:type_name -> google.protobuf.StringValue + 16, // 10: hypertrace.agent.config.v1.Reporting.secure:type_name -> google.protobuf.BoolValue + 15, // 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 - 14, // 13: hypertrace.agent.config.v1.Reporting.cert_file:type_name -> google.protobuf.StringValue - 14, // 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 - 15, // 16: hypertrace.agent.config.v1.Reporting.enable_grpc_loadbalancing:type_name -> google.protobuf.BoolValue - 4, // 17: hypertrace.agent.config.v1.Reporting.compression_type:type_name -> hypertrace.agent.config.v1.CompressionType - 15, // 18: hypertrace.agent.config.v1.Message.request:type_name -> google.protobuf.BoolValue - 15, // 19: hypertrace.agent.config.v1.Message.response:type_name -> google.protobuf.BoolValue - 7, // 20: hypertrace.agent.config.v1.DataCapture.http_headers:type_name -> hypertrace.agent.config.v1.Message - 7, // 21: hypertrace.agent.config.v1.DataCapture.http_body:type_name -> hypertrace.agent.config.v1.Message - 7, // 22: hypertrace.agent.config.v1.DataCapture.rpc_metadata:type_name -> hypertrace.agent.config.v1.Message - 7, // 23: hypertrace.agent.config.v1.DataCapture.rpc_body:type_name -> hypertrace.agent.config.v1.Message - 16, // 24: hypertrace.agent.config.v1.DataCapture.body_max_size_bytes:type_name -> google.protobuf.Int32Value - 16, // 25: hypertrace.agent.config.v1.DataCapture.body_max_processing_size_bytes:type_name -> google.protobuf.Int32Value - 14, // 26: hypertrace.agent.config.v1.DataCapture.allowed_content_types:type_name -> google.protobuf.StringValue - 14, // 27: hypertrace.agent.config.v1.JavaAgent.filter_jar_paths:type_name -> google.protobuf.StringValue - 15, // 28: hypertrace.agent.config.v1.GoAgent.use_custom_bsp:type_name -> google.protobuf.BoolValue - 15, // 29: hypertrace.agent.config.v1.Telemetry.startup_span_enabled:type_name -> google.protobuf.BoolValue - 15, // 30: hypertrace.agent.config.v1.Telemetry.metrics_enabled:type_name -> google.protobuf.BoolValue - 12, // 31: hypertrace.agent.config.v1.Telemetry.logs:type_name -> hypertrace.agent.config.v1.LogsExport - 15, // 32: hypertrace.agent.config.v1.LogsExport.enabled:type_name -> google.protobuf.BoolValue - 3, // 33: hypertrace.agent.config.v1.LogsExport.level:type_name -> hypertrace.agent.config.v1.LogLevel - 34, // [34:34] is the sub-list for method output_type - 34, // [34:34] is the sub-list for method input_type - 34, // [34:34] is the sub-list for extension type_name - 34, // [34:34] is the sub-list for extension extendee - 0, // [0:34] is the sub-list for field type_name + 15, // 13: hypertrace.agent.config.v1.Reporting.cert_file:type_name -> google.protobuf.StringValue + 15, // 14: hypertrace.agent.config.v1.Reporting.metric_endpoint:type_name -> google.protobuf.StringValue + 3, // 15: hypertrace.agent.config.v1.Reporting.metric_reporter_type:type_name -> hypertrace.agent.config.v1.MetricReporterType + 16, // 16: hypertrace.agent.config.v1.Reporting.enable_grpc_loadbalancing:type_name -> google.protobuf.BoolValue + 5, // 17: hypertrace.agent.config.v1.Reporting.compression_type:type_name -> hypertrace.agent.config.v1.CompressionType + 2, // 18: hypertrace.agent.config.v1.Reporting.span_processor_type:type_name -> hypertrace.agent.config.v1.SpanProcessorType + 16, // 19: hypertrace.agent.config.v1.Message.request:type_name -> google.protobuf.BoolValue + 16, // 20: hypertrace.agent.config.v1.Message.response:type_name -> google.protobuf.BoolValue + 8, // 21: hypertrace.agent.config.v1.DataCapture.http_headers:type_name -> hypertrace.agent.config.v1.Message + 8, // 22: hypertrace.agent.config.v1.DataCapture.http_body:type_name -> hypertrace.agent.config.v1.Message + 8, // 23: hypertrace.agent.config.v1.DataCapture.rpc_metadata:type_name -> hypertrace.agent.config.v1.Message + 8, // 24: hypertrace.agent.config.v1.DataCapture.rpc_body:type_name -> hypertrace.agent.config.v1.Message + 17, // 25: hypertrace.agent.config.v1.DataCapture.body_max_size_bytes:type_name -> google.protobuf.Int32Value + 17, // 26: hypertrace.agent.config.v1.DataCapture.body_max_processing_size_bytes:type_name -> google.protobuf.Int32Value + 15, // 27: hypertrace.agent.config.v1.DataCapture.allowed_content_types:type_name -> google.protobuf.StringValue + 15, // 28: hypertrace.agent.config.v1.JavaAgent.filter_jar_paths:type_name -> google.protobuf.StringValue + 16, // 29: hypertrace.agent.config.v1.GoAgent.use_custom_bsp:type_name -> google.protobuf.BoolValue + 16, // 30: hypertrace.agent.config.v1.Telemetry.startup_span_enabled:type_name -> google.protobuf.BoolValue + 16, // 31: hypertrace.agent.config.v1.Telemetry.metrics_enabled:type_name -> google.protobuf.BoolValue + 13, // 32: hypertrace.agent.config.v1.Telemetry.logs:type_name -> hypertrace.agent.config.v1.LogsExport + 16, // 33: hypertrace.agent.config.v1.LogsExport.enabled:type_name -> google.protobuf.BoolValue + 4, // 34: hypertrace.agent.config.v1.LogsExport.level:type_name -> hypertrace.agent.config.v1.LogLevel + 35, // [35:35] is the sub-list for method output_type + 35, // [35:35] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_hypertrace_agent_config_v1_config_proto_init() } @@ -1098,7 +1164,7 @@ func file_hypertrace_agent_config_v1_config_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_hypertrace_agent_config_v1_config_proto_rawDesc), len(file_hypertrace_agent_config_v1_config_proto_rawDesc)), - NumEnums: 5, + NumEnums: 6, NumMessages: 9, NumExtensions: 0, NumServices: 0, diff --git a/gen/go/v1/config.pbloader.go b/gen/go/v1/config.pbloader.go index 3ec7d23..6756790 100644 --- a/gen/go/v1/config.pbloader.go +++ b/gen/go/v1/config.pbloader.go @@ -179,6 +179,12 @@ func (x *Reporting) loadFromEnv(prefix string, defaultValues *Reporting) { x.CompressionType = defaultValues.CompressionType } + if rawVal, ok := getStringEnv(prefix + "SPAN_PROCESSOR_TYPE"); ok { + x.SpanProcessorType = SpanProcessorType(SpanProcessorType_value[rawVal]) + } else if x.SpanProcessorType == SpanProcessorType(0) && defaultValues != nil && defaultValues.SpanProcessorType != SpanProcessorType(0) { + x.SpanProcessorType = defaultValues.SpanProcessorType + } + } // loadFromEnv loads the data from env vars, defaults and makes sure all values are initialized. diff --git a/proto/hypertrace/agent/config/v1/config.proto b/proto/hypertrace/agent/config/v1/config.proto index a2fd9fe..264d6bc 100644 --- a/proto/hypertrace/agent/config/v1/config.proto +++ b/proto/hypertrace/agent/config/v1/config.proto @@ -76,6 +76,9 @@ message Reporting { // Compression type CompressionType compression_type = 10; + + // Span Processor type + SpanProcessorType span_processor_type = 11; } // Message describes what message should be considered for certain DataCapture option @@ -155,6 +158,15 @@ enum TraceReporterType { OTLP_HTTP = 5; } +enum SpanProcessorType { + // Default to none. Agent will use it's default span processor(typically batch) + SPAN_PROCESSOR_TYPE_UNSPECIFIED = 0; + + SPAN_PROCESSOR_TYPE_BATCH = 1; + + SPAN_PROCESSOR_TYPE_SIMPLE = 2; +} + // MetricReporterType represents the reporting format for metric data. enum MetricReporterType {