diff --git a/.chloggen/alignfieldsproto.yaml b/.chloggen/alignfieldsproto.yaml new file mode 100644 index 00000000000..d60032d2ae4 --- /dev/null +++ b/.chloggen/alignfieldsproto.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. receiver/otlp) +component: pkg/pdata + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Optimize the size and pointer bytes for pdata structs + +# One or more tracking issues or pull requests related to the change +issues: [14339] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/Makefile b/Makefile index 02c3481345d..811370cc5d7 100644 --- a/Makefile +++ b/Makefile @@ -180,6 +180,7 @@ ocb: genpdata: cd internal/cmd/pdatagen && $(GOCMD) run main.go -C $(SRC_ROOT) $(MAKE) -C pdata fmt + cd pdata && $(GO_TOOL) betteralign --generated_files --apply ./... || true DOCKERCMD ?= docker DOCKER_PROTOBUF ?= otel/build-protobuf:0.23.0 diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 08f7e66c832..21cd465fe5e 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -5,6 +5,7 @@ go 1.24.0 tool ( github.com/a8m/envsubst/cmd/envsubst github.com/client9/misspell/cmd/misspell + github.com/dkorunic/betteralign/cmd/betteralign github.com/golangci/golangci-lint/v2/cmd/golangci-lint github.com/google/addlicense github.com/jcchavezs/porto/cmd/porto @@ -39,6 +40,7 @@ require ( github.com/Antonboom/testifylint v1.6.4 // indirect github.com/BurntSushi/toml v1.5.0 // indirect github.com/Djarvur/go-err113 v0.1.1 // indirect + github.com/KimMachineGun/automemlimit v0.7.5 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/MirrexOne/unqueryvet v1.2.1 // indirect @@ -84,6 +86,7 @@ require ( github.com/dave/dst v0.27.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect + github.com/dkorunic/betteralign v0.8.2 // indirect github.com/dlclark/regexp2 v1.11.5 // indirect github.com/dnephin/pflag v1.0.7 // indirect github.com/emirpasic/gods v1.18.1 // indirect @@ -129,6 +132,7 @@ require ( github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-github/v76 v76.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/renameio/v2 v2.0.1 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gordonklaus/ineffassign v0.2.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -187,6 +191,7 @@ require ( github.com/nishanths/predeclared v0.2.2 // indirect github.com/nunnatsa/ginkgolinter v0.21.2 // indirect github.com/pavius/impi v0.0.3 // indirect + github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pjbgf/sha1cd v0.5.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -214,6 +219,7 @@ require ( github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect github.com/securego/gosec/v2 v2.22.10 // indirect github.com/sergi/go-diff v1.4.0 // indirect + github.com/sirkon/dst v0.26.4 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect github.com/skeema/knownhosts v1.3.2 // indirect diff --git a/internal/tools/go.sum b/internal/tools/go.sum index 0183c641cd4..557848cf259 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -28,6 +28,8 @@ github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g= github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= +github.com/KimMachineGun/automemlimit v0.7.5 h1:RkbaC0MwhjL1ZuBKunGDjE/ggwAX43DwZrJqVwyveTk= +github.com/KimMachineGun/automemlimit v0.7.5/go.mod h1:QZxpHaGOQoYvFhv/r4u3U0JTC2ZcOwbSr11UZF46UBM= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= @@ -133,6 +135,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= +github.com/dkorunic/betteralign v0.8.2 h1:f3sJ/vtuuPOFd2/U3TeGfv8p+VhEyoBLuA05q6mAosU= +github.com/dkorunic/betteralign v0.8.2/go.mod h1:TAkhmNuJ3OKPAN7YgGTauiccHIc9ETjBmtE24fpLxOk= github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= @@ -251,6 +255,8 @@ github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 h1:EEHtgt9IwisQ2AZ4pI github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/renameio/v2 v2.0.1 h1:HyOM6qd9gF9sf15AvhbptGHUnaLTpEI9akAFFU3VyW0= +github.com/google/renameio/v2 v2.0.1/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs= @@ -398,6 +404,8 @@ github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs= github.com/otiai10/mint v1.6.3/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pavius/impi v0.0.3 h1:DND6MzU+BLABhOZXbELR3FU8b+zDgcq4dOCNLhiTYuI= github.com/pavius/impi v0.0.3/go.mod h1:x/hU0bfdWIhuOT1SKwiJg++yvkk6EuOtJk8WtDZqgr8= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pjbgf/sha1cd v0.5.0 h1:a+UkboSi1znleCDUNT3M5YxjOnN1fz2FhN48FlwCxs0= @@ -461,6 +469,8 @@ github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirkon/dst v0.26.4 h1:ETxfjyp5JKE8OCpdybyyhzTyQqq/MwbIIcs7kxcUAcA= +github.com/sirkon/dst v0.26.4/go.mod h1:e6HRc56jU5F2XT6GB8Cyci1Jb5cjX6gLqrm5+T/P7Zo= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= diff --git a/pdata/internal/generated_proto_exemplar.go b/pdata/internal/generated_proto_exemplar.go index 0a7372a702b..14031ab6ccd 100644 --- a/pdata/internal/generated_proto_exemplar.go +++ b/pdata/internal/generated_proto_exemplar.go @@ -50,9 +50,9 @@ func (m *Exemplar) GetAsInt() int64 { // Exemplars also hold information about the environment when the measurement was recorded, // for example the span and trace ID of the active span when the exemplar was recorded. type Exemplar struct { + Value any FilteredAttributes []KeyValue TimeUnixNano uint64 - Value any TraceId TraceID SpanId SpanID } diff --git a/pdata/internal/generated_proto_exponentialhistogramdatapoint.go b/pdata/internal/generated_proto_exponentialhistogramdatapoint.go index 8abfa0c0095..8126961b388 100644 --- a/pdata/internal/generated_proto_exponentialhistogramdatapoint.go +++ b/pdata/internal/generated_proto_exponentialhistogramdatapoint.go @@ -21,21 +21,21 @@ import ( // summary statistics for a population of values, it may optionally contain the // distribution of those values across a set of buckets. type ExponentialHistogramDataPoint struct { + Positive ExponentialHistogramDataPointBuckets + Negative ExponentialHistogramDataPointBuckets Attributes []KeyValue + Exemplars []Exemplar StartTimeUnixNano uint64 TimeUnixNano uint64 Count uint64 Sum float64 - Scale int32 ZeroCount uint64 - Positive ExponentialHistogramDataPointBuckets - Negative ExponentialHistogramDataPointBuckets - Flags uint32 - Exemplars []Exemplar Min float64 Max float64 ZeroThreshold float64 metadata [1]uint64 + Scale int32 + Flags uint32 } var ( diff --git a/pdata/internal/generated_proto_exponentialhistogramdatapointbuckets.go b/pdata/internal/generated_proto_exponentialhistogramdatapointbuckets.go index 3342ae19978..7ccd97a9cf5 100644 --- a/pdata/internal/generated_proto_exponentialhistogramdatapointbuckets.go +++ b/pdata/internal/generated_proto_exponentialhistogramdatapointbuckets.go @@ -16,8 +16,8 @@ import ( // ExponentialHistogramDataPointBuckets are a set of bucket counts, encoded in a contiguous array of counts. type ExponentialHistogramDataPointBuckets struct { - Offset int32 BucketCounts []uint64 + Offset int32 } var ( diff --git a/pdata/internal/generated_proto_exportlogspartialsuccess.go b/pdata/internal/generated_proto_exportlogspartialsuccess.go index 6db20809057..bccd38e7d26 100644 --- a/pdata/internal/generated_proto_exportlogspartialsuccess.go +++ b/pdata/internal/generated_proto_exportlogspartialsuccess.go @@ -16,8 +16,8 @@ import ( // ExportPartialSuccess represents the details of a partially successful export request. type ExportLogsPartialSuccess struct { - RejectedLogRecords int64 ErrorMessage string + RejectedLogRecords int64 } var ( diff --git a/pdata/internal/generated_proto_exportmetricspartialsuccess.go b/pdata/internal/generated_proto_exportmetricspartialsuccess.go index 7166c28c877..4915d3cb741 100644 --- a/pdata/internal/generated_proto_exportmetricspartialsuccess.go +++ b/pdata/internal/generated_proto_exportmetricspartialsuccess.go @@ -16,8 +16,8 @@ import ( // ExportPartialSuccess represents the details of a partially successful export request. type ExportMetricsPartialSuccess struct { - RejectedDataPoints int64 ErrorMessage string + RejectedDataPoints int64 } var ( diff --git a/pdata/internal/generated_proto_exportprofilespartialsuccess.go b/pdata/internal/generated_proto_exportprofilespartialsuccess.go index e41776d3b84..5a75e7a657e 100644 --- a/pdata/internal/generated_proto_exportprofilespartialsuccess.go +++ b/pdata/internal/generated_proto_exportprofilespartialsuccess.go @@ -16,8 +16,8 @@ import ( // ExportPartialSuccess represents the details of a partially successful export request. type ExportProfilesPartialSuccess struct { - RejectedProfiles int64 ErrorMessage string + RejectedProfiles int64 } var ( diff --git a/pdata/internal/generated_proto_exporttracepartialsuccess.go b/pdata/internal/generated_proto_exporttracepartialsuccess.go index c971f7cd7c5..6df4657fa29 100644 --- a/pdata/internal/generated_proto_exporttracepartialsuccess.go +++ b/pdata/internal/generated_proto_exporttracepartialsuccess.go @@ -16,8 +16,8 @@ import ( // ExportPartialSuccess represents the details of a partially successful export request. type ExportTracePartialSuccess struct { - RejectedSpans int64 ErrorMessage string + RejectedSpans int64 } var ( diff --git a/pdata/internal/generated_proto_histogramdatapoint.go b/pdata/internal/generated_proto_histogramdatapoint.go index 7306f55eb5e..4439f21332c 100644 --- a/pdata/internal/generated_proto_histogramdatapoint.go +++ b/pdata/internal/generated_proto_histogramdatapoint.go @@ -19,17 +19,17 @@ import ( // HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram of values. type HistogramDataPoint struct { Attributes []KeyValue + BucketCounts []uint64 + ExplicitBounds []float64 + Exemplars []Exemplar StartTimeUnixNano uint64 TimeUnixNano uint64 Count uint64 Sum float64 - BucketCounts []uint64 - ExplicitBounds []float64 - Exemplars []Exemplar - Flags uint32 Min float64 Max float64 metadata [1]uint64 + Flags uint32 } var ( diff --git a/pdata/internal/generated_proto_ipaddr.go b/pdata/internal/generated_proto_ipaddr.go index 37a6f62edbe..d77ec13a99a 100644 --- a/pdata/internal/generated_proto_ipaddr.go +++ b/pdata/internal/generated_proto_ipaddr.go @@ -15,8 +15,8 @@ import ( ) type IPAddr struct { - IP []byte Zone string + IP []byte } var ( diff --git a/pdata/internal/generated_proto_keyvalue.go b/pdata/internal/generated_proto_keyvalue.go index 7c3140e5d19..b6415730ff4 100644 --- a/pdata/internal/generated_proto_keyvalue.go +++ b/pdata/internal/generated_proto_keyvalue.go @@ -15,8 +15,8 @@ import ( ) type KeyValue struct { - Key string Value AnyValue + Key string } var ( diff --git a/pdata/internal/generated_proto_keyvalueandunit.go b/pdata/internal/generated_proto_keyvalueandunit.go index e46ad0649c2..493ad947fd5 100644 --- a/pdata/internal/generated_proto_keyvalueandunit.go +++ b/pdata/internal/generated_proto_keyvalueandunit.go @@ -18,8 +18,8 @@ import ( // style of encoding attributes which is more convenient // for profiles than opentelemetry.proto.common.v1.KeyValue. type KeyValueAndUnit struct { - KeyStrindex int32 Value AnyValue + KeyStrindex int32 UnitStrindex int32 } diff --git a/pdata/internal/generated_proto_location.go b/pdata/internal/generated_proto_location.go index 42440cc2668..012cf3e5567 100644 --- a/pdata/internal/generated_proto_location.go +++ b/pdata/internal/generated_proto_location.go @@ -16,10 +16,10 @@ import ( // Location describes function and line table debug information. type Location struct { - MappingIndex int32 - Address uint64 Lines []*Line AttributeIndices []int32 + Address uint64 + MappingIndex int32 } var ( diff --git a/pdata/internal/generated_proto_logrecord.go b/pdata/internal/generated_proto_logrecord.go index aa91ffb463a..adb2726a2c2 100644 --- a/pdata/internal/generated_proto_logrecord.go +++ b/pdata/internal/generated_proto_logrecord.go @@ -18,17 +18,17 @@ import ( // LogRecord are experimental implementation of OpenTelemetry Log Data Model. type LogRecord struct { + Body AnyValue + SeverityText string + EventName string + Attributes []KeyValue TimeUnixNano uint64 ObservedTimeUnixNano uint64 SeverityNumber SeverityNumber - SeverityText string - Body AnyValue - Attributes []KeyValue DroppedAttributesCount uint32 Flags uint32 TraceId TraceID SpanId SpanID - EventName string } var ( diff --git a/pdata/internal/generated_proto_mapping.go b/pdata/internal/generated_proto_mapping.go index b6387fc00b6..468fe86d670 100644 --- a/pdata/internal/generated_proto_mapping.go +++ b/pdata/internal/generated_proto_mapping.go @@ -16,11 +16,11 @@ import ( // Mapping describes the mapping of a binary in memory, including its address range, file offset, and metadata like build ID type Mapping struct { + AttributeIndices []int32 MemoryStart uint64 MemoryLimit uint64 FileOffset uint64 FilenameStrindex int32 - AttributeIndices []int32 } var ( diff --git a/pdata/internal/generated_proto_numberdatapoint.go b/pdata/internal/generated_proto_numberdatapoint.go index b3a698c2385..ed76fe2b88a 100644 --- a/pdata/internal/generated_proto_numberdatapoint.go +++ b/pdata/internal/generated_proto_numberdatapoint.go @@ -47,11 +47,11 @@ func (m *NumberDataPoint) GetAsInt() int64 { // NumberDataPoint is a single data point in a timeseries that describes the time-varying value of a number metric. type NumberDataPoint struct { + Value any Attributes []KeyValue + Exemplars []Exemplar StartTimeUnixNano uint64 TimeUnixNano uint64 - Value any - Exemplars []Exemplar Flags uint32 } diff --git a/pdata/internal/generated_proto_profile.go b/pdata/internal/generated_proto_profile.go index 4c33cd12072..a6b7c6e703e 100644 --- a/pdata/internal/generated_proto_profile.go +++ b/pdata/internal/generated_proto_profile.go @@ -18,17 +18,17 @@ import ( // Profile are an implementation of the pprofextended data model. type Profile struct { - SampleType ValueType + OriginalPayloadFormat string Samples []*Sample + OriginalPayload []byte + AttributeIndices []int32 TimeUnixNano uint64 DurationNano uint64 - PeriodType ValueType Period int64 - ProfileId ProfileID + SampleType ValueType + PeriodType ValueType DroppedAttributesCount uint32 - OriginalPayloadFormat string - OriginalPayload []byte - AttributeIndices []int32 + ProfileId ProfileID } var ( diff --git a/pdata/internal/generated_proto_requestcontext.go b/pdata/internal/generated_proto_requestcontext.go index 4921ea97f09..0f13a80a28e 100644 --- a/pdata/internal/generated_proto_requestcontext.go +++ b/pdata/internal/generated_proto_requestcontext.go @@ -66,9 +66,9 @@ func (m *RequestContext) GetUnix() *UnixAddr { } type RequestContext struct { + ClientAddress any SpanContext *SpanContext ClientMetadata []KeyValue - ClientAddress any } var ( diff --git a/pdata/internal/generated_proto_resource.go b/pdata/internal/generated_proto_resource.go index f23bbfc0db9..c8d21feb0fd 100644 --- a/pdata/internal/generated_proto_resource.go +++ b/pdata/internal/generated_proto_resource.go @@ -17,8 +17,8 @@ import ( // Resource is a message representing the resource information. type Resource struct { Attributes []KeyValue - DroppedAttributesCount uint32 EntityRefs []*EntityRef + DroppedAttributesCount uint32 } var ( diff --git a/pdata/internal/generated_proto_resourceprofiles.go b/pdata/internal/generated_proto_resourceprofiles.go index 5114d7a894b..5f57f298929 100644 --- a/pdata/internal/generated_proto_resourceprofiles.go +++ b/pdata/internal/generated_proto_resourceprofiles.go @@ -16,9 +16,9 @@ import ( // ResourceProfiles is a collection of profiles from a Resource. type ResourceProfiles struct { + SchemaUrl string Resource Resource ScopeProfiles []*ScopeProfiles - SchemaUrl string } var ( diff --git a/pdata/internal/generated_proto_sample.go b/pdata/internal/generated_proto_sample.go index eb844f703b3..a6a28c49a5b 100644 --- a/pdata/internal/generated_proto_sample.go +++ b/pdata/internal/generated_proto_sample.go @@ -17,11 +17,11 @@ import ( // Sample represents each record value encountered within a profiled program. type Sample struct { - StackIndex int32 Values []int64 AttributeIndices []int32 - LinkIndex int32 TimestampsUnixNano []uint64 + StackIndex int32 + LinkIndex int32 } var ( diff --git a/pdata/internal/generated_proto_scopelogs.go b/pdata/internal/generated_proto_scopelogs.go index e7406f26e88..9d2df5b950e 100644 --- a/pdata/internal/generated_proto_scopelogs.go +++ b/pdata/internal/generated_proto_scopelogs.go @@ -16,9 +16,9 @@ import ( // ScopeLogs is a collection of logs from a LibraryInstrumentation. type ScopeLogs struct { - Scope InstrumentationScope - LogRecords []*LogRecord SchemaUrl string + LogRecords []*LogRecord + Scope InstrumentationScope } var ( diff --git a/pdata/internal/generated_proto_scopemetrics.go b/pdata/internal/generated_proto_scopemetrics.go index 1fac11cbe03..7ee9edb47c9 100644 --- a/pdata/internal/generated_proto_scopemetrics.go +++ b/pdata/internal/generated_proto_scopemetrics.go @@ -16,9 +16,9 @@ import ( // ScopeMetrics is a collection of metrics from a LibraryInstrumentation. type ScopeMetrics struct { - Scope InstrumentationScope - Metrics []*Metric SchemaUrl string + Metrics []*Metric + Scope InstrumentationScope } var ( diff --git a/pdata/internal/generated_proto_scopeprofiles.go b/pdata/internal/generated_proto_scopeprofiles.go index b5ef9eb78c0..7606512345a 100644 --- a/pdata/internal/generated_proto_scopeprofiles.go +++ b/pdata/internal/generated_proto_scopeprofiles.go @@ -16,9 +16,9 @@ import ( // ScopeProfiles is a collection of profiles from a LibraryInstrumentation. type ScopeProfiles struct { - Scope InstrumentationScope - Profiles []*Profile SchemaUrl string + Profiles []*Profile + Scope InstrumentationScope } var ( diff --git a/pdata/internal/generated_proto_scopespans.go b/pdata/internal/generated_proto_scopespans.go index c6a5540c7d6..279412517b1 100644 --- a/pdata/internal/generated_proto_scopespans.go +++ b/pdata/internal/generated_proto_scopespans.go @@ -16,9 +16,9 @@ import ( // ScopeSpans is a collection of spans from a LibraryInstrumentation. type ScopeSpans struct { - Scope InstrumentationScope - Spans []*Span SchemaUrl string + Spans []*Span + Scope InstrumentationScope } var ( diff --git a/pdata/internal/generated_proto_span.go b/pdata/internal/generated_proto_span.go index a3384464b3e..a888ff4f6df 100644 --- a/pdata/internal/generated_proto_span.go +++ b/pdata/internal/generated_proto_span.go @@ -18,22 +18,22 @@ import ( // Span represents a single operation within a trace. // See Span definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto type Span struct { - TraceId TraceID - SpanId SpanID TraceState string - ParentSpanId SpanID - Flags uint32 Name string - Kind SpanKind + Attributes []KeyValue + Events []*SpanEvent + Links []*SpanLink + Status Status StartTimeUnixNano uint64 EndTimeUnixNano uint64 - Attributes []KeyValue + Flags uint32 + Kind SpanKind DroppedAttributesCount uint32 - Events []*SpanEvent DroppedEventsCount uint32 - Links []*SpanLink DroppedLinksCount uint32 - Status Status + TraceId TraceID + SpanId SpanID + ParentSpanId SpanID } var ( diff --git a/pdata/internal/generated_proto_spancontext.go b/pdata/internal/generated_proto_spancontext.go index 210cdcff258..dddff4b5e51 100644 --- a/pdata/internal/generated_proto_spancontext.go +++ b/pdata/internal/generated_proto_spancontext.go @@ -16,10 +16,10 @@ import ( ) type SpanContext struct { + TraceState string + TraceFlags uint32 TraceID TraceID SpanID SpanID - TraceFlags uint32 - TraceState string Remote bool } diff --git a/pdata/internal/generated_proto_spanevent.go b/pdata/internal/generated_proto_spanevent.go index a47082eae8b..56d1ea50b5a 100644 --- a/pdata/internal/generated_proto_spanevent.go +++ b/pdata/internal/generated_proto_spanevent.go @@ -18,9 +18,9 @@ import ( // SpanEvent is a time-stamped annotation of the span, consisting of user-supplied // text description and key-value pairs. See OTLP for event definition. type SpanEvent struct { - TimeUnixNano uint64 Name string Attributes []KeyValue + TimeUnixNano uint64 DroppedAttributesCount uint32 } diff --git a/pdata/internal/generated_proto_spanlink.go b/pdata/internal/generated_proto_spanlink.go index 32d3adf4c4b..dfd6acf178d 100644 --- a/pdata/internal/generated_proto_spanlink.go +++ b/pdata/internal/generated_proto_spanlink.go @@ -19,12 +19,12 @@ import ( // different trace. // See Link definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto type SpanLink struct { - TraceId TraceID - SpanId SpanID TraceState string Attributes []KeyValue DroppedAttributesCount uint32 Flags uint32 + TraceId TraceID + SpanId SpanID } var ( diff --git a/pdata/internal/generated_proto_summarydatapoint.go b/pdata/internal/generated_proto_summarydatapoint.go index 870c745c4fc..fd58b3c772a 100644 --- a/pdata/internal/generated_proto_summarydatapoint.go +++ b/pdata/internal/generated_proto_summarydatapoint.go @@ -19,11 +19,11 @@ import ( // SummaryDataPoint is a single data point in a timeseries that describes the time-varying values of a Summary of double values. type SummaryDataPoint struct { Attributes []KeyValue + QuantileValues []*SummaryDataPointValueAtQuantile StartTimeUnixNano uint64 TimeUnixNano uint64 Count uint64 Sum float64 - QuantileValues []*SummaryDataPointValueAtQuantile Flags uint32 } diff --git a/pdata/internal/generated_proto_tcpaddr.go b/pdata/internal/generated_proto_tcpaddr.go index fb903efabe7..08c350ffef6 100644 --- a/pdata/internal/generated_proto_tcpaddr.go +++ b/pdata/internal/generated_proto_tcpaddr.go @@ -15,9 +15,9 @@ import ( ) type TCPAddr struct { + Zone string IP []byte Port int64 - Zone string } var ( diff --git a/pdata/internal/generated_proto_udpaddr.go b/pdata/internal/generated_proto_udpaddr.go index 13e512a39c5..dd2883de59c 100644 --- a/pdata/internal/generated_proto_udpaddr.go +++ b/pdata/internal/generated_proto_udpaddr.go @@ -15,9 +15,9 @@ import ( ) type UDPAddr struct { + Zone string IP []byte Port int64 - Zone string } var (