Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .chloggen/remove-config-debug-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. crosslink)
component: configserver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Removed the deprecated localhost config endpoint (`http://localhost:55554/debug/configz`) and its related environment variables.

# One or more tracking issues related to the change
issues: [6984]

# (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: |
The collector's default configuration files enable the `zpages` extension and the respective `debug/expvarz` endpoint,
by default at `http://localhost:55679/debug/expvarz`. This endpoint provides a JSON map containing the collector
configuration details. The keys `splunk.config.initial` and `splunk.config.effective` within this map
hold, respectively, the initial and effective YAML configurations as strings.

To retrieve the configuration in YAML format using this endpoint, you can use the following commands:

On Windows Powershell 5.1:
```powershell
(Invoke-WebRequest http://localhost:55679/debug/expvarz).Content | ConvertFrom-Json | Select-Object -ExpandProperty splunk.config.effective
```

On Bash (with `curl` and `jq`):
```bash
curl http://localhost:55679/debug/expvarz --silent | jq -r '.["splunk.config.initial"]'
```

1 change: 0 additions & 1 deletion .github/workflows/scripts/win-required-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Stop-Service winnat

# Only port in the dynamic range that is being, from time to time, reserved by other applications.
netsh interface ip add excludedportrange protocol=tcp startport=55679 numberofports=1
netsh interface ip add excludedportrange protocol=tcp startport=55554 numberofports=1

Start-Service winnat

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/win-package-test.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these working-directory changes related to this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes they are. Removal of the component triggered changes to go.mod, and those required the working-directory. To be fair I don't fully understand why that is the case, but after the changes to with go.mod and respective tidy this is the simplest fix that I found.

Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ jobs:
"MSI_COLLECTOR_PATH=$msi_path" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Run the MSI tests
working-directory: tests/msi
run: |
go test -timeout 15m -v github.com/signalfx/splunk-otel-collector/tests/msi

Expand Down Expand Up @@ -202,6 +203,7 @@ jobs:

- name: Run the script upgrade tests
shell: powershell # Use PowerShell to run the script since running the go test from pwsh.exe hides the Get-ExecutionPolicy cmdlet.
working-directory: tests/windows-install-script
run: |
go test -v github.com/signalfx/splunk-otel-collector/tests/windows-install-script

Expand Down
5 changes: 1 addition & 4 deletions cmd/otelcol/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,14 @@ func runFromCmdLine(args []string) {
Version: version.Version,
}

configServer := configconverter.NewConfigServer()

confMapConverterFactories := collectorSettings.ConfMapConverterFactories()
dryRun := configconverter.NewDryRun(collectorSettings.IsDryRun(), confMapConverterFactories)
expvarConverter := configconverter.GetExpvarConverter()
confMapConverterFactories = append(confMapConverterFactories,
configconverter.ConverterFactoryFromConverter(dryRun),
configconverter.ConverterFactoryFromConverter(configServer),
configconverter.ConverterFactoryFromConverter(expvarConverter))

configSourceProvider := configsource.New(zap.NewNop(), []configsource.Hook{configServer, expvarConverter, dryRun})
configSourceProvider := configsource.New(zap.NewNop(), []configsource.Hook{expvarConverter, dryRun})

var providerFactories []confmap.ProviderFactory
for _, pf := range collectorSettings.ConfMapProviderFactories() {
Expand Down
5 changes: 2 additions & 3 deletions cmd/otelcol/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ func TestRunFromCmdLine(t *testing.T) {
otelcolCmdTestCtx = nil
}()

// Wait for the ConfigServer to be down after the test.
defer waitForPort(t, "55554")
defer waitForPort(t, "55679")

if tt.panicMsg != "" {
assert.PanicsWithValue(t, tt.panicMsg, func() { runFromCmdLine(tt.args) })
return
}

waitForPort(t, "55554")
waitForPort(t, "55679")
runFromCmdLine(tt.args)
})
}
Expand Down
13 changes: 0 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ require (
github.com/signalfx/splunk-otel-collector/pkg/extension/smartagentextension v0.83.0
github.com/signalfx/splunk-otel-collector/pkg/processor/timestampprocessor v0.0.0-00010101000000-000000000000
github.com/signalfx/splunk-otel-collector/pkg/receiver/smartagentreceiver v0.0.0-00010101000000-000000000000
github.com/signalfx/splunk-otel-collector/tests v0.0.0-00010101000000-000000000000
github.com/spf13/cast v1.10.0
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
Expand Down Expand Up @@ -193,7 +192,6 @@ require (
cloud.google.com/go/pubsub v1.50.1 // indirect
cloud.google.com/go/pubsub/v2 v2.0.0 // indirect
collectd.org v0.6.0 // indirect
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/azure-amqp-common-go/v4 v4.2.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 // indirect
Expand Down Expand Up @@ -246,11 +244,9 @@ require (
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containerd/ttrpc v1.2.7 // indirect
github.com/containerd/typeurl/v2 v2.2.3 // indirect
github.com/coreos/go-systemd/v22 v22.6.0 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/denverdino/aliyungo v0.0.0-20230411124812-ab98a9173ace // indirect
Expand Down Expand Up @@ -344,11 +340,7 @@ require (
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.1.0 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/mountinfo v0.7.2 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/sys/user v0.4.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/nginx/nginx-prometheus-exporter v1.4.1 // indirect
github.com/oklog/ulid v1.3.1 // indirect
Expand All @@ -368,7 +360,6 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.140.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.140.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/core/xidutils v0.140.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.140.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/configkafka v0.140.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.140.1 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.140.1 // indirect
Expand Down Expand Up @@ -419,7 +410,6 @@ require (
github.com/soniah/gosnmp v0.0.0-20190220004421-68e8beac0db9 // indirect
github.com/stackitcloud/stackit-sdk-go/core v0.17.3 // indirect
github.com/tencentcloud/tencentcloud-sdk-go v3.0.233+incompatible // indirect
github.com/testcontainers/testcontainers-go v0.40.0 // indirect
github.com/tg123/go-htpasswd v1.2.4 // indirect
github.com/thda/tds v0.1.7 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
Expand Down Expand Up @@ -526,7 +516,6 @@ require (
github.com/Azure/azure-event-hubs-go/v3 v3.6.2 // indirect
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
github.com/Azure/go-amqp v1.5.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.24 // indirect
Expand Down Expand Up @@ -676,12 +665,10 @@ require (
github.com/mitchellh/hashstructure v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/mongodb-forks/digest v1.1.0 // indirect
github.com/mongodb/go-client-mongodb-atlas v0.2.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/mostynb/go-grpc-compression v1.2.3 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4=
github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0=
github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk=
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk=
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
github.com/AthenZ/athenz v1.12.13 h1:OhZNqZsoBXNrKBJobeUUEirPDnwt0HRo4kQMIO1UwwQ=
github.com/AthenZ/athenz v1.12.13/go.mod h1:XXDXXgaQzXaBXnJX6x/bH4yF6eon2lkyzQZ0z/dxprE=
github.com/Azure/azure-amqp-common-go/v4 v4.2.0 h1:q/jLx1KJ8xeI8XGfkOWMN9XrXzAfVTkyvCxPvHCjd2I=
Expand Down Expand Up @@ -388,8 +386,6 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/creasty/defaults v1.8.0 h1:z27FJxCAa0JKt3utc0sCImAEb+spPucmKoOdLHvHYKk=
github.com/creasty/defaults v1.8.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM=
github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
Expand Down Expand Up @@ -2406,7 +2402,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
Loading
Loading