Skip to content

Commit

Permalink
Merge branch 'main' into routing-split-paths2
Browse files Browse the repository at this point in the history
  • Loading branch information
djaglowski authored Nov 1, 2024
2 parents 7ab6e14 + a9bc204 commit 9ae2bc1
Show file tree
Hide file tree
Showing 122 changed files with 3,885 additions and 4,252 deletions.
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: opampsupervisor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Makes the Supervisor's OpAmp server port configurable with 'agent::opamp_server_port'.

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

# (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/datadog-trace-receiver-return-body.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: datadogreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Return a json reponse instead of "OK" when a trace is received with a newer protocol version.

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

# (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/otelarrow-arrow-single-acquire.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: otelarrowreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Simplify receiver admission control logic

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

# (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/otelarrow-otlp-admit-fix.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: otelarrowreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Avoid breaking telemetry when admission control fails in OTLP handlers.

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

# (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/otelarrow-unbounded.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: otelarrowreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Enable unlimited admission control when request_limit_mib is set to 0.

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

# (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/signalfx-exp-retry-dim-update-without-tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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: exporter/signalfx

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Enabling retrying for dimension properties update without tags in case of 400 response error.

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

# (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: |
Property and tag updates are done using the same API call. After this change, the exporter will retry once to sync
properties in case of 400 response error.
# 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]
16 changes: 8 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @open-telemetry/collector-contrib-approvers

cmd/githubgen/ @open-telemetry/collector-contrib-approvers @atoulme
cmd/opampsupervisor/ @open-telemetry/collector-contrib-approvers @evan-bradley @atoulme @tigrannajaryan @BinaryFissionGames
cmd/opampsupervisor/ @open-telemetry/collector-contrib-approvers @evan-bradley @atoulme @tigrannajaryan
cmd/otelcontribcol/ @open-telemetry/collector-contrib-approvers
cmd/oteltestbedcol/ @open-telemetry/collector-contrib-approvers
cmd/telemetrygen/ @open-telemetry/collector-contrib-approvers @mx-psi @codeboten
Expand Down Expand Up @@ -112,8 +112,8 @@ extension/observer/ecstaskobserver/ @open-teleme
extension/observer/hostobserver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy
extension/observer/k8sobserver/ @open-telemetry/collector-contrib-approvers @dmitryax @ChrsMark
extension/oidcauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling
extension/opampcustommessages/ @open-telemetry/collector-contrib-approvers @BinaryFissionGames @evan-bradley
extension/opampextension/ @open-telemetry/collector-contrib-approvers @portertech @evan-bradley @tigrannajaryan @BinaryFissionGames
extension/opampcustommessages/ @open-telemetry/collector-contrib-approvers @evan-bradley
extension/opampextension/ @open-telemetry/collector-contrib-approvers @portertech @evan-bradley @tigrannajaryan
extension/pprofextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy
extension/remotetapextension/ @open-telemetry/collector-contrib-approvers @atoulme
extension/sigv4authextension/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @erichsueh3
Expand Down Expand Up @@ -168,7 +168,7 @@ pkg/translator/prometheusremotewrite/ @open-teleme
pkg/translator/signalfx/ @open-telemetry/collector-contrib-approvers @dmitryax
pkg/translator/skywalking/ @open-telemetry/collector-contrib-approvers @JaredTan95
pkg/translator/zipkin/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @andrzej-stencel @crobert-1
pkg/winperfcounters/ @open-telemetry/collector-contrib-approvers @dashpole @Mrod1598 @BinaryFissionGames @alxbl @pjanotti
pkg/winperfcounters/ @open-telemetry/collector-contrib-approvers @dashpole @Mrod1598 @alxbl @pjanotti

processor/attributesprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken
processor/coralogixprocessor/ @open-telemetry/collector-contrib-approvers @crobert-1 @galrose
Expand All @@ -181,7 +181,7 @@ processor/groupbyattrsprocessor/ @open-teleme
processor/groupbytraceprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling
processor/intervalprocessor/ @open-telemetry/collector-contrib-approvers @RichieSams @sh0rez @djaglowski
processor/k8sattributesprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax @fatsheep9146 @TylerHelmuth
processor/logdedupprocessor/ @open-telemetry/collector-contrib-approvers @BinaryFissionGames @MikeGoldsmith @djaglowski
processor/logdedupprocessor/ @open-telemetry/collector-contrib-approvers @MikeGoldsmith @djaglowski
processor/logstransformprocessor/ @open-telemetry/collector-contrib-approvers @djaglowski @dehaansa
processor/metricsgenerationprocessor/ @open-telemetry/collector-contrib-approvers @Aneurysm9
processor/metricstransformprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax
Expand Down Expand Up @@ -211,7 +211,7 @@ processor/sumologicprocessor/ @open-teleme
processor/tailsamplingprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling
processor/transformprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley

receiver/activedirectorydsreceiver/ @open-telemetry/collector-contrib-approvers @BinaryFissionGames @pjanotti
receiver/activedirectorydsreceiver/ @open-telemetry/collector-contrib-approvers @pjanotti
receiver/aerospikereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @antonblock
receiver/apachereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/apachesparkreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @Caleb-Hurshman @mrsillydog
Expand All @@ -234,7 +234,7 @@ receiver/collectdreceiver/ @open-teleme
receiver/couchdbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/datadogreceiver/ @open-telemetry/collector-contrib-approvers @boostchicken @gouthamve @jpkrohling @MovieStoreGuy
receiver/dockerstatsreceiver/ @open-telemetry/collector-contrib-approvers @jamesmoessis
receiver/elasticsearchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @BinaryFissionGames
receiver/elasticsearchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/expvarreceiver/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy
receiver/filelogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/filestatsreceiver/ @open-telemetry/collector-contrib-approvers @atoulme
Expand Down Expand Up @@ -320,7 +320,7 @@ testbed/mockdatasenders/mockdatadogagentexporter/ @open-teleme
#####################################################
reports/distributions/core.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/contrib.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/k8s.yaml @open-telemetry/collector-contrib-approvers
reports/distributions/k8s.yaml @open-telemetry/collector-contrib-approvers


## UNMAINTAINED components
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ linters:
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign

issues:
Expand Down
65 changes: 65 additions & 0 deletions cmd/opampsupervisor/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,71 @@ func TestSupervisorLogging(t *testing.T) {
require.NoError(t, logFile.Close())
}

func TestSupervisorOpAmpServerPort(t *testing.T) {
var agentConfig atomic.Value
server := newOpAMPServer(
t,
defaultConnectingHandler,
server.ConnectionCallbacksStruct{
OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent {
if message.EffectiveConfig != nil {
config := message.EffectiveConfig.ConfigMap.ConfigMap[""]
if config != nil {
agentConfig.Store(string(config.Body))
}
}

return &protobufs.ServerToAgent{}
},
})

supervisorOpAmpServerPort, err := findRandomPort()
require.NoError(t, err)

s := newSupervisor(t, "server_port", map[string]string{"url": server.addr, "supervisor_opamp_server_port": fmt.Sprintf("%d", supervisorOpAmpServerPort)})

require.Nil(t, s.Start())
defer s.Shutdown()

waitForSupervisorConnection(server.supervisorConnected, true)

cfg, hash, inputFile, outputFile := createSimplePipelineCollectorConf(t)

server.sendToSupervisor(&protobufs.ServerToAgent{
RemoteConfig: &protobufs.AgentRemoteConfig{
Config: &protobufs.AgentConfigMap{
ConfigMap: map[string]*protobufs.AgentConfigFile{
"": {Body: cfg.Bytes()},
},
},
ConfigHash: hash,
},
})

require.Eventually(t, func() bool {
cfg, ok := agentConfig.Load().(string)
if ok {
// The effective config may be structurally different compared to what was sent,
// and will also have some data redacted,
// so just check that it includes the filelog receiver
return strings.Contains(cfg, "filelog")
}

return false
}, 5*time.Second, 500*time.Millisecond, "Collector was not started with remote config")

n, err := inputFile.WriteString("{\"body\":\"hello, world\"}\n")
require.NotZero(t, n, "Could not write to input file")
require.NoError(t, err)

require.Eventually(t, func() bool {
logRecord := make([]byte, 1024)
n, _ := outputFile.Read(logRecord)

return n != 0
}, 10*time.Second, 500*time.Millisecond, "Log never appeared in output")
}

func findRandomPort() (int, error) {
l, err := net.Listen("tcp", "localhost:0")

Expand Down
2 changes: 1 addition & 1 deletion cmd/opampsupervisor/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ type: opampsupervisor
status:
class: cmd
codeowners:
active: [evan-bradley, atoulme, tigrannajaryan, BinaryFissionGames]
active: [evan-bradley, atoulme, tigrannajaryan]
9 changes: 8 additions & 1 deletion cmd/opampsupervisor/specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,14 @@ agent:
client.id: "01HWWSK84BMT7J45663MBJMTPJ"
non_identifying_attributes:
custom.attribute: "custom-value"


# The port the Collector's health check extension will be configured to use
health_check_port:

# The port the Supervisor will start its OpAmp server on and the Collector's
# OpAmp extension will connect to
opamp_server_port:

```

### Operation When OpAMP Server is Unavailable
Expand Down
5 changes: 5 additions & 0 deletions cmd/opampsupervisor/supervisor/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ type Agent struct {
Description AgentDescription `mapstructure:"description"`
BootstrapTimeout time.Duration `mapstructure:"bootstrap_timeout"`
HealthCheckPort int `mapstructure:"health_check_port"`
OpAMPServerPort int `mapstructure:"opamp_server_port"`
PassthroughLogs bool `mapstructure:"passthrough_logs"`
}

Expand All @@ -171,6 +172,10 @@ func (a Agent) Validate() error {
return errors.New("agent::health_check_port must be a valid port number")
}

if a.OpAMPServerPort < 0 || a.OpAMPServerPort > 65535 {
return errors.New("agent::opamp_server_port must be a valid port number")
}

if a.Executable == "" {
return errors.New("agent::executable must be specified")
}
Expand Down
Loading

0 comments on commit 9ae2bc1

Please sign in to comment.