-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmd/githubgen] add distribution reports (#29697)
**Description:** Adds a set of distribution reports that can be used to notify distribution maintainers of any changes to distributions. **Link to tracking Issue:** Fixes #28628
- Loading branch information
Showing
19 changed files
with
843 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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. filelogreceiver) | ||
component: githubgen | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Adds a set of distribution reports that can be used to notify distribution maintainers of any changes to distributions. | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [28628] | ||
|
||
# (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: | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# 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: [] |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"path/filepath" | ||
"sort" | ||
|
||
"gopkg.in/yaml.v3" | ||
) | ||
|
||
type distributionsGenerator struct { | ||
} | ||
|
||
type distOutput struct { | ||
Name string `yaml:"name"` | ||
URL string `yaml:"url"` | ||
Maintainers []string `yaml:"maintainers"` | ||
Components map[string][]string `yaml:"components"` | ||
} | ||
|
||
func (cg distributionsGenerator) generate(data *githubData) error { | ||
for _, dist := range data.distributions { | ||
components := map[string][]string{} | ||
for _, c := range data.components { | ||
inDistro := false | ||
for _, componentDistro := range c.Status.Distributions { | ||
if dist.Name == componentDistro { | ||
inDistro = true | ||
break | ||
} | ||
} | ||
if inDistro { | ||
array, ok := components[c.Status.Class] | ||
if !ok { | ||
array = []string{} | ||
} | ||
components[c.Status.Class] = append(array, c.Type) | ||
} | ||
} | ||
for _, comps := range components { | ||
sort.Strings(comps) | ||
} | ||
output := distOutput{ | ||
Name: dist.Name, | ||
URL: dist.URL, | ||
Maintainers: dist.Maintainers, | ||
Components: components, | ||
} | ||
b, err := yaml.Marshal(output) | ||
if err != nil { | ||
return nil | ||
} | ||
err = os.WriteFile(filepath.Join("reports", "distributions", fmt.Sprintf("%s.yaml", dist.Name)), b, 0600) | ||
if err != nil { | ||
return nil | ||
} | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# A collection of distributions that can be referenced in the metadata.yaml files. | ||
# The rules below apply to every distribution added to this list: | ||
# - The distribution must be open source. | ||
# - The link must point to a publicly accessible repository. | ||
- name: core | ||
url: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol | ||
- name: contrib | ||
url: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib | ||
- name: aws | ||
url: https://github.com/aws-observability/aws-otel-collector | ||
- name: grafana | ||
url: https://github.com/grafana/agent | ||
- name: observiq | ||
url: https://github.com/observIQ/observiq-otel-collector | ||
- name: redhat | ||
url: https://github.com/os-observability/redhat-opentelemetry-collector | ||
- name: splunk | ||
url: https://github.com/signalfx/splunk-otel-collector | ||
maintainers: | ||
- atoulme | ||
- dmitryax | ||
- hughesjj | ||
- rfitzpatrick | ||
- name: sumo | ||
url: https://github.com/SumoLogic/sumologic-otel-collector | ||
- name: liatrio | ||
url: https://github.com/liatrio/liatrio-otel-collector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: aws | ||
url: https://github.com/aws-observability/aws-otel-collector | ||
maintainers: [] | ||
components: | ||
exporter: | ||
- awsemf | ||
- awsxray | ||
- datadog | ||
- dynatrace | ||
- file | ||
- kafka | ||
- loadbalancing | ||
- logzio | ||
- prometheus | ||
- prometheusremotewrite | ||
- sapm | ||
- signalfx | ||
extension: | ||
- awsproxy | ||
- ecs_observer | ||
- health_check | ||
- pprof | ||
- sigv4auth | ||
processor: | ||
- attributes | ||
- cumulativetodelta | ||
- deltatorate | ||
- experimental_metricsgeneration | ||
- filter | ||
- groupbytrace | ||
- k8sattributes | ||
- metricstransform | ||
- probabilistic_sampler | ||
- resource | ||
- resourcedetection | ||
- span | ||
- tail_sampling | ||
receiver: | ||
- awscontainerinsightreceiver | ||
- awsecscontainermetrics | ||
- awsxray | ||
- jaeger | ||
- kafka | ||
- prometheus | ||
- statsd | ||
- zipkin |
Oops, something went wrong.