Skip to content

Commit

Permalink
Merge branch 'main' into fix-issue-open-telemetry#11820
Browse files Browse the repository at this point in the history
  • Loading branch information
codeboten authored Dec 13, 2024
2 parents 9a4d63d + 63d83d5 commit c9ce37f
Show file tree
Hide file tree
Showing 177 changed files with 856 additions and 525 deletions.
20 changes: 20 additions & 0 deletions .chloggen/deprecate-consumerprofiles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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. otlpreceiver)
component: consumer

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Deprecate consumerprofiles module in favor of xconsumer to allow adding more experimental data types.

# One or more tracking issues or pull requests related to the change
issues: [11778]

# 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]
35 changes: 18 additions & 17 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@
* @open-telemetry/collector-approvers

# List all maintainers individually so all of them are notified
.github/CODEOWNERS @codeboten @BogdanDrutu @dmitryax @mx-psi
docs/rfc @codeboten @BogdanDrutu @dmitryax @mx-psi
.github/CODEOWNERS @open-telemetry/collector-approvers @codeboten @BogdanDrutu @dmitryax @mx-psi
docs/rfc @open-telemetry/collector-approvers @codeboten @BogdanDrutu @dmitryax @mx-psi

confmap/ @mx-psi @evan-bradley
exporter/debugexporter @andrzej-stencel
exporter/exporterhelper @BogdanDrutu @dmitryax
exporter/nopexporter @evan-bradley
pdata/ @BogdanDrutu @dmitryax
receiver/nopreceiver @evan-bradley
service/internal/graph @djaglowski
extension/experimental/storage @swiatekm
confmap/ @open-telemetry/collector-approvers @mx-psi @evan-bradley
exporter/debugexporter @open-telemetry/collector-approvers @andrzej-stencel
exporter/exporterhelper @open-telemetry/collector-approvers @BogdanDrutu @dmitryax
exporter/nopexporter @open-telemetry/collector-approvers @evan-bradley
pdata/ @open-telemetry/collector-approvers @BogdanDrutu @dmitryax
receiver/nopreceiver @open-telemetry/collector-approvers @evan-bradley
service/internal/graph @open-telemetry/collector-approvers @djaglowski
extension/experimental/storage @open-telemetry/collector-approvers @swiatekm

# Profiling-related modules
pdata/pprofile @mx-psi @dmathieu
consumer/consumerprofiles @mx-psi @dmathieu
connector/connectorprofiles @mx-psi @dmathieu
exporter/exporterhelper/exporterhelperprofiles @mx-psi @dmathieu
exporter/exporterprofiles @mx-psi @dmathieu
processor/processorprofiles @mx-psi @dmathieu
receiver/receiverprofiles @mx-psi @dmathieu
pdata/pprofile @open-telemetry/collector-approvers @mx-psi @dmathieu
consumer/consumerprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu
consumer/xconsumer @open-telemetry/collector-approvers @mx-psi @dmathieu
connector/connectorprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu
exporter/exporterhelper/exporterhelperprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu
exporter/exporterprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu
processor/processorprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu
receiver/receiverprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu
3 changes: 2 additions & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ jobs:
# - Run make prepare-release PREVIOUS_VERSION=0.52.0 RELEASE_CANDIDATE=0.53.0 MODSET=beta
- name: Prepare release for core
env:
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
BOT_GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: open-telemetry/opentelemetry-collector
CANDIDATE_BETA: ${{ inputs.candidate-beta }}
CANDIDATE_STABLE: ${{ inputs.candidate-stable }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/scripts/release-prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ if [ "${CANDIDATE_BETA}" != "" ]; then
fi
git push origin "${BRANCH}"

# The `release:merge-freeze` label will cause the `check-merge-freeze` workflow to fail, enforcing the freeze.
gh pr create --title "[chore] Prepare release ${RELEASE_VERSION}" --label release:merge-freeze --body "
# Use OpenTelemetryBot account to create PR, allowing workflows to run
PR=$(GITHUB_TOKEN="$BOT_GITHUB_TOKEN" gh pr create --title "[chore] Prepare release ${RELEASE_VERSION}" --body "
The following commands were run to prepare this release:
${COMMANDS}
"
")

# The `release:merge-freeze` label will cause the `check-merge-freeze` workflow to fail, enforcing the freeze.
# The bot does not have permissions to add labels, so this is done using the CI action token.
gh pr edit "$PR" --add-label release:merge-freeze || echo "Failed to add merge-freeze label"
2 changes: 1 addition & 1 deletion cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var replaceModules = []string{
"/consumer",
"/consumer/consumererror",
"/consumer/consumererror/consumererrorprofiles",
"/consumer/consumerprofiles",
"/consumer/xconsumer",
"/consumer/consumertest",
"/connector",
"/connector/connectortest",
Expand Down
4 changes: 2 additions & 2 deletions cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
go.opentelemetry.io/collector/component/componentstatus v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/xconsumer v0.115.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.115.0 // indirect
go.opentelemetry.io/collector/pdata/testdata v0.115.0 // indirect
go.opentelemetry.io/collector/pipeline v0.115.0 // indirect
Expand Down Expand Up @@ -97,7 +97,7 @@ retract (

replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile

replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles
replace go.opentelemetry.io/collector/consumer/xconsumer => ../../consumer/xconsumer

replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest

Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcorecol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ replaces:
- go.opentelemetry.io/collector/confmap/provider/httpsprovider => ../../confmap/provider/httpsprovider
- go.opentelemetry.io/collector/confmap/provider/yamlprovider => ../../confmap/provider/yamlprovider
- go.opentelemetry.io/collector/consumer => ../../consumer
- go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles
- go.opentelemetry.io/collector/consumer/xconsumer => ../../consumer/xconsumer
- go.opentelemetry.io/collector/consumer/consumererror => ../../consumer/consumererror
- go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles => ../../consumer/consumererror/consumererrorprofiles
- go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest
Expand Down
4 changes: 2 additions & 2 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ require (
go.opentelemetry.io/collector/consumer v1.21.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumertest v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/xconsumer v0.115.0 // indirect
go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/exporter/exportertest v0.115.0 // indirect
Expand Down Expand Up @@ -203,7 +203,7 @@ replace go.opentelemetry.io/collector/confmap/provider/yamlprovider => ../../con

replace go.opentelemetry.io/collector/consumer => ../../consumer

replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles
replace go.opentelemetry.io/collector/consumer/xconsumer => ../../consumer/xconsumer

replace go.opentelemetry.io/collector/consumer/consumererror => ../../consumer/consumererror

Expand Down
6 changes: 6 additions & 0 deletions connector/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,29 +228,35 @@ type nopConnector struct {
func createTracesToTraces(context.Context, Settings, component.Config, consumer.Traces) (Traces, error) {
return nopInstance, nil
}

func createTracesToMetrics(context.Context, Settings, component.Config, consumer.Metrics) (Traces, error) {
return nopInstance, nil
}

func createTracesToLogs(context.Context, Settings, component.Config, consumer.Logs) (Traces, error) {
return nopInstance, nil
}

func createMetricsToTraces(context.Context, Settings, component.Config, consumer.Traces) (Metrics, error) {
return nopInstance, nil
}

func createMetricsToMetrics(context.Context, Settings, component.Config, consumer.Metrics) (Metrics, error) {
return nopInstance, nil
}

func createMetricsToLogs(context.Context, Settings, component.Config, consumer.Logs) (Metrics, error) {
return nopInstance, nil
}

func createLogsToTraces(context.Context, Settings, component.Config, consumer.Traces) (Logs, error) {
return nopInstance, nil
}

func createLogsToMetrics(context.Context, Settings, component.Config, consumer.Metrics) (Logs, error) {
return nopInstance, nil
}

func createLogsToLogs(context.Context, Settings, component.Config, consumer.Logs) (Logs, error) {
return nopInstance, nil
}
30 changes: 15 additions & 15 deletions connector/connectorprofiles/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ import (
"go.opentelemetry.io/collector/connector"
"go.opentelemetry.io/collector/connector/internal"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/consumer/consumerprofiles"
"go.opentelemetry.io/collector/consumer/xconsumer"
"go.opentelemetry.io/collector/pipeline"
"go.opentelemetry.io/collector/pipeline/pipelineprofiles"
)

type Factory interface {
connector.Factory

CreateTracesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (connector.Traces, error)
CreateMetricsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (connector.Metrics, error)
CreateLogsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (connector.Logs, error)
CreateTracesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (connector.Traces, error)
CreateMetricsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (connector.Metrics, error)
CreateLogsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (connector.Logs, error)

TracesToProfilesStability() component.StabilityLevel
MetricsToProfilesStability() component.StabilityLevel
LogsToProfilesStability() component.StabilityLevel

CreateProfilesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (Profiles, error)
CreateProfilesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (Profiles, error)
CreateProfilesToTraces(ctx context.Context, set connector.Settings, cfg component.Config, next consumer.Traces) (Profiles, error)
CreateProfilesToMetrics(ctx context.Context, set connector.Settings, cfg component.Config, next consumer.Metrics) (Profiles, error)
CreateProfilesToLogs(ctx context.Context, set connector.Settings, cfg component.Config, next consumer.Logs) (Profiles, error)
Expand All @@ -39,7 +39,7 @@ type Factory interface {

// A Profiles connector acts as an exporter from a profiles pipeline and a receiver
// to one or more traces, metrics, logs, or profiles pipelines.
// Profiles feeds a consumer.Traces, consumer.Metrics, consumer.Logs, or consumerprofiles.Profiles with data.
// Profiles feeds a consumer.Traces, consumer.Metrics, consumer.Logs, or xconsumer.Profiles with data.
//
// Examples:
// - Profiles could be collected in one pipeline and routed to another profiles pipeline
Expand All @@ -51,47 +51,47 @@ type Factory interface {
// criteria are met.
type Profiles interface {
component.Component
consumerprofiles.Profiles
xconsumer.Profiles
}

// CreateTracesToProfilesFunc is the equivalent of Factory.CreateTracesToProfiles().
type CreateTracesToProfilesFunc func(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Traces, error)
type CreateTracesToProfilesFunc func(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (connector.Traces, error)

// CreateTracesToProfiles implements Factory.CreateTracesToProfiles().
func (f CreateTracesToProfilesFunc) CreateTracesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (connector.Traces, error) {
func (f CreateTracesToProfilesFunc) CreateTracesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (connector.Traces, error) {
if f == nil {
return nil, internal.ErrDataTypes(set.ID, pipeline.SignalTraces, pipelineprofiles.SignalProfiles)
}
return f(ctx, set, cfg, next)
}

// CreateMetricsToProfilesFunc is the equivalent of Factory.CreateMetricsToProfiles().
type CreateMetricsToProfilesFunc func(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Metrics, error)
type CreateMetricsToProfilesFunc func(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (connector.Metrics, error)

// CreateMetricsToProfiles implements Factory.CreateMetricsToProfiles().
func (f CreateMetricsToProfilesFunc) CreateMetricsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (connector.Metrics, error) {
func (f CreateMetricsToProfilesFunc) CreateMetricsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (connector.Metrics, error) {
if f == nil {
return nil, internal.ErrDataTypes(set.ID, pipeline.SignalMetrics, pipelineprofiles.SignalProfiles)
}
return f(ctx, set, cfg, next)
}

// CreateLogsToProfilesFunc is the equivalent of Factory.CreateLogsToProfiles().
type CreateLogsToProfilesFunc func(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Logs, error)
type CreateLogsToProfilesFunc func(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (connector.Logs, error)

// CreateLogsToProfiles implements Factory.CreateLogsToProfiles().
func (f CreateLogsToProfilesFunc) CreateLogsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (connector.Logs, error) {
func (f CreateLogsToProfilesFunc) CreateLogsToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (connector.Logs, error) {
if f == nil {
return nil, internal.ErrDataTypes(set.ID, pipeline.SignalLogs, pipelineprofiles.SignalProfiles)
}
return f(ctx, set, cfg, next)
}

// CreateProfilesToProfilesFunc is the equivalent of Factory.CreateProfilesToProfiles().
type CreateProfilesToProfilesFunc func(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (Profiles, error)
type CreateProfilesToProfilesFunc func(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (Profiles, error)

// CreateProfilesToProfiles implements Factory.CreateProfilesToProfiles().
func (f CreateProfilesToProfilesFunc) CreateProfilesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next consumerprofiles.Profiles) (Profiles, error) {
func (f CreateProfilesToProfilesFunc) CreateProfilesToProfiles(ctx context.Context, set connector.Settings, cfg component.Config, next xconsumer.Profiles) (Profiles, error) {
if f == nil {
return nil, internal.ErrDataTypes(set.ID, pipelineprofiles.SignalProfiles, pipelineprofiles.SignalProfiles)
}
Expand Down
12 changes: 7 additions & 5 deletions connector/connectorprofiles/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"go.opentelemetry.io/collector/connector"
"go.opentelemetry.io/collector/connector/internal"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/consumer/consumerprofiles"
"go.opentelemetry.io/collector/consumer/consumertest"
"go.opentelemetry.io/collector/consumer/xconsumer"
"go.opentelemetry.io/collector/pipeline"
"go.opentelemetry.io/collector/pipeline/pipelineprofiles"
)
Expand Down Expand Up @@ -119,28 +119,30 @@ type nopConnector struct {
consumertest.Consumer
}

func createTracesToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Traces, error) {
func createTracesToProfiles(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (connector.Traces, error) {
return nopInstance, nil
}

func createMetricsToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Metrics, error) {
func createMetricsToProfiles(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (connector.Metrics, error) {
return nopInstance, nil
}

func createLogsToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (connector.Logs, error) {
func createLogsToProfiles(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (connector.Logs, error) {
return nopInstance, nil
}

func createProfilesToProfiles(context.Context, connector.Settings, component.Config, consumerprofiles.Profiles) (Profiles, error) {
func createProfilesToProfiles(context.Context, connector.Settings, component.Config, xconsumer.Profiles) (Profiles, error) {
return nopInstance, nil
}

func createProfilesToTraces(context.Context, connector.Settings, component.Config, consumer.Traces) (Profiles, error) {
return nopInstance, nil
}

func createProfilesToMetrics(context.Context, connector.Settings, component.Config, consumer.Metrics) (Profiles, error) {
return nopInstance, nil
}

func createProfilesToLogs(context.Context, connector.Settings, component.Config, consumer.Logs) (Profiles, error) {
return nopInstance, nil
}
4 changes: 2 additions & 2 deletions connector/connectorprofiles/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
go.opentelemetry.io/collector/component v0.115.0
go.opentelemetry.io/collector/connector v0.115.0
go.opentelemetry.io/collector/consumer v1.21.0
go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0
go.opentelemetry.io/collector/consumer/consumertest v0.115.0
go.opentelemetry.io/collector/consumer/xconsumer v0.115.0
go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0
go.opentelemetry.io/collector/pdata/pprofile v0.115.0
go.opentelemetry.io/collector/pdata/testdata v0.115.0
Expand Down Expand Up @@ -47,7 +47,7 @@ replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/co

replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile

replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles
replace go.opentelemetry.io/collector/consumer/xconsumer => ../../consumer/xconsumer

replace go.opentelemetry.io/collector/component => ../../component

Expand Down
Loading

0 comments on commit c9ce37f

Please sign in to comment.