Skip to content

Commit 296b80d

Browse files
committed
fix: convert space indentation to tabs in upstream-added template files
Go template files in cmd/mdatagen/internal/templates/ were using 4-space indentation in code blocks generated by upstream additions. Convert all leading 4-space groups to tabs to match Go formatting conventions and make the templates consistent with gofmt output. Assisted-by: Claude Sonnet 4.6
1 parent 52e6bf4 commit 296b80d

6 files changed

Lines changed: 718 additions & 718 deletions

File tree

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,122 @@
11
{{- if .Metrics }}
22
metrics_config:
3-
description: MetricsConfig provides config for {{ .Type }} metrics.
4-
type: object
5-
properties:
6-
{{- range $name, $metric := .Metrics }}
7-
{{- $metricReag := hasAggregatableAttributes $metric.Attributes }}
8-
{{ $name }}:
9-
description: "{{ $name.Render }}MetricConfig provides config for the {{ $name }} metric."
10-
type: object
11-
properties:
12-
enabled:
13-
type: boolean
14-
default: {{ $metric.Enabled }}
15-
{{- if $metricReag }}
16-
aggregation_strategy:
17-
type: string
18-
enum:
19-
- "sum"
20-
- "avg"
21-
- "min"
22-
- "max"
23-
{{- if eq $metric.Data.Type "Sum" }}
24-
default: "sum"
25-
{{- else }}
26-
default: "avg"
27-
{{- end }}
28-
attributes:
29-
type: array
30-
items:
31-
type: string
32-
enum:
33-
{{- range $metric.Attributes }}
34-
- "{{ (attributeInfo .).Name }}"
35-
{{- end }}
36-
default:
37-
{{- range $metric.Attributes }}
38-
{{- if (attributeInfo .).IsNotOptIn }}
39-
- "{{ (attributeInfo .).Name }}"
40-
{{- end }}
41-
{{- end }}
42-
{{- end }}
43-
{{- end }}
3+
description: MetricsConfig provides config for {{ .Type }} metrics.
4+
type: object
5+
properties:
6+
{{- range $name, $metric := .Metrics }}
7+
{{- $metricReag := hasAggregatableAttributes $metric.Attributes }}
8+
{{ $name }}:
9+
description: "{{ $name.Render }}MetricConfig provides config for the {{ $name }} metric."
10+
type: object
11+
properties:
12+
enabled:
13+
type: boolean
14+
default: {{ $metric.Enabled }}
15+
{{- if $metricReag }}
16+
aggregation_strategy:
17+
type: string
18+
enum:
19+
- "sum"
20+
- "avg"
21+
- "min"
22+
- "max"
23+
{{- if eq $metric.Data.Type "Sum" }}
24+
default: "sum"
25+
{{- else }}
26+
default: "avg"
27+
{{- end }}
28+
attributes:
29+
type: array
30+
items:
31+
type: string
32+
enum:
33+
{{- range $metric.Attributes }}
34+
- "{{ (attributeInfo .).Name }}"
35+
{{- end }}
36+
default:
37+
{{- range $metric.Attributes }}
38+
{{- if (attributeInfo .).IsNotOptIn }}
39+
- "{{ (attributeInfo .).Name }}"
40+
{{- end }}
41+
{{- end }}
42+
{{- end }}
43+
{{- end }}
4444
{{- end }}
4545
{{- if .Events }}
4646
events_config:
47-
description: EventsConfig provides config for {{ .Type }} events.
48-
type: object
49-
properties:
50-
{{- range $name, $event := .Events }}
51-
{{ $name }}:
52-
description: EventConfig provides common config for a {{ $name }} event.
53-
type: object
54-
properties:
55-
enabled:
56-
type: boolean
57-
default: {{ $event.Enabled }}
58-
{{- end }}
47+
description: EventsConfig provides config for {{ .Type }} events.
48+
type: object
49+
properties:
50+
{{- range $name, $event := .Events }}
51+
{{ $name }}:
52+
description: EventConfig provides common config for a {{ $name }} event.
53+
type: object
54+
properties:
55+
enabled:
56+
type: boolean
57+
default: {{ $event.Enabled }}
58+
{{- end }}
5959
{{- end }}
6060
{{- if .ResourceAttributes }}
6161
resource_attributes_config:
62-
description: ResourceAttributesConfig provides config for {{ .Type }} resource attributes.
63-
type: object
64-
properties:
65-
{{- range $name, $attr := .ResourceAttributes }}
66-
{{ $name }}:
67-
description: ResourceAttributeConfig provides common config for a {{ $name }} resource attribute.
68-
type: object
69-
properties:
70-
enabled:
71-
type: boolean
72-
default: {{ $attr.Enabled }}
73-
{{- if $.Metrics }}
74-
metrics_include:
75-
description: "Experimental: MetricsInclude defines a list of filters for attribute values. If the list is not empty, only metrics with matching resource attribute values will be emitted."
76-
type: array
77-
items:
78-
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
79-
metrics_exclude:
80-
description: "Experimental: MetricsExclude defines a list of filters for attribute values. If the list is not empty, metrics with matching resource attribute values will not be emitted. MetricsInclude has higher priority than MetricsExclude."
81-
type: array
82-
items:
83-
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
84-
{{- end }}
85-
{{- if $.Events }}
86-
events_include:
87-
description: "Experimental: EventsInclude defines a list of filters for attribute values. If the list is not empty, only events with matching resource attribute values will be emitted."
88-
type: array
89-
items:
90-
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
91-
events_exclude:
92-
description: "Experimental: EventsExclude defines a list of filters for attribute values. If the list is not empty, events with matching resource attribute values will not be emitted. EventsInclude has higher priority than EventsExclude."
93-
type: array
94-
items:
95-
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
96-
{{- end }}
97-
{{- end }}
62+
description: ResourceAttributesConfig provides config for {{ .Type }} resource attributes.
63+
type: object
64+
properties:
65+
{{- range $name, $attr := .ResourceAttributes }}
66+
{{ $name }}:
67+
description: ResourceAttributeConfig provides common config for a {{ $name }} resource attribute.
68+
type: object
69+
properties:
70+
enabled:
71+
type: boolean
72+
default: {{ $attr.Enabled }}
73+
{{- if $.Metrics }}
74+
metrics_include:
75+
description: "Experimental: MetricsInclude defines a list of filters for attribute values. If the list is not empty, only metrics with matching resource attribute values will be emitted."
76+
type: array
77+
items:
78+
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
79+
metrics_exclude:
80+
description: "Experimental: MetricsExclude defines a list of filters for attribute values. If the list is not empty, metrics with matching resource attribute values will not be emitted. MetricsInclude has higher priority than MetricsExclude."
81+
type: array
82+
items:
83+
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
84+
{{- end }}
85+
{{- if $.Events }}
86+
events_include:
87+
description: "Experimental: EventsInclude defines a list of filters for attribute values. If the list is not empty, only events with matching resource attribute values will be emitted."
88+
type: array
89+
items:
90+
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
91+
events_exclude:
92+
description: "Experimental: EventsExclude defines a list of filters for attribute values. If the list is not empty, events with matching resource attribute values will not be emitted. EventsInclude has higher priority than EventsExclude."
93+
type: array
94+
items:
95+
$ref: {{ schemaRef "go.opentelemetry.io/collector/filter.config" }}
96+
{{- end }}
97+
{{- end }}
9898
{{- end }}
9999
{{- if .Metrics }}
100100
metrics_builder_config:
101-
description: MetricsBuilderConfig is a configuration for {{ .Type }} metrics builder.
102-
type: object
103-
properties:
104-
metrics:
105-
$ref: metrics_config
106-
{{- if .ResourceAttributes }}
107-
resource_attributes:
108-
$ref: resource_attributes_config
109-
{{- end }}
101+
description: MetricsBuilderConfig is a configuration for {{ .Type }} metrics builder.
102+
type: object
103+
properties:
104+
metrics:
105+
$ref: metrics_config
106+
{{- if .ResourceAttributes }}
107+
resource_attributes:
108+
$ref: resource_attributes_config
109+
{{- end }}
110110
{{- end }}
111111
{{- if .Events }}
112112
logs_builder_config:
113-
description: LogsBuilderConfig is a configuration for {{ .Type }} logs builder.
114-
type: object
115-
properties:
116-
events:
117-
$ref: events_config
118-
{{- if .ResourceAttributes }}
119-
resource_attributes:
120-
$ref: resource_attributes_config
121-
{{- end }}
113+
description: LogsBuilderConfig is a configuration for {{ .Type }} logs builder.
114+
type: object
115+
properties:
116+
events:
117+
$ref: events_config
118+
{{- if .ResourceAttributes }}
119+
resource_attributes:
120+
$ref: resource_attributes_config
121+
{{- end }}
122122
{{- end }}

0 commit comments

Comments
 (0)