Skip to content

Commit

Permalink
Merge branch 'open-telemetry:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgopack4 authored Jul 23, 2024
2 parents bf0c812 + 6171720 commit 72b15c1
Show file tree
Hide file tree
Showing 56 changed files with 526 additions and 81 deletions.
25 changes: 25 additions & 0 deletions .chloggen/document_factories.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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. otlpreceiver)
component: exporter, processor, receiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Document factory functions.

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

# (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:

# 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]
25 changes: 25 additions & 0 deletions .chloggen/document_fields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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. otlpreceiver)
component: component

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Document status enums and New constructors

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

# (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:

# 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]
25 changes: 25 additions & 0 deletions .chloggen/experimental_include_metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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. otlpreceiver)
component: confighttp, configgrpc

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove the experimental comment on `IncludeMetadata` in confighttp and configgrpc

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

# (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:

# 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]
25 changes: 25 additions & 0 deletions .chloggen/profiles-consumertest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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. otlpreceiver)
component: consumer/consumertest

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Allow testing profiles with consumertest.

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

# (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:

# 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]
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/init@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/autobuild@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/analyze@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
uses: github/codeql-action/upload-sarif@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
with:
sarif_file: results.sarif
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ check-contrib:
-replace go.opentelemetry.io/collector/connector=$(CURDIR)/connector \
-replace go.opentelemetry.io/collector/connector/forwardconnector=$(CURDIR)/connector/forwardconnector \
-replace go.opentelemetry.io/collector/consumer=$(CURDIR)/consumer \
-replace go.opentelemetry.io/collector/consumer/consumerprofiles=$(CURDIR)/consumer/consumerprofiles \
-replace go.opentelemetry.io/collector/consumer/consumertest=$(CURDIR)/consumer/consumertest \
-replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter \
-replace go.opentelemetry.io/collector/exporter/debugexporter=$(CURDIR)/exporter/debugexporter \
-replace go.opentelemetry.io/collector/exporter/loggingexporter=$(CURDIR)/exporter/loggingexporter \
Expand Down Expand Up @@ -337,6 +339,8 @@ restore-contrib:
-dropreplace go.opentelemetry.io/collector/connector \
-dropreplace go.opentelemetry.io/collector/connector/forwardconnector \
-dropreplace go.opentelemetry.io/collector/consumer \
-dropreplace go.opentelemetry.io/collector/consumer/consumerprofiles \
-dropreplace go.opentelemetry.io/collector/consumer/consumertest \
-dropreplace go.opentelemetry.io/collector/exporter \
-dropreplace go.opentelemetry.io/collector/exporter/debugexporter \
-dropreplace go.opentelemetry.io/collector/exporter/loggingexporter \
Expand Down
2 changes: 2 additions & 0 deletions cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ var (
"/confmap/provider/httpsprovider",
"/confmap/provider/yamlprovider",
"/consumer",
"/consumer/consumerprofiles",
"/consumer/consumertest",
"/connector",
"/exporter",
"/exporter/debugexporter",
Expand Down
1 change: 1 addition & 0 deletions cmd/builder/test/core.builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ replaces:
- go.opentelemetry.io/collector/confmap/provider/httpsprovider => ${WORKSPACE_DIR}/confmap/provider/httpsprovider
- go.opentelemetry.io/collector/confmap/provider/yamlprovider => ${WORKSPACE_DIR}/confmap/provider/yamlprovider
- go.opentelemetry.io/collector/consumer => ${WORKSPACE_DIR}/consumer
- go.opentelemetry.io/collector/consumer/consumertest => ${WORKSPACE_DIR}/consumer/consumertest
- go.opentelemetry.io/collector/connector => ${WORKSPACE_DIR}/connector
- go.opentelemetry.io/collector/exporter => ${WORKSPACE_DIR}/exporter
- go.opentelemetry.io/collector/exporter/debugexporter => ${WORKSPACE_DIR}/exporter/debugexporter
Expand Down
7 changes: 7 additions & 0 deletions cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
go.opentelemetry.io/collector/confmap v0.105.0
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.105.0
go.opentelemetry.io/collector/consumer v0.105.0
go.opentelemetry.io/collector/consumer/consumertest v0.105.0
go.opentelemetry.io/collector/filter v0.105.0
go.opentelemetry.io/collector/pdata v1.12.0
go.opentelemetry.io/collector/receiver v0.105.0
Expand Down Expand Up @@ -46,8 +47,10 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect
go.opentelemetry.io/collector/featuregate v1.12.0 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
Expand Down Expand Up @@ -93,3 +96,7 @@ retract (
replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile

replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates

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

replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest
2 changes: 2 additions & 0 deletions cmd/otelcorecol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ 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/consumertest => ../../consumer/consumertest
- go.opentelemetry.io/collector/connector => ../../connector
- go.opentelemetry.io/collector/connector/forwardconnector => ../../connector/forwardconnector
- go.opentelemetry.io/collector/exporter => ../../exporter
Expand Down
7 changes: 7 additions & 0 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ require (
go.opentelemetry.io/collector/config/configtls v1.12.0 // indirect
go.opentelemetry.io/collector/config/internal v0.105.0 // indirect
go.opentelemetry.io/collector/consumer v0.105.0 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect
go.opentelemetry.io/collector/consumer/consumertest v0.105.0 // indirect
go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect
go.opentelemetry.io/collector/featuregate v1.12.0 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect
go.opentelemetry.io/collector/pdata v1.12.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect
go.opentelemetry.io/collector/semconv v0.105.0 // indirect
go.opentelemetry.io/collector/service v0.105.0 // indirect
go.opentelemetry.io/contrib/config v0.8.0 // indirect
Expand Down Expand Up @@ -178,6 +181,10 @@ 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/consumertest => ../../consumer/consumertest

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

replace go.opentelemetry.io/collector/connector/forwardconnector => ../../connector/forwardconnector
Expand Down
2 changes: 1 addition & 1 deletion component/componentprofiles/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module go.opentelemetry.io/collector/component/componentprofiles

go 1.21.0

require go.opentelemetry.io/collector/component v0.104.0
require go.opentelemetry.io/collector/component v0.105.0

require (
github.com/gogo/protobuf v1.3.2 // indirect
Expand Down
22 changes: 16 additions & 6 deletions component/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ type Status int32

// Enumeration of possible component statuses
const (
// StatusNone indicates absence of component status.
StatusNone Status = iota
// StatusStarting indicates the component is starting.
StatusStarting
// StatusOK indicates the component is running without issues.
StatusOK
// StatusRecoverableError indicates that the component has experienced a transient error and may recover.
StatusRecoverableError
// StatusPermanentError indicates that the component has detected a condition at runtime that will need human intervention to fix. The collector will continue to run in a degraded mode.
StatusPermanentError
// StatusFatalError indicates that the collector has experienced a fatal runtime error and will shut down.
StatusFatalError
// StatusStopping indicates that the component is in the process of shutting down.
StatusStopping
// StatusStopped indicates that the component has completed shutdown.
StatusStopped
)

Expand Down Expand Up @@ -74,24 +82,26 @@ func NewStatusEvent(status Status) *StatusEvent {
}
}

// NewRecoverableErrorEvent creates and returns a StatusEvent with StatusRecoverableError, the
// specified error, and a timestamp set to time.Now().
// NewRecoverableErrorEvent wraps a transient error
// passed as argument as a StatusEvent with a status StatusRecoverableError
// and a timestamp set to time.Now().
func NewRecoverableErrorEvent(err error) *StatusEvent {
ev := NewStatusEvent(StatusRecoverableError)
ev.err = err
return ev
}

// NewPermanentErrorEvent creates and returns a StatusEvent with StatusPermanentError, the
// specified error, and a timestamp set to time.Now().
// NewPermanentErrorEvent wraps an error requiring human intervention to fix
// passed as argument as a StatusEvent with a status StatusPermanentError
// and a timestamp set to time.Now().
func NewPermanentErrorEvent(err error) *StatusEvent {
ev := NewStatusEvent(StatusPermanentError)
ev.err = err
return ev
}

// NewFatalErrorEvent creates and returns a StatusEvent with StatusFatalError, the
// specified error, and a timestamp set to time.Now().
// NewFatalErrorEvent wraps the fatal runtime error passed as argument as a StatusEvent
// with a status StatusFatalError and a timestamp set to time.Now().
func NewFatalErrorEvent(err error) *StatusEvent {
ev := NewStatusEvent(StatusFatalError)
ev.err = err
Expand Down
1 change: 0 additions & 1 deletion config/configgrpc/configgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ type ServerConfig struct {
Auth *configauth.Authentication `mapstructure:"auth"`

// Include propagates the incoming connection's metadata to downstream consumers.
// Experimental: *NOTE* this option is subject to change or removal in the future.
IncludeMetadata bool `mapstructure:"include_metadata"`
}

Expand Down
4 changes: 4 additions & 0 deletions config/configgrpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,7 @@ replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile
replace go.opentelemetry.io/collector/component => ../../component

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

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

replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest
1 change: 0 additions & 1 deletion config/confighttp/confighttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ type ServerConfig struct {
MaxRequestBodySize int64 `mapstructure:"max_request_body_size"`

// IncludeMetadata propagates the client metadata from the incoming requests to the downstream consumers
// Experimental: *NOTE* this option is subject to change or removal in the future.
IncludeMetadata bool `mapstructure:"include_metadata"`

// Additional headers attached to each HTTP response sent to the client.
Expand Down
4 changes: 4 additions & 0 deletions config/confighttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ replace go.opentelemetry.io/collector/consumer => ../../consumer
replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata

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

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

replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest
4 changes: 4 additions & 0 deletions config/internal/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata
replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile

replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates

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

replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest
7 changes: 7 additions & 0 deletions connector/forwardconnector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
go.opentelemetry.io/collector/confmap v0.105.0
go.opentelemetry.io/collector/connector v0.105.0
go.opentelemetry.io/collector/consumer v0.105.0
go.opentelemetry.io/collector/consumer/consumertest v0.105.0
go.opentelemetry.io/collector/pdata v1.12.0
go.uber.org/goleak v1.3.0
)
Expand Down Expand Up @@ -38,8 +39,10 @@ require (
github.com/prometheus/procfs v0.15.1 // indirect
go.opentelemetry.io/collector v0.105.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect
go.opentelemetry.io/collector/featuregate v1.12.0 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
Expand Down Expand Up @@ -83,3 +86,7 @@ retract (
replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry

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

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

replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest
6 changes: 6 additions & 0 deletions connector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
go.opentelemetry.io/collector v0.105.0
go.opentelemetry.io/collector/component v0.105.0
go.opentelemetry.io/collector/consumer v0.105.0
go.opentelemetry.io/collector/consumer/consumertest v0.105.0
go.opentelemetry.io/collector/pdata v1.12.0
go.opentelemetry.io/collector/pdata/testdata v0.105.0
go.uber.org/goleak v1.3.0
Expand All @@ -32,6 +33,7 @@ require (
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect
Expand Down Expand Up @@ -67,3 +69,7 @@ replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata
replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile

replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates

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

replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest
1 change: 1 addition & 0 deletions consumer/consumertest/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../Makefile.Common
Loading

0 comments on commit 72b15c1

Please sign in to comment.