Skip to content

Commit 2e57066

Browse files
authored
Merge branch 'main' into becky/multi-bearer-support
2 parents 8bcaf19 + 27d7b1f commit 2e57066

File tree

300 files changed

+6773
-3186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+6773
-3186
lines changed

.chloggen/envoyals-alpha.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: envoyalsreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Mark `envoyalsreceiver` as an alpha receiver.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [36464]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: telemetrygen
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Add support for `aggregation-temporality` flag in telemetrygen. Supported values (delta or cumulative)"
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [38073]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: processor/redaction
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Introduce 'blocked_key_patterns' parameter"
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [35830]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: redisreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Collect keyspace metrics even if reported dbs are nonsequential
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [38135]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
If a redis instance has no activity on a db, the db number is not reported in the keyspace metrics.
20+
This change ensures that the keyspace metrics are collected even if the reported dbs have gaps.
21+
22+
# If your change doesn't affect end users or the exported elements of any package,
23+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
24+
# Optional: The change log or logs in which this entry should be included.
25+
# e.g. '[user]' or '[user, api]'
26+
# Include 'user' if the change is relevant to end users.
27+
# Include 'api' if there is a change to a library API.
28+
# Default: '[user]'
29+
change_logs: []

.github/auto_assign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ assigneeGroups:
1414
- atoulme
1515
# - ChrsMark on leave
1616
- crobert-1
17-
- dashpole
17+
# - dashpole on leave
1818
- dehaansa
1919
- mwear
2020
- songy23

.github/workflows/build-and-test-arm.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ jobs:
6868
run: make install-tools
6969
- name: Run Unit Tests
7070
run: make -j2 gotest GROUP=${{ matrix.group }}
71+
- name: Run Unit Tests With JUnit and Coverage
72+
run: make gotest-with-junit-and-cover GROUP=${{ matrix.group }}
73+
- uses: actions/upload-artifact@v4
74+
with:
75+
name: test-results-${{ runner.os }}-${{ matrix.group }}
76+
path: internal/tools/testresults/
77+
retention-days: 4
7178
arm-unittest:
7279
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run ARM') || github.event_name == 'push' || github.event_name == 'merge_group') }}
7380
runs-on: ubuntu-24.04
@@ -84,3 +91,27 @@ jobs:
8491
echo "One or more matrix jobs failed."
8592
false
8693
fi
94+
95+
arm-flakytests-generate-issues:
96+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
97+
runs-on: ubuntu-24.04
98+
needs: [arm-unittest-matrix]
99+
steps:
100+
- uses: actions/checkout@v4
101+
- uses: actions/download-artifact@v4
102+
with:
103+
merge-multiple: true
104+
pattern: test-results-*
105+
path: ./internal/tools/testresults/
106+
- name: Install Tools
107+
run: make install-tools
108+
- name: Generate Issues
109+
run: |
110+
# We want to start by generating issues of a single component
111+
# As we mature the usage of issuegenerator, we can extend it to
112+
# generate issues for multiple components.
113+
#
114+
# We'll start with the hostmetricsreceiver.
115+
mkdir -p ./internal/tools/testresults/hostmetricsreceiver
116+
mv ./internal/tools/testresults/git.godevs.top-open-telemetry-opentelemetry-collector-contrib-receiver-hostmetricsreceiver-junit.xml ./internal/tools/testresults/hostmetricsreceiver/
117+
./tools/issuegenerator -path ./internal/tools/testresults/hostmetricsreceiver/

.github/workflows/build-and-test-darwin.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ jobs:
8282
run: unzip testbinaries.zip
8383
- name: Run Unit Tests
8484
run: make -j2 gorunbuilttest GROUP=cgo
85+
- name: Run Unit Tests With JUnit and Coverage
86+
run: make gotest-with-junit-and-cover
87+
- uses: actions/upload-artifact@v4
88+
with:
89+
name: test-results-${{ runner.os }}
90+
path: internal/tools/testresults/
91+
retention-days: 4
8592
darwin-unittest:
8693
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Darwin') || github.event_name == 'push' || github.event_name == 'merge_group') }}
8794
runs-on: macos-latest
@@ -98,3 +105,26 @@ jobs:
98105
echo "One or more matrix jobs failed."
99106
false
100107
fi
108+
darwin-flakytests-generate-issues:
109+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
110+
runs-on: ubuntu-24.04
111+
needs: [darwin-unittest-matrix]
112+
steps:
113+
- uses: actions/checkout@v4
114+
- uses: actions/download-artifact@v4
115+
with:
116+
merge-multiple: true
117+
pattern: test-results-*
118+
path: ./internal/tools/testresults/
119+
- name: Install Tools
120+
run: make install-tools
121+
- name: Generate Issues
122+
run: |
123+
# We want to start by generating issues of a single component
124+
# As we mature the usage of issuegenerator, we can extend it to
125+
# generate issues for multiple components.
126+
#
127+
# We'll start with the hostmetricsreceiver.
128+
mkdir -p ./internal/tools/testresults/hostmetricsreceiver
129+
mv ./internal/tools/testresults/git.godevs.top-open-telemetry-opentelemetry-collector-contrib-receiver-hostmetricsreceiver-junit.xml ./internal/tools/testresults/hostmetricsreceiver/
130+
./tools/issuegenerator -path ./internal/tools/testresults/hostmetricsreceiver/

.github/workflows/build-and-test-windows.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ jobs:
7979
run: make "$(${PWD} -replace '\\', '/')/.tools/gotestsum"
8080
- name: Run Unit tests
8181
run: make -j2 gotest GROUP=${{ matrix.group }}
82+
- name: Run Unit Tests With JUnit and Coverage
83+
run: make gotest-with-junit-and-cover GROUP=${{ matrix.group }}
84+
- uses: actions/upload-artifact@v4
85+
with:
86+
name: test-results-${{ runner.os }}-${{ matrix.group }}
87+
path: internal/tools/testresults/
88+
retention-days: 4
8289
windows-unittest:
8390
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }}
8491
runs-on: windows-latest
@@ -96,3 +103,27 @@ jobs:
96103
echo "One or more matrix jobs failed."
97104
false
98105
fi
106+
107+
windows-flakytests-generate-issues:
108+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
109+
runs-on: ubuntu-24.04
110+
needs: [windows-unittest-matrix]
111+
steps:
112+
- uses: actions/checkout@v4
113+
- uses: actions/download-artifact@v4
114+
with:
115+
merge-multiple: true
116+
pattern: test-results-*
117+
path: ./internal/tools/testresults/
118+
- name: Install Tools
119+
run: make install-tools
120+
- name: Generate Issues
121+
run: |
122+
# We want to start by generating issues of a single component
123+
# As we mature the usage of issuegenerator, we can extend it to
124+
# generate issues for multiple components.
125+
#
126+
# We'll start with the hostmetricsreceiver.
127+
mkdir -p ./internal/tools/testresults/hostmetricsreceiver
128+
mv ./internal/tools/testresults/git.godevs.top-open-telemetry-opentelemetry-collector-contrib-receiver-hostmetricsreceiver-junit.xml ./internal/tools/testresults/hostmetricsreceiver/
129+
./tools/issuegenerator -path ./internal/tools/testresults/hostmetricsreceiver/

.github/workflows/build-and-test.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jobs:
222222
git diff -s --exit-code || (echo 'Generated code is out of date, please run "make gendistributions" and commit the changes in this PR.' && exit 1)
223223
- name: CodeGen
224224
run: |
225-
make -j2 generate
225+
make generate
226226
if [[ -n $(git status -s) ]]; then
227227
echo 'Generated code is out of date, please run "make generate" and commit the changes in this PR.'
228228
exit 1
@@ -648,3 +648,27 @@ jobs:
648648
return
649649
}
650650
}
651+
652+
flakytests-generate-issues:
653+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
654+
runs-on: ubuntu-24.04
655+
needs: [unittest-matrix]
656+
steps:
657+
- uses: actions/checkout@v4
658+
- uses: actions/download-artifact@v4
659+
with:
660+
merge-multiple: true
661+
pattern: test-results-*
662+
path: ./internal/tools/testresults/
663+
- name: Install Tools
664+
run: make install-tools
665+
- name: Generate Issues
666+
run: |
667+
# We want to start by generating issues of a single component
668+
# As we mature the usage of issuegenerator, we can extend it to
669+
# generate issues for multiple components.
670+
#
671+
# We'll start with the hostmetricsreceiver.
672+
mkdir -p ./internal/tools/testresults/hostmetricsreceiver
673+
mv ./internal/tools/testresults/git.godevs.top-open-telemetry-opentelemetry-collector-contrib-receiver-hostmetricsreceiver-junit.xml ./internal/tools/testresults/hostmetricsreceiver/
674+
./tools/issuegenerator -path ./internal/tools/testresults/hostmetricsreceiver/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Approvers ([@open-telemetry/collector-contrib-approvers](https://github.com/orgs
9292
- [Antoine Toulme](https://github.com/atoulme), Splunk
9393
- [Christos Markou](https://github.com/ChrsMark), Elastic (on leave)
9494
- [Curtis Robert](https://github.com/crobert-1), Splunk
95-
- [David Ashpole](https://github.com/dashpole), Google
95+
- [David Ashpole](https://github.com/dashpole), Google (on leave)
9696
- [Matt Wear](https://github.com/mwear), Lightstep
9797
- [Sam DeHaan](https://github.com/dehaansa), Grafana Labs
9898
- [Ziqi Zhao](https://github.com/fatsheep9146), Alibaba

cmd/otelcontribcol/builder-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ receivers:
157157
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.120.1
158158
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.120.1
159159
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.120.1
160+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/envoyalsreceiver v0.120.1
160161
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/expvarreceiver v0.120.1
161162
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.120.1
162163
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.120.1
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package metrics
2+
3+
import (
4+
"fmt"
5+
6+
"go.opentelemetry.io/otel/sdk/metric/metricdata"
7+
)
8+
9+
type AggregationTemporality metricdata.Temporality
10+
11+
func (t *AggregationTemporality) Set(v string) error {
12+
switch v {
13+
case "delta":
14+
*t = AggregationTemporality(metricdata.DeltaTemporality)
15+
return nil
16+
case "cumulative":
17+
*t = AggregationTemporality(metricdata.CumulativeTemporality)
18+
return nil
19+
default:
20+
return fmt.Errorf(`temporality must be one of "delta" or "cumulative"`)
21+
}
22+
}
23+
24+
func (t *AggregationTemporality) String() string {
25+
return string(metricdata.Temporality(*t))
26+
}
27+
28+
func (t *AggregationTemporality) Type() string {
29+
return "temporality"
30+
}
31+
32+
// AsTemporality converts the AggregationTemporality to metricdata.Temporality
33+
func (t AggregationTemporality) AsTemporality() metricdata.Temporality {
34+
return metricdata.Temporality(t)
35+
}

cmd/telemetrygen/pkg/metrics/config.go

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ import (
77
"fmt"
88

99
"github.com/spf13/pflag"
10+
"go.opentelemetry.io/otel/sdk/metric/metricdata"
1011

1112
"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/common"
1213
)
1314

1415
// Config describes the test scenario.
1516
type Config struct {
1617
common.Config
17-
NumMetrics int
18-
MetricName string
19-
MetricType MetricType
20-
SpanID string
21-
TraceID string
18+
NumMetrics int
19+
MetricName string
20+
MetricType MetricType
21+
AggregationTemporality AggregationTemporality
22+
SpanID string
23+
TraceID string
2224
}
2325

2426
// NewConfig creates a new Config with default values.
@@ -34,11 +36,13 @@ func (c *Config) Flags(fs *pflag.FlagSet) {
3436

3537
fs.StringVar(&c.HTTPPath, "otlp-http-url-path", c.HTTPPath, "Which URL path to write to")
3638

37-
fs.Var(&c.MetricType, "metric-type", "Metric type enum. must be one of 'Gauge' or 'Sum'")
3839
fs.IntVar(&c.NumMetrics, "metrics", c.NumMetrics, "Number of metrics to generate in each worker (ignored if duration is provided)")
3940

4041
fs.StringVar(&c.TraceID, "trace-id", c.TraceID, "TraceID to use as exemplar")
4142
fs.StringVar(&c.SpanID, "span-id", c.SpanID, "SpanID to use as exemplar")
43+
44+
fs.Var(&c.MetricType, "metric-type", "Metric type enum. must be one of 'Gauge' or 'Sum'")
45+
fs.Var(&c.AggregationTemporality, "aggregation-temporality", "aggregation-temporality for metrics. Must be one of 'delta' or 'cumulative'")
4246
}
4347

4448
// SetDefaults sets the default values for the configuration
@@ -49,9 +53,12 @@ func (c *Config) SetDefaults() {
4953
c.HTTPPath = "/v1/metrics"
5054
c.NumMetrics = 1
5155

56+
c.MetricName = "gen"
5257
// Use Gauge as default metric type.
5358
c.MetricType = MetricTypeGauge
54-
c.MetricName = "gen"
59+
// Use cumulative temporality as default.
60+
c.AggregationTemporality = AggregationTemporality(metricdata.CumulativeTemporality)
61+
5562
c.TraceID = ""
5663
c.SpanID = ""
5764
}

0 commit comments

Comments
 (0)