model/modelpb/span.pb.go (522 lines of code) (raw):
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.28.3
// source: span.proto
package modelpb
import (
reflect "reflect"
sync "sync"
unsafe "unsafe"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type CompressionStrategy int32
const (
CompressionStrategy_COMPRESSION_STRATEGY_UNSPECIFIED CompressionStrategy = 0
CompressionStrategy_COMPRESSION_STRATEGY_EXACT_MATCH CompressionStrategy = 1
CompressionStrategy_COMPRESSION_STRATEGY_SAME_KIND CompressionStrategy = 2
)
// Enum value maps for CompressionStrategy.
var (
CompressionStrategy_name = map[int32]string{
0: "COMPRESSION_STRATEGY_UNSPECIFIED",
1: "COMPRESSION_STRATEGY_EXACT_MATCH",
2: "COMPRESSION_STRATEGY_SAME_KIND",
}
CompressionStrategy_value = map[string]int32{
"COMPRESSION_STRATEGY_UNSPECIFIED": 0,
"COMPRESSION_STRATEGY_EXACT_MATCH": 1,
"COMPRESSION_STRATEGY_SAME_KIND": 2,
}
)
func (x CompressionStrategy) Enum() *CompressionStrategy {
p := new(CompressionStrategy)
*p = x
return p
}
func (x CompressionStrategy) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CompressionStrategy) Descriptor() protoreflect.EnumDescriptor {
return file_span_proto_enumTypes[0].Descriptor()
}
func (CompressionStrategy) Type() protoreflect.EnumType {
return &file_span_proto_enumTypes[0]
}
func (x CompressionStrategy) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CompressionStrategy.Descriptor instead.
func (CompressionStrategy) EnumDescriptor() ([]byte, []int) {
return file_span_proto_rawDescGZIP(), []int{0}
}
type Span struct {
state protoimpl.MessageState `protogen:"open.v1"`
Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Composite *Composite `protobuf:"bytes,2,opt,name=composite,proto3" json:"composite,omitempty"`
DestinationService *DestinationService `protobuf:"bytes,3,opt,name=destination_service,json=destinationService,proto3" json:"destination_service,omitempty"`
Db *DB `protobuf:"bytes,4,opt,name=db,proto3" json:"db,omitempty"`
Sync *bool `protobuf:"varint,5,opt,name=sync,proto3,oneof" json:"sync,omitempty"`
Kind string `protobuf:"bytes,6,opt,name=kind,proto3" json:"kind,omitempty"`
Action string `protobuf:"bytes,7,opt,name=action,proto3" json:"action,omitempty"`
Subtype string `protobuf:"bytes,8,opt,name=subtype,proto3" json:"subtype,omitempty"`
Id string `protobuf:"bytes,9,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
Name string `protobuf:"bytes,11,opt,name=name,proto3" json:"name,omitempty"`
Stacktrace []*StacktraceFrame `protobuf:"bytes,12,rep,name=stacktrace,proto3" json:"stacktrace,omitempty"`
Links []*SpanLink `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"`
SelfTime *AggregatedDuration `protobuf:"bytes,14,opt,name=self_time,json=selfTime,proto3" json:"self_time,omitempty"`
RepresentativeCount float64 `protobuf:"fixed64,15,opt,name=representative_count,json=representativeCount,proto3" json:"representative_count,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Span) Reset() {
*x = Span{}
mi := &file_span_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Span) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Span) ProtoMessage() {}
func (x *Span) ProtoReflect() protoreflect.Message {
mi := &file_span_proto_msgTypes[0]
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 Span.ProtoReflect.Descriptor instead.
func (*Span) Descriptor() ([]byte, []int) {
return file_span_proto_rawDescGZIP(), []int{0}
}
func (x *Span) GetMessage() *Message {
if x != nil {
return x.Message
}
return nil
}
func (x *Span) GetComposite() *Composite {
if x != nil {
return x.Composite
}
return nil
}
func (x *Span) GetDestinationService() *DestinationService {
if x != nil {
return x.DestinationService
}
return nil
}
func (x *Span) GetDb() *DB {
if x != nil {
return x.Db
}
return nil
}
func (x *Span) GetSync() bool {
if x != nil && x.Sync != nil {
return *x.Sync
}
return false
}
func (x *Span) GetKind() string {
if x != nil {
return x.Kind
}
return ""
}
func (x *Span) GetAction() string {
if x != nil {
return x.Action
}
return ""
}
func (x *Span) GetSubtype() string {
if x != nil {
return x.Subtype
}
return ""
}
func (x *Span) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Span) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Span) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Span) GetStacktrace() []*StacktraceFrame {
if x != nil {
return x.Stacktrace
}
return nil
}
func (x *Span) GetLinks() []*SpanLink {
if x != nil {
return x.Links
}
return nil
}
func (x *Span) GetSelfTime() *AggregatedDuration {
if x != nil {
return x.SelfTime
}
return nil
}
func (x *Span) GetRepresentativeCount() float64 {
if x != nil {
return x.RepresentativeCount
}
return 0
}
type DB struct {
state protoimpl.MessageState `protogen:"open.v1"`
RowsAffected *uint32 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3,oneof" json:"rows_affected,omitempty"`
Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`
Statement string `protobuf:"bytes,3,opt,name=statement,proto3" json:"statement,omitempty"`
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
UserName string `protobuf:"bytes,5,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
Link string `protobuf:"bytes,6,opt,name=link,proto3" json:"link,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DB) Reset() {
*x = DB{}
mi := &file_span_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DB) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DB) ProtoMessage() {}
func (x *DB) ProtoReflect() protoreflect.Message {
mi := &file_span_proto_msgTypes[1]
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 DB.ProtoReflect.Descriptor instead.
func (*DB) Descriptor() ([]byte, []int) {
return file_span_proto_rawDescGZIP(), []int{1}
}
func (x *DB) GetRowsAffected() uint32 {
if x != nil && x.RowsAffected != nil {
return *x.RowsAffected
}
return 0
}
func (x *DB) GetInstance() string {
if x != nil {
return x.Instance
}
return ""
}
func (x *DB) GetStatement() string {
if x != nil {
return x.Statement
}
return ""
}
func (x *DB) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *DB) GetUserName() string {
if x != nil {
return x.UserName
}
return ""
}
func (x *DB) GetLink() string {
if x != nil {
return x.Link
}
return ""
}
type DestinationService struct {
state protoimpl.MessageState `protogen:"open.v1"`
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
ResponseTime *AggregatedDuration `protobuf:"bytes,4,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DestinationService) Reset() {
*x = DestinationService{}
mi := &file_span_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DestinationService) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DestinationService) ProtoMessage() {}
func (x *DestinationService) ProtoReflect() protoreflect.Message {
mi := &file_span_proto_msgTypes[2]
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 DestinationService.ProtoReflect.Descriptor instead.
func (*DestinationService) Descriptor() ([]byte, []int) {
return file_span_proto_rawDescGZIP(), []int{2}
}
func (x *DestinationService) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *DestinationService) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *DestinationService) GetResource() string {
if x != nil {
return x.Resource
}
return ""
}
func (x *DestinationService) GetResponseTime() *AggregatedDuration {
if x != nil {
return x.ResponseTime
}
return nil
}
type Composite struct {
state protoimpl.MessageState `protogen:"open.v1"`
CompressionStrategy CompressionStrategy `protobuf:"varint,1,opt,name=compression_strategy,json=compressionStrategy,proto3,enum=elastic.apm.v1.CompressionStrategy" json:"compression_strategy,omitempty"`
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
Sum float64 `protobuf:"fixed64,3,opt,name=sum,proto3" json:"sum,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Composite) Reset() {
*x = Composite{}
mi := &file_span_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Composite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Composite) ProtoMessage() {}
func (x *Composite) ProtoReflect() protoreflect.Message {
mi := &file_span_proto_msgTypes[3]
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 Composite.ProtoReflect.Descriptor instead.
func (*Composite) Descriptor() ([]byte, []int) {
return file_span_proto_rawDescGZIP(), []int{3}
}
func (x *Composite) GetCompressionStrategy() CompressionStrategy {
if x != nil {
return x.CompressionStrategy
}
return CompressionStrategy_COMPRESSION_STRATEGY_UNSPECIFIED
}
func (x *Composite) GetCount() uint32 {
if x != nil {
return x.Count
}
return 0
}
func (x *Composite) GetSum() float64 {
if x != nil {
return x.Sum
}
return 0
}
type SpanLink struct {
state protoimpl.MessageState `protogen:"open.v1"`
TraceId string `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
SpanId string `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SpanLink) Reset() {
*x = SpanLink{}
mi := &file_span_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SpanLink) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpanLink) ProtoMessage() {}
func (x *SpanLink) ProtoReflect() protoreflect.Message {
mi := &file_span_proto_msgTypes[4]
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 SpanLink.ProtoReflect.Descriptor instead.
func (*SpanLink) Descriptor() ([]byte, []int) {
return file_span_proto_rawDescGZIP(), []int{4}
}
func (x *SpanLink) GetTraceId() string {
if x != nil {
return x.TraceId
}
return ""
}
func (x *SpanLink) GetSpanId() string {
if x != nil {
return x.SpanId
}
return ""
}
var File_span_proto protoreflect.FileDescriptor
const file_span_proto_rawDesc = "" +
"\n" +
"\n" +
"span.proto\x12\x0eelastic.apm.v1\x1a\rmessage.proto\x1a\x0fmetricset.proto\x1a\x10stacktrace.proto\"\xf0\x04\n" +
"\x04Span\x121\n" +
"\amessage\x18\x01 \x01(\v2\x17.elastic.apm.v1.MessageR\amessage\x127\n" +
"\tcomposite\x18\x02 \x01(\v2\x19.elastic.apm.v1.CompositeR\tcomposite\x12S\n" +
"\x13destination_service\x18\x03 \x01(\v2\".elastic.apm.v1.DestinationServiceR\x12destinationService\x12\"\n" +
"\x02db\x18\x04 \x01(\v2\x12.elastic.apm.v1.DBR\x02db\x12\x17\n" +
"\x04sync\x18\x05 \x01(\bH\x00R\x04sync\x88\x01\x01\x12\x12\n" +
"\x04kind\x18\x06 \x01(\tR\x04kind\x12\x16\n" +
"\x06action\x18\a \x01(\tR\x06action\x12\x18\n" +
"\asubtype\x18\b \x01(\tR\asubtype\x12\x0e\n" +
"\x02id\x18\t \x01(\tR\x02id\x12\x12\n" +
"\x04type\x18\n" +
" \x01(\tR\x04type\x12\x12\n" +
"\x04name\x18\v \x01(\tR\x04name\x12?\n" +
"\n" +
"stacktrace\x18\f \x03(\v2\x1f.elastic.apm.v1.StacktraceFrameR\n" +
"stacktrace\x12.\n" +
"\x05links\x18\r \x03(\v2\x18.elastic.apm.v1.SpanLinkR\x05links\x12?\n" +
"\tself_time\x18\x0e \x01(\v2\".elastic.apm.v1.AggregatedDurationR\bselfTime\x121\n" +
"\x14representative_count\x18\x0f \x01(\x01R\x13representativeCountB\a\n" +
"\x05_sync\"\xbf\x01\n" +
"\x02DB\x12(\n" +
"\rrows_affected\x18\x01 \x01(\rH\x00R\frowsAffected\x88\x01\x01\x12\x1a\n" +
"\binstance\x18\x02 \x01(\tR\binstance\x12\x1c\n" +
"\tstatement\x18\x03 \x01(\tR\tstatement\x12\x12\n" +
"\x04type\x18\x04 \x01(\tR\x04type\x12\x1b\n" +
"\tuser_name\x18\x05 \x01(\tR\buserName\x12\x12\n" +
"\x04link\x18\x06 \x01(\tR\x04linkB\x10\n" +
"\x0e_rows_affected\"\xa1\x01\n" +
"\x12DestinationService\x12\x12\n" +
"\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12\x1a\n" +
"\bresource\x18\x03 \x01(\tR\bresource\x12G\n" +
"\rresponse_time\x18\x04 \x01(\v2\".elastic.apm.v1.AggregatedDurationR\fresponseTime\"\x8b\x01\n" +
"\tComposite\x12V\n" +
"\x14compression_strategy\x18\x01 \x01(\x0e2#.elastic.apm.v1.CompressionStrategyR\x13compressionStrategy\x12\x14\n" +
"\x05count\x18\x02 \x01(\rR\x05count\x12\x10\n" +
"\x03sum\x18\x03 \x01(\x01R\x03sum\">\n" +
"\bSpanLink\x12\x19\n" +
"\btrace_id\x18\x01 \x01(\tR\atraceId\x12\x17\n" +
"\aspan_id\x18\x02 \x01(\tR\x06spanId*\x85\x01\n" +
"\x13CompressionStrategy\x12$\n" +
" COMPRESSION_STRATEGY_UNSPECIFIED\x10\x00\x12$\n" +
" COMPRESSION_STRATEGY_EXACT_MATCH\x10\x01\x12\"\n" +
"\x1eCOMPRESSION_STRATEGY_SAME_KIND\x10\x02B+Z)github.com/elastic/apm-data/model/modelpbb\x06proto3"
var (
file_span_proto_rawDescOnce sync.Once
file_span_proto_rawDescData []byte
)
func file_span_proto_rawDescGZIP() []byte {
file_span_proto_rawDescOnce.Do(func() {
file_span_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_span_proto_rawDesc), len(file_span_proto_rawDesc)))
})
return file_span_proto_rawDescData
}
var file_span_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_span_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_span_proto_goTypes = []any{
(CompressionStrategy)(0), // 0: elastic.apm.v1.CompressionStrategy
(*Span)(nil), // 1: elastic.apm.v1.Span
(*DB)(nil), // 2: elastic.apm.v1.DB
(*DestinationService)(nil), // 3: elastic.apm.v1.DestinationService
(*Composite)(nil), // 4: elastic.apm.v1.Composite
(*SpanLink)(nil), // 5: elastic.apm.v1.SpanLink
(*Message)(nil), // 6: elastic.apm.v1.Message
(*StacktraceFrame)(nil), // 7: elastic.apm.v1.StacktraceFrame
(*AggregatedDuration)(nil), // 8: elastic.apm.v1.AggregatedDuration
}
var file_span_proto_depIdxs = []int32{
6, // 0: elastic.apm.v1.Span.message:type_name -> elastic.apm.v1.Message
4, // 1: elastic.apm.v1.Span.composite:type_name -> elastic.apm.v1.Composite
3, // 2: elastic.apm.v1.Span.destination_service:type_name -> elastic.apm.v1.DestinationService
2, // 3: elastic.apm.v1.Span.db:type_name -> elastic.apm.v1.DB
7, // 4: elastic.apm.v1.Span.stacktrace:type_name -> elastic.apm.v1.StacktraceFrame
5, // 5: elastic.apm.v1.Span.links:type_name -> elastic.apm.v1.SpanLink
8, // 6: elastic.apm.v1.Span.self_time:type_name -> elastic.apm.v1.AggregatedDuration
8, // 7: elastic.apm.v1.DestinationService.response_time:type_name -> elastic.apm.v1.AggregatedDuration
0, // 8: elastic.apm.v1.Composite.compression_strategy:type_name -> elastic.apm.v1.CompressionStrategy
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_span_proto_init() }
func file_span_proto_init() {
if File_span_proto != nil {
return
}
file_message_proto_init()
file_metricset_proto_init()
file_stacktrace_proto_init()
file_span_proto_msgTypes[0].OneofWrappers = []any{}
file_span_proto_msgTypes[1].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_span_proto_rawDesc), len(file_span_proto_rawDesc)),
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_span_proto_goTypes,
DependencyIndexes: file_span_proto_depIdxs,
EnumInfos: file_span_proto_enumTypes,
MessageInfos: file_span_proto_msgTypes,
}.Build()
File_span_proto = out.File
file_span_proto_goTypes = nil
file_span_proto_depIdxs = nil
}