diff --git a/cmd/mdatagen/metadata-schema.yaml b/cmd/mdatagen/metadata-schema.yaml index 60d165c616bb..879307fdd3da 100644 --- a/cmd/mdatagen/metadata-schema.yaml +++ b/cmd/mdatagen/metadata-schema.yaml @@ -24,6 +24,7 @@ status: codeowners: active: [string] emeritus: [string] + unsupported_platforms: [] # Optional: OTel Semantic Conventions version that will be associated with the scraped metrics. # This attribute should be set for metrics compliant with OTel Semantic Conventions. diff --git a/cmd/mdatagen/statusdata.go b/cmd/mdatagen/statusdata.go index 9ecf63d4257d..ebe60dc4b78e 100644 --- a/cmd/mdatagen/statusdata.go +++ b/cmd/mdatagen/statusdata.go @@ -31,11 +31,12 @@ type Codeowners struct { } type Status struct { - Stability map[string][]string `mapstructure:"stability"` - Distributions []string `mapstructure:"distributions"` - Class string `mapstructure:"class"` - Warnings []string `mapstructure:"warnings"` - Codeowners *Codeowners `mapstructure:"codeowners"` + Stability map[string][]string `mapstructure:"stability"` + Distributions []string `mapstructure:"distributions"` + Class string `mapstructure:"class"` + Warnings []string `mapstructure:"warnings"` + Codeowners *Codeowners `mapstructure:"codeowners"` + UnsupportedPlatforms []string `mapstructure:"unsupported_platforms"` } func (s *Status) SortedDistributions() []string { diff --git a/cmd/mdatagen/templates/component_test.go.tmpl b/cmd/mdatagen/templates/component_test.go.tmpl index 2f087060b2e7..218246b92de9 100644 --- a/cmd/mdatagen/templates/component_test.go.tmpl +++ b/cmd/mdatagen/templates/component_test.go.tmpl @@ -1,5 +1,9 @@ // Code generated by mdatagen. DO NOT EDIT. +{{ if len .Status.UnsupportedPlatforms -}} +//go:build {{ range $i, $v := .Status.UnsupportedPlatforms }}{{ if $i }} && {{ end }}!{{ . }}{{ end }} +{{- end }} + package {{ .Package }} import ( diff --git a/receiver/podmanreceiver/generated_component_test.go b/receiver/podmanreceiver/generated_component_test.go index befa02f0e9f0..17cfd0c5cfcd 100644 --- a/receiver/podmanreceiver/generated_component_test.go +++ b/receiver/podmanreceiver/generated_component_test.go @@ -1,5 +1,7 @@ // Code generated by mdatagen. DO NOT EDIT. +//go:build !windows + package podmanreceiver import ( diff --git a/receiver/podmanreceiver/metadata.yaml b/receiver/podmanreceiver/metadata.yaml index 4e83491c1fec..1cfb023e01b5 100644 --- a/receiver/podmanreceiver/metadata.yaml +++ b/receiver/podmanreceiver/metadata.yaml @@ -7,6 +7,7 @@ status: distributions: [contrib, observiq, sumo] codeowners: active: [rogercoll] + unsupported_platforms: [windows] tests: config: diff --git a/receiver/sshcheckreceiver/generated_component_test.go b/receiver/sshcheckreceiver/generated_component_test.go index 86f340723437..f74659058288 100644 --- a/receiver/sshcheckreceiver/generated_component_test.go +++ b/receiver/sshcheckreceiver/generated_component_test.go @@ -1,5 +1,7 @@ // Code generated by mdatagen. DO NOT EDIT. +//go:build !windows + package sshcheckreceiver import ( diff --git a/receiver/sshcheckreceiver/metadata.yaml b/receiver/sshcheckreceiver/metadata.yaml index ade33a5116fc..92846a93301b 100644 --- a/receiver/sshcheckreceiver/metadata.yaml +++ b/receiver/sshcheckreceiver/metadata.yaml @@ -7,6 +7,7 @@ status: distributions: [contrib, sumo] codeowners: active: [nslaughter, codeboten] + unsupported_platforms: [windows] resource_attributes: ssh.endpoint: