Skip to content

Commit

Permalink
Merge branch 'main' into cds-1320
Browse files Browse the repository at this point in the history
  • Loading branch information
daidokoro authored Aug 16, 2024
2 parents f21fb3e + eaa0888 commit e35ffd7
Show file tree
Hide file tree
Showing 625 changed files with 16,345 additions and 24,182 deletions.
27 changes: 27 additions & 0 deletions .chloggen/codeboten_scope-datadogreceiver.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: datadogreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "The scope name has been updated from `otelcol/datadogreceiver` to `github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver/internal/translator`"

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

# (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/dd-conn-bkt-size.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: datadogconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Add a config `traces::bucket_interval`"

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

# (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: "`traces::bucket_interval` specifies the time interval size of aggregation buckets that aggregate the Datadog trace metrics. It is also the time interval that Datadog trace metrics payloads are flushed to the pipeline. Default is 10s if unset."

# 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: []
13 changes: 13 additions & 0 deletions .chloggen/fix_supervisor-windows-signalling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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: cmd/opampsupervisor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Fix supervisor support for Windows."

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [34570]
27 changes: 27 additions & 0 deletions .chloggen/pkg-stanza-nil-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/stanza

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: fix nil value conversion

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

# (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: []
42 changes: 42 additions & 0 deletions .chloggen/vcenter-receiver_remove_extra_host_perf_metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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: vcenterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Several host performance metrics now return 1 data point per time series instead of 5.

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

# (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 5 data points previously sent represented consecutive 20s sampling periods. Depending on the collection interval
these could easily overlap. Sending just the latest of these data points is more in line with other performance metrics.
This change also fixes an issue with the googlecloud exporter seeing these datapoints as duplicates.
Following is the list of affected metrics which will now only report a single datapoint per set of unique attribute values.
- vcenter.host.cpu.reserved
- vcenter.host.disk.latency.avg
- vcenter.host.disk.latency.max
- vcenter.host.disk.throughput
- vcenter.host.network.packet.drop.rate
- vcenter.host.network.packet.error.rate
- vcenter.host.network.packet.rate
- vcenter.host.network.throughput
- vcenter.host.network.usage
# 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]
82 changes: 82 additions & 0 deletions .github/workflows/e2e-tests-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: e2e-tests-windows

on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
paths-ignore:
- "**/README.md"
pull_request:
paths-ignore:
- "**/README.md"
merge_group:

env:
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2

jobs:
collector-build:
runs-on: windows-latest
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
cache: false
- name: Cache Go
id: go-mod-cache
timeout-minutes: 25
uses: actions/cache@v4
with:
path: |
~\go\pkg\mod
~\AppData\Local\go-build
key: go-build-cache-${{ runner.os }}-${{ matrix.group }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-mod-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Build Collector
run: make otelcontribcol
- name: Upload Collector Binary
uses: actions/upload-artifact@v4
with:
name: collector-binary
path: ./bin/*

supervisor-test:
runs-on: windows-latest
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:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
cache: false
- name: Cache Go
id: go-mod-cache
timeout-minutes: 25
uses: actions/cache@v4
with:
path: |
~\go\pkg\mod
~\AppData\Local\go-build
key: go-build-cache-${{ runner.os }}-${{ matrix.group }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-mod-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Download Collector Binary
uses: actions/download-artifact@v4
with:
name: collector-binary
path: bin/
- name: Run opampsupervisor e2e tests
run: |
cd cmd/opampsupervisor
go test -v --tags=e2e
10 changes: 5 additions & 5 deletions cmd/githubgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ go 1.22.0

require (
github.com/google/go-github/v63 v63.0.0
go.opentelemetry.io/collector/confmap v0.107.0
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.107.0
go.opentelemetry.io/collector/confmap v0.107.1-0.20240816132030-9fd84668bb02
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.107.1-0.20240816132030-9fd84668bb02
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-version v1.7.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/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
go.opentelemetry.io/collector/featuregate v1.13.0 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.107.0 // indirect
go.opentelemetry.io/collector/featuregate v1.13.1-0.20240816132030-9fd84668bb02 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.107.1-0.20240816132030-9fd84668bb02 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
)
20 changes: 10 additions & 10 deletions cmd/githubgen/go.sum

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

12 changes: 10 additions & 2 deletions cmd/opampsupervisor/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func getSupervisorConfig(t *testing.T, configType string, extraConfigData map[st
if runtime.GOOS == "windows" {
extension = ".exe"
}

configData := map[string]string{
"goos": runtime.GOOS,
"goarch": runtime.GOARCH,
Expand All @@ -184,7 +185,10 @@ func getSupervisorConfig(t *testing.T, configType string, extraConfigData map[st
}
err = templ.Execute(&buf, configData)
require.NoError(t, err)
cfgFile, _ := os.CreateTemp(t.TempDir(), "config_*.yaml")
cfgFile, err := os.CreateTemp(t.TempDir(), "config_*.yaml")
require.NoError(t, err)
t.Cleanup(func() { cfgFile.Close() })

_, err = cfgFile.Write(buf.Bytes())
require.NoError(t, err)

Expand Down Expand Up @@ -617,11 +621,13 @@ func TestSupervisorReportsEffectiveConfig(t *testing.T) {
tempDir := t.TempDir()
testKeyFile, err := os.CreateTemp(tempDir, "confKey")
require.NoError(t, err)
t.Cleanup(func() { testKeyFile.Close() })

n, err := testKeyFile.Write([]byte(testKeyFile.Name()))
require.NoError(t, err)
require.NotZero(t, n)

colCfgTpl, err := os.ReadFile(path.Join("testdata", "collector", "split_config.yaml"))
colCfgTpl, err := os.ReadFile(filepath.Join("testdata", "collector", "split_config.yaml"))
require.NoError(t, err)

templ, err := template.New("").Parse(string(colCfgTpl))
Expand Down Expand Up @@ -770,9 +776,11 @@ func createSimplePipelineCollectorConf(t *testing.T) (*bytes.Buffer, []byte, *os
tempDir := t.TempDir()
inputFile, err := os.CreateTemp(tempDir, "input_*.yaml")
require.NoError(t, err)
t.Cleanup(func() { inputFile.Close() })

outputFile, err := os.CreateTemp(tempDir, "output_*.yaml")
require.NoError(t, err)
t.Cleanup(func() { outputFile.Close() })

colCfgTpl, err := os.ReadFile(path.Join(wd, "testdata", "collector", "simple_pipeline.yaml"))
require.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions cmd/opampsupervisor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ require (
github.com/knadh/koanf/v2 v2.1.1
github.com/open-telemetry/opamp-go v0.15.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/config/configopaque v1.13.0
go.opentelemetry.io/collector/config/configtls v1.13.0
go.opentelemetry.io/collector/semconv v0.107.0
go.opentelemetry.io/collector/config/configopaque v1.13.1-0.20240816132030-9fd84668bb02
go.opentelemetry.io/collector/config/configtls v1.13.1-0.20240816132030-9fd84668bb02
go.opentelemetry.io/collector/semconv v0.107.1-0.20240816132030-9fd84668bb02
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
golang.org/x/sys v0.21.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
)
Expand All @@ -32,5 +33,4 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.21.0 // indirect
)
12 changes: 6 additions & 6 deletions cmd/opampsupervisor/go.sum

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

Loading

0 comments on commit e35ffd7

Please sign in to comment.