diff --git a/cmd/generator/tests/data.avdl b/cmd/generator/tests/data.avdl index 41d8078..2939e81 100644 --- a/cmd/generator/tests/data.avdl +++ b/cmd/generator/tests/data.avdl @@ -7,55 +7,55 @@ /** The time our edge ingested the event */ long ingestTime; - + /** SomeString is a string field. */ string? SomeString = null; - + /** SomeInt is an int64 field. */ long? SomeInt = null; - + /** SomeFloat is a float64 field. More comments. */ double? SomeFloat = null; - + /** SomeBool is a bool field. */ boolean? SomeBool = null; - + /** SomeStrings is a slice of strings. */ union {null, array} SomeStrings = null; - + /** SomeInts is a slice of int64. */ union {null, array} SomeInts = null; - + /** SomeFloats is a slice of float64. */ union {null, array} SomeFloats = null; - + /** SomeBools is a slice of bool. */ union {null, array} SomeBools = null; - + /** AnotherSomeString is a string field. */ string? AnotherSomeString = null; - + /** AnotherSomeInt is an int64 field. */ long? AnotherSomeInt = null; - + /** AnotherSomeFloat is a float64 field. */ double? AnotherSomeFloat = null; - + /** AnotherSomeBool is a bool field. */ boolean? AnotherSomeBool = null; - + /** AnotherSomeStrings is a slice of strings. */ union {null, array} AnotherSomeStrings = null; - + /** AnotherSomeInts is a slice of int64. */ union {null, array} AnotherSomeInts = null; - + /** AnotherSomeFloats is a slice of float64. */ union {null, array} AnotherSomeFloats = null; - + /** AnotherSomeBools is a slice of bool. */ union {null, array} AnotherSomeBools = null; - + } } diff --git a/cmd/generator/tests/data_attributes_generated.go b/cmd/generator/tests/data_attributes_generated.go index 62445cb..3cc527a 100644 --- a/cmd/generator/tests/data_attributes_generated.go +++ b/cmd/generator/tests/data_attributes_generated.go @@ -7,15 +7,15 @@ This is a generated file. DO NOT EDIT. import ( "go.opentelemetry.io/otel/attribute" - + "github.com/nginxinc/telemetry-exporter/pkg/telemetry" - + ) func (d *Data) Attributes() []attribute.KeyValue { var attrs []attribute.KeyValue attrs = append(attrs, attribute.String("dataType", "ngf-product-telemetry")) - + attrs = append(attrs, attribute.String("SomeString", d.SomeString)) attrs = append(attrs, attribute.Int64("SomeInt", d.SomeInt)) @@ -26,7 +26,7 @@ func (d *Data) Attributes() []attribute.KeyValue { attrs = append(attrs, attribute.Float64Slice("SomeFloats", d.SomeFloats)) attrs = append(attrs, attribute.BoolSlice("SomeBools", d.SomeBools)) attrs = append(attrs, d.AnotherData.Attributes()...) - + return attrs } diff --git a/cmd/generator/tests/subtests/anotherdata_attributes_generated.go b/cmd/generator/tests/subtests/anotherdata_attributes_generated.go index 755a4fa..cbecf03 100644 --- a/cmd/generator/tests/subtests/anotherdata_attributes_generated.go +++ b/cmd/generator/tests/subtests/anotherdata_attributes_generated.go @@ -7,9 +7,9 @@ This is a generated file. DO NOT EDIT. import ( "go.opentelemetry.io/otel/attribute" - + "github.com/nginxinc/telemetry-exporter/pkg/telemetry" - + ) func (d *AnotherData) Attributes() []attribute.KeyValue { @@ -23,7 +23,7 @@ func (d *AnotherData) Attributes() []attribute.KeyValue { attrs = append(attrs, attribute.Int64Slice("AnotherSomeInts", d.AnotherSomeInts)) attrs = append(attrs, attribute.Float64Slice("AnotherSomeFloats", d.AnotherSomeFloats)) attrs = append(attrs, attribute.BoolSlice("AnotherSomeBools", d.AnotherSomeBools)) - + return attrs } diff --git a/cmd/generator/tests/telemetry/moredata_attributes_generated.go b/cmd/generator/tests/telemetry/moredata_attributes_generated.go index a7280ec..30a435a 100644 --- a/cmd/generator/tests/telemetry/moredata_attributes_generated.go +++ b/cmd/generator/tests/telemetry/moredata_attributes_generated.go @@ -7,16 +7,16 @@ This is a generated file. DO NOT EDIT. import ( "go.opentelemetry.io/otel/attribute" - + ngxTelemetry "github.com/nginxinc/telemetry-exporter/pkg/telemetry" - + ) func (d *MoreData) Attributes() []attribute.KeyValue { var attrs []attribute.KeyValue attrs = append(attrs, attribute.String("StringField", d.StringField)) - + return attrs } diff --git a/pkg/telemetry/data_attributes_generated.go b/pkg/telemetry/data_attributes_generated.go index 56a7f9e..2e5fba3 100644 --- a/pkg/telemetry/data_attributes_generated.go +++ b/pkg/telemetry/data_attributes_generated.go @@ -7,7 +7,7 @@ This is a generated file. DO NOT EDIT. import ( "go.opentelemetry.io/otel/attribute" - + ) func (d *Data) Attributes() []attribute.KeyValue { @@ -21,7 +21,7 @@ func (d *Data) Attributes() []attribute.KeyValue { attrs = append(attrs, attribute.String("ClusterPlatform", d.ClusterPlatform)) attrs = append(attrs, attribute.String("InstallationID", d.InstallationID)) attrs = append(attrs, attribute.Int64("ClusterNodeCount", d.ClusterNodeCount)) - + return attrs }