Skip to content

Commit

Permalink
Merge branch 'main' into feature/opamp-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
portertech authored Oct 21, 2023
2 parents b581611 + 43e259f commit 5ab82c2
Show file tree
Hide file tree
Showing 80 changed files with 3,331 additions and 453 deletions.
27 changes: 27 additions & 0 deletions .chloggen/27651-make-resource-scope-more-flexible.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: datasetexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Make export of resources and scopes more flexible

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

# (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/add-json-encoding-extension.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: new_component

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add a new extension to support JSON encoding (only logs)

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

# (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/allow_prom_renaming.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: receiver/prometheus

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Warn instead of failing when users rename using metric_relabel_configs in the prometheus receiver

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

# (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/mx-psi_separate-module.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: cmd/telemetrygen

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

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

# (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/pkg-stanza-metadata-flush.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: deprecation

# 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: Deprecate 'flush.WithPeriod'. Use 'flush.WithFunc' instead.

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

# (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: [api]
27 changes: 27 additions & 0 deletions .chloggen/ptracetest-ignore-attribute-value.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: pkg/pdatatest

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "support ignore span attribute value in span comparisons for ptracetest"

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

# (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/signalfx-exporter-add-dim-timeout.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: signalfxexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add an option to control the dimension client timeout

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

# (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: []
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exporter/fileexporter/ @open-te
exporter/googlecloudexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95
exporter/googlecloudpubsubexporter/ @open-telemetry/collector-contrib-approvers @alexvanboxel
exporter/googlemanagedprometheusexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @damemi @psx95
exporter/honeycombmarkerexporter/ @open-telemetry/collector-contrib-approvers @fchikwekwe @TylerHelmuth
exporter/honeycombmarkerexporter/ @open-telemetry/collector-contrib-approvers @fchikwekwe @TylerHelmuth
exporter/influxdbexporter/ @open-telemetry/collector-contrib-approvers @jacobmarble
exporter/instanaexporter/ @open-telemetry/collector-contrib-approvers @jpkrohling @hickeyma
exporter/kafkaexporter/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy
Expand Down Expand Up @@ -92,6 +92,7 @@ extension/awsproxy/ @open-te
extension/basicauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling @svrakitin @frzifus
extension/bearertokenauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling @pavankrish123 @frzifus
extension/encoding/jaegerencodingextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @atoulme
extension/encoding/jsonlogencodingextension/ @open-telemetry/collector-contrib-approvers @VihasMakwana @atoulme
extension/encoding/textencodingextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @atoulme
extension/headerssetterextension/ @open-telemetry/collector-contrib-approvers @jpkrohling
extension/healthcheckextension/ @open-telemetry/collector-contrib-approvers @jpkrohling
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ body:
- extension/basicauth
- extension/bearertokenauth
- extension/encoding/jaegerencoding
- extension/encoding/jsonlogencoding
- extension/encoding/textencoding
- extension/headerssetter
- extension/healthcheck
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ body:
- extension/basicauth
- extension/bearertokenauth
- extension/encoding/jaegerencoding
- extension/encoding/jsonlogencoding
- extension/encoding/textencoding
- extension/headerssetter
- extension/healthcheck
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ body:
- extension/basicauth
- extension/bearertokenauth
- extension/encoding/jaegerencoding
- extension/encoding/jsonlogencoding
- extension/encoding/textencoding
- extension/headerssetter
- extension/healthcheck
Expand Down
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ updates:
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/cmd/configschema"
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/cmd/otelcontribcol"
schedule:
Expand Down Expand Up @@ -267,11 +272,6 @@ updates:
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/exporter/syslogexporter"
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/exporter/tanzuobservabilityexporter"
schedule:
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ run:
skip-dirs:
- third_party
- local
- cmd/otelcontribcol
- cmd/oteltestbedcol

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
Expand Down
61 changes: 44 additions & 17 deletions cmd/otelcontribcol/processors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import (
"go.opentelemetry.io/collector/processor/processortest"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor"
remoteobserverprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/remoteobserverprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/remoteobserverprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor"
)
Expand Down Expand Up @@ -183,25 +184,51 @@ func verifyProcessorLifecycle(t *testing.T, factory processor.Factory, getConfig
getConfigFn = factory.CreateDefaultConfig
}

createFns := []createProcessorFn{
wrapCreateLogsProc(factory),
wrapCreateTracesProc(factory),
wrapCreateMetricsProc(factory),
createFns := map[component.DataType]createProcessorFn{
component.DataTypeLogs: wrapCreateLogsProc(factory),
component.DataTypeTraces: wrapCreateTracesProc(factory),
component.DataTypeMetrics: wrapCreateMetricsProc(factory),
}

for _, createFn := range createFns {
firstExp, err := createFn(ctx, processorCreationSet, getConfigFn())
if errors.Is(err, component.ErrDataTypeIsNotSupported) {
continue
for i := 0; i < 2; i++ {
procs := make(map[component.DataType]component.Component)
for dataType, createFn := range createFns {
proc, err := createFn(ctx, processorCreationSet, getConfigFn())
if errors.Is(err, component.ErrDataTypeIsNotSupported) {
continue
}
require.NoError(t, err)
procs[dataType] = proc
require.NoError(t, proc.Start(ctx, host))
}
for dataType, proc := range procs {
assert.NotPanics(t, func() {
switch dataType {
case component.DataTypeLogs:
logsProc := proc.(processor.Logs)
logs := testdata.GenerateLogsManyLogRecordsSameResource(2)
if !logsProc.Capabilities().MutatesData {
logs.MarkReadOnly()
}
assert.NoError(t, logsProc.ConsumeLogs(ctx, logs))
case component.DataTypeMetrics:
metricsProc := proc.(processor.Metrics)
metrics := testdata.GenerateMetricsTwoMetrics()
if !metricsProc.Capabilities().MutatesData {
metrics.MarkReadOnly()
}
assert.NoError(t, metricsProc.ConsumeMetrics(ctx, metrics))
case component.DataTypeTraces:
tracesProc := proc.(processor.Traces)
traces := testdata.GenerateTracesTwoSpansSameResource()
if !tracesProc.Capabilities().MutatesData {
traces.MarkReadOnly()
}
assert.NoError(t, tracesProc.ConsumeTraces(ctx, traces))
}
})
require.NoError(t, proc.Shutdown(ctx))
}
require.NoError(t, err)
require.NoError(t, firstExp.Start(ctx, host))
require.NoError(t, firstExp.Shutdown(ctx))

secondExp, err := createFn(ctx, processorCreationSet, getConfigFn())
require.NoError(t, err)
require.NoError(t, secondExp.Start(ctx, host))
require.NoError(t, secondExp.Shutdown(ctx))
}
}

Expand Down
Loading

0 comments on commit 5ab82c2

Please sign in to comment.