@@ -410,48 +410,6 @@ func (j *ExporterDefaultHistogramAggregation) UnmarshalJSON(b []byte) error {
410410 return nil
411411}
412412
413- // UnmarshalJSON implements json.Unmarshaler.
414- func (j * OTLPHttpExporter ) UnmarshalJSON (b []byte ) error {
415- var raw map [string ]any
416- if err := json .Unmarshal (b , & raw ); err != nil {
417- return err
418- }
419- if _ , ok := raw ["endpoint" ]; raw != nil && ! ok {
420- return errors .New ("field endpoint in OTLP: required" )
421- }
422- type Plain OTLPHttpExporter
423- var plain Plain
424- if err := json .Unmarshal (b , & plain ); err != nil {
425- return err
426- }
427- if plain .Timeout != nil && 0 > * plain .Timeout {
428- return fmt .Errorf ("field %s: must be >= %v" , "timeout" , 0 )
429- }
430- * j = OTLPHttpExporter (plain )
431- return nil
432- }
433-
434- // UnmarshalJSON implements json.Unmarshaler.
435- func (j * OTLPGrpcExporter ) UnmarshalJSON (b []byte ) error {
436- var raw map [string ]any
437- if err := json .Unmarshal (b , & raw ); err != nil {
438- return err
439- }
440- if _ , ok := raw ["endpoint" ]; raw != nil && ! ok {
441- return errors .New ("field endpoint in OTLP: required" )
442- }
443- type Plain OTLPGrpcExporter
444- var plain Plain
445- if err := json .Unmarshal (b , & plain ); err != nil {
446- return err
447- }
448- if plain .Timeout != nil && 0 > * plain .Timeout {
449- return fmt .Errorf ("field %s: must be >= %v" , "timeout" , 0 )
450- }
451- * j = OTLPGrpcExporter (plain )
452- return nil
453- }
454-
455413// UnmarshalJSON implements json.Unmarshaler.
456414func (j * OpenTelemetryConfiguration ) UnmarshalJSON (b []byte ) error {
457415 var raw map [string ]any
@@ -661,6 +619,7 @@ func (j *OTLPHttpMetricExporter) UnmarshalJSON(b []byte) error {
661619 return nil
662620}
663621
622+ // UnmarshalJSON implements json.Unmarshaler.
664623func (j * SimpleLogRecordProcessor ) UnmarshalJSON (b []byte ) error {
665624 var raw map [string ]any
666625 if err := json .Unmarshal (b , & raw ); err != nil {
@@ -701,6 +660,8 @@ func (j *OTLPGrpcMetricExporter) UnmarshalJSON(b []byte) error {
701660 * j = OTLPGrpcMetricExporter (sh .Plain )
702661 return nil
703662}
663+
664+ // UnmarshalJSON implements json.Unmarshaler.
704665func (j * SimpleSpanProcessor ) UnmarshalJSON (b []byte ) error {
705666 var raw map [string ]any
706667 if err := json .Unmarshal (b , & raw ); err != nil {
@@ -772,6 +733,7 @@ func (j *OTLPHttpExporter) UnmarshalJSON(b []byte) error {
772733 return nil
773734}
774735
736+ // UnmarshalJSON implements json.Unmarshaler.
775737func (j * ZipkinSpanExporter ) UnmarshalJSON (b []byte ) error {
776738 var raw map [string ]any
777739 if err := json .Unmarshal (b , & raw ); err != nil {
@@ -815,6 +777,8 @@ func (j *OTLPGrpcExporter) UnmarshalJSON(b []byte) error {
815777 * j = OTLPGrpcExporter (sh .Plain )
816778 return nil
817779}
780+
781+ // UnmarshalJSON implements json.Unmarshaler.
818782func (j * AttributeNameValue ) UnmarshalJSON (b []byte ) error {
819783 var raw map [string ]any
820784 if err := json .Unmarshal (b , & raw ); err != nil {
0 commit comments