Skip to content

Commit

Permalink
Merge branch 'main' into feat/export-telemetrygen-funcs-for-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Erog38 authored Jan 9, 2025
2 parents c4ecf5b + 1629eda commit a719b82
Show file tree
Hide file tree
Showing 86 changed files with 5,013 additions and 595 deletions.
27 changes: 27 additions & 0 deletions .chloggen/elasticsearchexporter_event-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: elasticsearchexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Handle `EventName` for log records in OTel mode

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

# (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/indexing-pkg-ottl.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: breaking

# 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: "Support dynamic indexing of maps and slices."

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

# (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: []
29 changes: 29 additions & 0 deletions .chloggen/routing-disconnect-matchonce-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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: routingconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change `match_once` parameter from `bool` to `*bool`.

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

# (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: |
Boolean values should still unmarshal successfully, but direct instantiation in code will fail.
The change allows us to check for usage and warn of the upcoming removal in v0.120.0.
# 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: [api]
28 changes: 28 additions & 0 deletions .chloggen/routing-disconnect-matchonce.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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: routingconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Disconnect `match_once` parameter from functionality.

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

# (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 parameter will be ignored, except to trigger a warning log about its upcoming removal in v0.120.0.
# 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/signaltometrics-corelogic.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: signaltometricsconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add core logic for the signal to metrics connector to make it functional.

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

# (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]
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cmd/githubgen/ @open-telemetry/collector-cont
cmd/opampsupervisor/ @open-telemetry/collector-contrib-approvers @evan-bradley @atoulme @tigrannajaryan
cmd/otelcontribcol/ @open-telemetry/collector-contrib-approvers
cmd/oteltestbedcol/ @open-telemetry/collector-contrib-approvers
cmd/telemetrygen/ @open-telemetry/collector-contrib-approvers @mx-psi @codeboten
cmd/telemetrygen/ @open-telemetry/collector-contrib-approvers @mx-psi @codeboten @Erog38

confmap/provider/aesprovider/ @open-telemetry/collector-contrib-approvers @djaglowski @shazlehu
confmap/provider/s3provider/ @open-telemetry/collector-contrib-approvers @Aneurysm9
Expand Down Expand Up @@ -149,7 +149,7 @@ pkg/datadog/ @open-telemetry/collector-cont
pkg/experimentalmetricmetadata/ @open-telemetry/collector-contrib-approvers @dmitryax
pkg/golden/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme
pkg/kafka/topic/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy
pkg/ottl/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley
pkg/ottl/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley @edmocosta
pkg/pdatatest/ @open-telemetry/collector-contrib-approvers @djaglowski @fatsheep9146
pkg/pdatautil/ @open-telemetry/collector-contrib-approvers @dmitryax
pkg/resourcetotelemetry/ @open-telemetry/collector-contrib-approvers @mx-psi
Expand Down Expand Up @@ -194,7 +194,7 @@ processor/schemaprocessor/ @open-telemetry/collector-cont
processor/spanprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken
processor/sumologicprocessor/ @open-telemetry/collector-contrib-approvers @rnishtala-sumo @chan-tim-sumo
processor/tailsamplingprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling
processor/transformprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley
processor/transformprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley @edmocosta

receiver/activedirectorydsreceiver/ @open-telemetry/collector-contrib-approvers @pjanotti
receiver/aerospikereceiver/ @open-telemetry/collector-contrib-approvers @antonblock
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
- cmd-0
- cmd-1
- other
runs-on: windows-latest
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }}
env:
# Limit memory usage via GC environment variables to avoid OOM on GH runners, especially for `cmd/otelcontribcol`,
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/e2e-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ jobs:
- run: echo $(./.github/workflows/scripts/is_changed_file_windows.sh ${{ github.event.pull_request.base.sha }} ${{ github.sha }} )

collector-build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
needs: [windows-file-changed]
if: ${{ github.actor != 'dependabot[bot]' && ((contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') || needs.windows-file-changed.outputs.changed == 'true') }}
steps:
Expand Down Expand Up @@ -65,7 +69,11 @@ jobs:
path: ./bin/*

supervisor-test:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }}
needs: [collector-build]
steps:
Expand Down Expand Up @@ -97,7 +105,11 @@ jobs:
go test -v --tags=e2e
windows-supervisor-service-test:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }}
needs: [collector-build]
steps:
Expand Down
2 changes: 1 addition & 1 deletion cmd/githubgen/codeowners.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sort"
"strings"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v68/github"
)

const allowlistHeader = `# Code generated by githubgen. DO NOT EDIT.
Expand Down
2 changes: 1 addition & 1 deletion cmd/githubgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/githubgen
go 1.22.0

require (
github.com/google/go-github/v67 v67.0.0
github.com/google/go-github/v68 v68.0.0
go.opentelemetry.io/collector/confmap v1.23.0
go.opentelemetry.io/collector/confmap/provider/fileprovider v1.23.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions cmd/githubgen/go.sum

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

1 change: 1 addition & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extensions:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension v0.117.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.117.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.117.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension v0.117.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension v0.117.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.117.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension v0.117.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/telemetrygen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| Stability | [development]: metrics, logs |
| | [alpha]: traces |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Acmd%2Ftelemetrygen%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Acmd%2Ftelemetrygen) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Acmd%2Ftelemetrygen%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Acmd%2Ftelemetrygen) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@codeboten](https://www.github.com/codeboten) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@codeboten](https://www.github.com/codeboten), [@Erog38](https://www.github.com/Erog38) |

[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development
[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha
Expand Down
2 changes: 1 addition & 1 deletion cmd/telemetrygen/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ status:
alpha: [traces]
development: [metrics, logs]
codeowners:
active: [mx-psi, codeboten]
active: [mx-psi, codeboten, Erog38]
8 changes: 2 additions & 6 deletions connector/routingconnector/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ type Config struct {
Table []RoutingTableItem `mapstructure:"table"`

// MatchOnce determines whether the connector matches multiple statements.
// Optional.
MatchOnce bool `mapstructure:"match_once"`
// Unused. Deprecated in v0.116.0. Will be removed in v0.120.0.
MatchOnce *bool `mapstructure:"match_once"`
}

// Validate checks if the processor configuration is valid.
Expand Down Expand Up @@ -77,10 +77,6 @@ func (c *Config) Validate() error {
return err
}
fallthrough
case "span", "metric", "datapoint", "log": // ok
if !c.MatchOnce {
return fmt.Errorf(`%q context is not supported with "match_once: false"`, item.Context)
}
default:
return errors.New("invalid context: " + item.Context)
}
Expand Down
68 changes: 0 additions & 68 deletions connector/routingconnector/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func TestLoadConfig(t *testing.T) {
configPath: filepath.Join("testdata", "config", "traces.yaml"),
id: component.NewIDWithName(metadata.Type, ""),
expected: &Config{
MatchOnce: true,
DefaultPipelines: []pipeline.ID{
pipeline.NewIDWithName(pipeline.SignalTraces, "otlp-all"),
},
Expand All @@ -53,7 +52,6 @@ func TestLoadConfig(t *testing.T) {
configPath: filepath.Join("testdata", "config", "metrics.yaml"),
id: component.NewIDWithName(metadata.Type, ""),
expected: &Config{
MatchOnce: true,
DefaultPipelines: []pipeline.ID{
pipeline.NewIDWithName(pipeline.SignalMetrics, "otlp-all"),
},
Expand All @@ -79,7 +77,6 @@ func TestLoadConfig(t *testing.T) {
configPath: filepath.Join("testdata", "config", "logs.yaml"),
id: component.NewIDWithName(metadata.Type, ""),
expected: &Config{
MatchOnce: true,
DefaultPipelines: []pipeline.ID{
pipeline.NewIDWithName(pipeline.SignalLogs, "otlp-all"),
},
Expand Down Expand Up @@ -221,70 +218,6 @@ func TestValidateConfig(t *testing.T) {
},
error: "invalid context: invalid",
},
{
name: "span context with match_once false",
config: &Config{
MatchOnce: false,
Table: []RoutingTableItem{
{
Context: "span",
Statement: `route() where attributes["attr"] == "acme"`,
Pipelines: []pipeline.ID{
pipeline.NewIDWithName(pipeline.SignalTraces, "otlp"),
},
},
},
},
error: `"span" context is not supported with "match_once: false"`,
},
{
name: "metric context with match_once false",
config: &Config{
MatchOnce: false,
Table: []RoutingTableItem{
{
Context: "metric",
Statement: `route() where attributes["attr"] == "acme"`,
Pipelines: []pipeline.ID{
pipeline.NewIDWithName(pipeline.SignalTraces, "otlp"),
},
},
},
},
error: `"metric" context is not supported with "match_once: false"`,
},
{
name: "datapoint context with match_once false",
config: &Config{
MatchOnce: false,
Table: []RoutingTableItem{
{
Context: "datapoint",
Statement: `route() where attributes["attr"] == "acme"`,
Pipelines: []pipeline.ID{
pipeline.NewIDWithName(pipeline.SignalTraces, "otlp"),
},
},
},
},
error: `"datapoint" context is not supported with "match_once: false"`,
},
{
name: "log context with match_once false",
config: &Config{
MatchOnce: false,
Table: []RoutingTableItem{
{
Context: "log",
Statement: `route() where attributes["attr"] == "acme"`,
Pipelines: []pipeline.ID{
pipeline.NewIDWithName(pipeline.SignalTraces, "otlp"),
},
},
},
},
error: `"log" context is not supported with "match_once: false"`,
},
{
name: "request context with statement",
config: &Config{
Expand Down Expand Up @@ -349,7 +282,6 @@ func withDefault(pipelines ...pipeline.ID) testConfigOption {

func testConfig(opts ...testConfigOption) *Config {
cfg := createDefaultConfig().(*Config)
cfg.MatchOnce = true
for _, opt := range opts {
opt(cfg)
}
Expand Down
Loading

0 comments on commit a719b82

Please sign in to comment.