Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
leartbeqiraj1 committed Nov 10, 2023
2 parents acd5f53 + 7d8eff8 commit 485a367
Show file tree
Hide file tree
Showing 620 changed files with 5,517 additions and 5,268 deletions.
27 changes: 27 additions & 0 deletions .chloggen/enable_syslog_exporter.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: syslogexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Promote syslogexporter to alpha and add it to otelcontribcol

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

# (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: []
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: receiver/mongodbatlasreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: emit resource attributes "`mongodb_atlas.region.name`" and "`mongodb_atlas.provider.name`" on metric scrape.

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

# (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: []
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: Install-WindowsFeature -name Web-Server -IncludeManagementTools
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-mod-cache
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -164,7 +164,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
unittest-matrix:
strategy:
matrix:
go-version: ["~1.21.3", "~1.20.10"] # 1.20 is interpreted as 1.2 without quotes
go-version: ["~1.21.4", "~1.20.11"] # 1.20 is interpreted as 1.2 without quotes
group:
- receiver-0
- receiver-1
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -337,7 +337,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -363,7 +363,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -566,7 +566,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Mkdir bin and dist
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false

# Initializes the CodeQL tools for scanning.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-dependabot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
run: sudo apt-get update; sudo apt-get install zsh
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Run dependabot-pr.sh
run: ./.github/workflows/scripts/dependabot-pr.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
path: opentelemetry-collector-contrib
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Prepare release for contrib
working-directory: opentelemetry-collector-contrib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prometheus-compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
path: opentelemetry-collector-contrib
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tidy-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version: ~1.20.10
go-version: ~1.20.11
cache: false
- name: Cache Go
id: go-cache
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ linters-settings:
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
rewrite-rules:
- pattern: interface{}
replacement: any

goimports:
# put imports beginning with prefix after 3rd-party packages;
Expand Down
1 change: 0 additions & 1 deletion cmd/checkapi/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ connector/servicegraphconnector
extension/encoding
extension/observer
processor/servicegraphprocessor
receiver/dockerstatsreceiver
receiver/journaldreceiver
receiver/kafkareceiver
receiver/windowseventlogreceiver
2 changes: 1 addition & 1 deletion cmd/configschema/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type CfgInfo struct {
// the component type, e.g. "otlpreceiver.Config"
Type component.Type
// an instance of the component's configuration struct
CfgInstance interface{}
CfgInstance any
}

// GetAllCfgInfos accepts a Factories struct, then creates and returns a CfgInfo
Expand Down
12 changes: 6 additions & 6 deletions cmd/configschema/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (

// Field holds attributes and subfields of a config struct.
type Field struct {
Name string `yaml:",omitempty"`
Type string `yaml:",omitempty"`
Kind string `yaml:",omitempty"`
Default interface{} `yaml:",omitempty"`
Doc string `yaml:",omitempty"`
Fields []*Field `yaml:",omitempty"`
Name string `yaml:",omitempty"`
Type string `yaml:",omitempty"`
Kind string `yaml:",omitempty"`
Default any `yaml:",omitempty"`
Doc string `yaml:",omitempty"`
Fields []*Field `yaml:",omitempty"`
}

// ReadFields accepts both a config struct's Value, as well as a DirResolver,
Expand Down
6 changes: 3 additions & 3 deletions cmd/configschema/fields_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

func TestReadFieldsWithDefaults(t *testing.T) {
defaults := map[string]interface{}{
defaults := map[string]any{
"one": "1",
"two": int64(2),
"three": uint64(3),
Expand Down Expand Up @@ -43,7 +43,7 @@ func TestReadFieldsWithDefaults(t *testing.T) {
}

func TestReadFieldsWithoutDefaults(t *testing.T) {
testReadFields(t, testStruct{}, map[string]interface{}{
testReadFields(t, testStruct{}, map[string]any{
"one": "",
"three": uint64(0),
"four": false,
Expand All @@ -53,7 +53,7 @@ func TestReadFieldsWithoutDefaults(t *testing.T) {
})
}

func testReadFields(t *testing.T, s testStruct, defaults map[string]interface{}) {
func testReadFields(t *testing.T, s testStruct, defaults map[string]any) {
root, _ := ReadFields(
reflect.ValueOf(s),
testDR(),
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestTypetoProjectPath_External(t *testing.T) {
assert.Equal(t, "", dir)
}

func testTypeToPackagePath(t *testing.T, v interface{}) string {
func testTypeToPackagePath(t *testing.T, v any) string {
packageDir, err := testDR().TypeToPackagePath(reflect.ValueOf(v).Type())
require.NoError(t, err)
return packageDir
Expand Down
2 changes: 1 addition & 1 deletion cmd/mdatagen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func templatize(tmplFile string, md metadata) *template.Template {
template.
New(filepath.Base(tmplFile)).
Option("missingkey=error").
Funcs(map[string]interface{}{
Funcs(map[string]any{
"publicVar": func(s string) (string, error) {
return formatIdentifier(s, true)
},
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ exporters:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter v0.88.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.88.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.88.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.88.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter v0.88.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.88.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.88.0
Expand Down Expand Up @@ -407,6 +408,7 @@ replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver => ../../extension/observer/ecsobserver
- github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor => ../../processor/remotetapprocessor
- github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor => ../../processor/sumologicprocessor
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter => ../../exporter/syslogexporter
# see https://github.com/mattn/go-ieproxy/issues/45
- github.com/mattn/go-ieproxy => github.com/mattn/go-ieproxy v0.0.1
- github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcontribcol/components.go

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

13 changes: 13 additions & 0 deletions cmd/otelcontribcol/exporters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter"
Expand Down Expand Up @@ -528,6 +529,18 @@ func TestDefaultExporters(t *testing.T) {
},
expectConsumeErr: true,
},
{
exporter: "syslog",
getConfigFn: func() component.Config {
cfg := expFactories["syslog"].CreateDefaultConfig().(*syslogexporter.Config)
cfg.Endpoint = "http://" + endpoint
// disable queue to validate passing the test data synchronously
cfg.QueueSettings.Enabled = false
cfg.RetrySettings.Enabled = false
return cfg
},
expectConsumeErr: true,
},
{
exporter: "tanzuobservability",
getConfigFn: func() component.Config {
Expand Down
Loading

0 comments on commit 485a367

Please sign in to comment.