Skip to content

Commit

Permalink
Merge branch 'main' into exporter/prometheusremotewriteexporter/depre…
Browse files Browse the repository at this point in the history
…cate-created-metric
  • Loading branch information
dashpole authored Nov 18, 2024
2 parents 00e4e12 + b14856e commit bc48b6a
Show file tree
Hide file tree
Showing 843 changed files with 22,328 additions and 21,234 deletions.
27 changes: 27 additions & 0 deletions .chloggen/feat_githubgen_skipmembercheck.yaml
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: cmd/githubgen

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adds a flag to skip checking GitHub organization membership for CODEOWNERS

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36263]

# (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: [user]
27 changes: 27 additions & 0 deletions .chloggen/k8sattributes-block.yaml
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: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: processor/k8sattributes

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Block when starting until the metadata have been synced, to fix that some data couldn't be associated with metadata when the agent was just started.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [32556]

# (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: []
27 changes: 27 additions & 0 deletions .chloggen/otelarrow-admission.yaml
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: otelarrowreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Admission control improvements (LIFO); admission.waiter_limit is deprecated, replaced with admission.waiting_limit_mib.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36074]

# (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: []
31 changes: 31 additions & 0 deletions .chloggen/otelarrow-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: otelarrowreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: New admission control metrics are consistent across Arrow and OTLP data paths.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36334]

# (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: |
`otelcol_otelarrow_admission_in_flight_bytes` new, replaces `otelcol_otel_arrow_receiver_in_flight_bytes`
`otelcol_otelarrow_admission_waiting_bytes`: new, describes waiting requests
`otelcol_otel_arrow_receiver_in_flight_items`: removed
`otelcol_otel_arrow_receiver_in_flight_requests`: removed
# 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: [user]
27 changes: 27 additions & 0 deletions .chloggen/ottl-flatten-fix-top-level-slice-handling.yaml
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: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: pkg/ottl

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Respect the `depth` option when flattening slices using `flatten`

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36161]

# (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: The `depth` option is also now required to be at least `1`.

# 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: []
27 changes: 27 additions & 0 deletions .chloggen/prometheus-metric-types-help.yaml
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: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: prometheusexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: reject metrics whose types have changed, use pre-existing descriptions when help strings change

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [28617]

# (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: []
27 changes: 27 additions & 0 deletions .chloggen/span-rpocessor-keep-original-name.yaml
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: processor/spanprocessor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Add a new configuration option to keep the original span name when extracting attributes from the span name."

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36120]

# (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: [user]
27 changes: 27 additions & 0 deletions .chloggen/ta.yaml
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: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: prometheusreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Fix prometheus receiver to support static scrape config with Target Allocator"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [36062]

# (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: [user]
2 changes: 1 addition & 1 deletion cmd/githubgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $> GITHUB_TOKEN=<mypattoken> githubgen --folder . [--allowlist cmd/githubgen/all

## Checking codeowners against OpenTelemetry membership via Github API

To authenticate, set the environment variable `GITHUB_TOKEN` to a PAT token.
To authenticate, set the environment variable `GITHUB_TOKEN` to a PAT token. If a PAT is not available you can use the `--skipgithub` flag to avoid checking for membership in the GitHub organization.

For each codeowner, the script will check if the user is registered as a member of the OpenTelemetry organization.

Expand Down
1 change: 0 additions & 1 deletion cmd/githubgen/allowlist.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Caleb-Hurshman
emreyalvac
cheempz
jerrytfleung
driverpt
Expand Down
11 changes: 8 additions & 3 deletions cmd/githubgen/codeowners.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const distributionCodeownersHeader = `
`

type codeownersGenerator struct {
skipGithub bool
}

func (cg codeownersGenerator) generate(data *githubData) error {
Expand All @@ -91,7 +92,7 @@ func (cg codeownersGenerator) generate(data *githubData) error {
}
var missingCodeowners []string
var duplicateCodeowners []string
members, err := getGithubMembers()
members, err := cg.getGithubMembers()
if err != nil {
return err
}
Expand All @@ -109,7 +110,7 @@ func (cg codeownersGenerator) generate(data *githubData) error {
duplicateCodeowners = append(duplicateCodeowners, codeowner)
}
}
if len(missingCodeowners) > 0 {
if len(missingCodeowners) > 0 && !cg.skipGithub {
sort.Strings(missingCodeowners)
return fmt.Errorf("codeowners are not members: %s", strings.Join(missingCodeowners, ", "))
}
Expand Down Expand Up @@ -189,7 +190,11 @@ LOOP:
return nil
}

func getGithubMembers() (map[string]struct{}, error) {
func (cg codeownersGenerator) getGithubMembers() (map[string]struct{}, error) {
if cg.skipGithub {
// don't try to get organization members if no token is expected
return map[string]struct{}{}, nil
}
githubToken := os.Getenv("GITHUB_TOKEN")
if githubToken == "" {
return nil, fmt.Errorf("Set the environment variable `GITHUB_TOKEN` to a PAT token to authenticate")
Expand Down
6 changes: 3 additions & 3 deletions cmd/githubgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.22.0

require (
github.com/google/go-github/v66 v66.0.0
go.opentelemetry.io/collector/confmap v1.19.0
go.opentelemetry.io/collector/confmap/provider/fileprovider v1.19.0
go.opentelemetry.io/collector/confmap v1.19.1-0.20241115165626-8b99b8023ca3
go.opentelemetry.io/collector/confmap/provider/fileprovider v1.19.1-0.20241115165626-8b99b8023ca3
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -14,7 +14,7 @@ require (
github.com/google/go-querystring v1.1.0 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/knadh/koanf/providers/confmap v0.1.0 // indirect
github.com/knadh/koanf/v2 v2.1.1 // indirect
github.com/knadh/koanf/v2 v2.1.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions cmd/githubgen/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions cmd/githubgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,23 @@ type generator interface {
func main() {
folder := flag.String("folder", ".", "folder investigated for codeowners")
allowlistFilePath := flag.String("allowlist", "cmd/githubgen/allowlist.txt", "path to a file containing an allowlist of members outside the OpenTelemetry organization")
skipGithubCheck := flag.Bool("skipgithub", false, "skip checking GitHub membership check for CODEOWNERS generator")
flag.Parse()
var generators []generator
for _, arg := range flag.Args() {
switch arg {
case "issue-templates":
generators = append(generators, issueTemplatesGenerator{})
case "codeowners":
generators = append(generators, codeownersGenerator{})
generators = append(generators, codeownersGenerator{skipGithub: *skipGithubCheck})
case "distributions":
generators = append(generators, distributionsGenerator{})
default:
panic(fmt.Sprintf("Unknown generator: %s", arg))
}
}
if len(generators) == 0 {
generators = []generator{issueTemplatesGenerator{}, codeownersGenerator{}}
generators = []generator{issueTemplatesGenerator{}, codeownersGenerator{skipGithub: *skipGithubCheck}}
}
if err := run(*folder, *allowlistFilePath, generators); err != nil {
log.Fatal(err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/opampsupervisor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ require (
github.com/knadh/koanf/v2 v2.1.2
github.com/open-telemetry/opamp-go v0.15.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/config/configopaque v1.19.0
go.opentelemetry.io/collector/config/configtls v1.19.0
go.opentelemetry.io/collector/semconv v0.113.0
go.opentelemetry.io/collector/config/configopaque v1.19.1-0.20241115165626-8b99b8023ca3
go.opentelemetry.io/collector/config/configtls v1.19.1-0.20241115165626-8b99b8023ca3
go.opentelemetry.io/collector/semconv v0.113.1-0.20241115165626-8b99b8023ca3
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
golang.org/x/sys v0.26.0
Expand Down
Loading

0 comments on commit bc48b6a

Please sign in to comment.