Skip to content

Commit

Permalink
Merge branch 'main' into jm-prom-rw-exporter-add-support-for-rw2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmichalek132 authored Nov 14, 2024
2 parents 40be25d + c06be6d commit 4b8ca99
Show file tree
Hide file tree
Showing 216 changed files with 3,728 additions and 3,130 deletions.
27 changes: 27 additions & 0 deletions .chloggen/configure-cumulative-normalization.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: googlemanagedprometheus

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add `CumulativeNormalization` config option to allow users to configure to specify whether to report normalized or un-normalized points. Defaults to normalized.

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

# (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/f-profiles-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: enhancement

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add support for profiles signal to encodingextension

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

# (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/opampextension-content-type.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: opampextension

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add content type to opamp extension when reporting EffectiveConfig

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

# (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: Add EffectiveConfig.ConfigMap.ConfigMap[*].ContentType as "text/yaml" to the opamp extension when reporting EffectiveConfig.

# 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: []
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: prometheusremotewriteexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: reduce allocation when serializing protobuf

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

# (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: []
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ linters:
- unused
- usestdlibvars
- wastedassign
- whitespace

issues:
# Excluding configuration per-path, per-linter, per-text and per-source
Expand Down
2 changes: 0 additions & 2 deletions cmd/checkapi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func handleFile(f *ast.File, result *api) {
result.Structs = append(result.Structs, t.Name.String())
}
}

}
}
if fn, isFn := d.(*ast.FuncDecl); isFn {
Expand All @@ -112,7 +111,6 @@ func handleFile(f *ast.File, result *api) {
exported = true
}
if fn.Recv.NumFields() > 0 {

for _, t := range fn.Recv.List {
for _, n := range t.Names {
exported = exported || n.IsExported()
Expand Down
1 change: 0 additions & 1 deletion cmd/githubgen/issuetemplates.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func (itg issueTemplatesGenerator) generate(data *githubData) error {
return err
}
}

}
return nil
}
1 change: 0 additions & 1 deletion cmd/githubgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ func loadMetadata(filePath string) (metadata, error) {
}

func run(folder string, allowlistFilePath string, generators []generator) error {

components := map[string]metadata{}
var foldersList []string
maxLength := 0
Expand Down
1 change: 0 additions & 1 deletion cmd/opampsupervisor/main_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func run() error {
// ignore this error and only return other errors
return fmt.Errorf("alloc console: %w", err)
}

}
defer func() {
_ = freeConsole()
Expand Down
1 change: 0 additions & 1 deletion cmd/opampsupervisor/supervisor/persistence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func TestCreateOrLoadPersistentState(t *testing.T) {
require.Equal(t, uuid.MustParse("018feed6-905b-7aa6-ba37-b0eec565de03"), state.InstanceID)
require.FileExists(t, f)
})

}

func TestPersistentState_SetInstanceID(t *testing.T) {
Expand Down
2 changes: 0 additions & 2 deletions cmd/opampsupervisor/supervisor/supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,6 @@ func (s *Supervisor) setupOwnMetrics(_ context.Context, settings *protobufs.Tele
s.logger.Error("Could not setup own metrics", zap.Error(err))
return
}

}
s.agentConfigOwnMetricsSection.Store(cfg.String())

Expand Down Expand Up @@ -1274,7 +1273,6 @@ func (s *Supervisor) onMessage(ctx context.Context, msg *types.MessageData) {

// Update the agent config if any messages have touched the config
if configChanged {

err := s.opampClient.UpdateEffectiveConfig(ctx)
if err != nil {
s.logger.Error("The OpAMP client failed to update the effective config", zap.Error(err))
Expand Down
10 changes: 0 additions & 10 deletions cmd/opampsupervisor/supervisor/supervisor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ func Test_onMessage(t *testing.T) {
require.Contains(t, mergedCfg, "runtime.type: test")
})
t.Run("RemoteConfig - Remote Config message is processed and merged into local config", func(t *testing.T) {

const testConfigMessage = `receivers:
debug:`

Expand Down Expand Up @@ -468,7 +467,6 @@ service:
assert.True(t, remoteConfigStatusUpdated)
})
t.Run("RemoteConfig - Remote Config message is processed but OpAmp Client fails", func(t *testing.T) {

const testConfigMessage = `receivers:
debug:`

Expand Down Expand Up @@ -567,7 +565,6 @@ service:
assert.True(t, remoteConfigStatusUpdated)
})
t.Run("RemoteConfig - Invalid Remote Config message is detected and status is set appropriately", func(t *testing.T) {

const testConfigMessage = `invalid`

remoteConfig := &protobufs.AgentRemoteConfig{
Expand Down Expand Up @@ -635,7 +632,6 @@ service:
assert.Nil(t, s.cfgState.Load())
assert.True(t, remoteConfigStatusUpdated)
})

}

func Test_handleAgentOpAMPMessage(t *testing.T) {
Expand Down Expand Up @@ -1165,7 +1161,6 @@ service:
}

func TestSupervisor_createEffectiveConfigMsg(t *testing.T) {

t.Run("empty config", func(t *testing.T) {
s := Supervisor{
effectiveConfig: &atomic.Value{},
Expand Down Expand Up @@ -1200,13 +1195,10 @@ func TestSupervisor_createEffectiveConfigMsg(t *testing.T) {

assert.Equal(t, []byte("merged"), got.ConfigMap.ConfigMap[""].Body)
})

}

func TestSupervisor_loadAndWriteInitialMergedConfig(t *testing.T) {

t.Run("load initial config", func(t *testing.T) {

configDir := t.TempDir()

const testLastReceivedRemoteConfig = `receiver:
Expand Down Expand Up @@ -1328,11 +1320,9 @@ service:
replacedMergedConfig := portRegex.ReplaceAll([]byte(gotMergedConfig), []byte(":55555"))
assert.Equal(t, expectedMergedConfig, string(replacedMergedConfig))
})

}

func TestSupervisor_composeNoopConfig(t *testing.T) {

const expectedConfig = `exporters:
nop: null
extensions:
Expand Down
1 change: 0 additions & 1 deletion cmd/telemetrygen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func init() {
// Disabling completion command for end user
// https://github.com/spf13/cobra/blob/master/shell_completions.md
rootCmd.CompletionOptions.DisableDefaultCmd = true

}

// Execute tries to run the input command
Expand Down
1 change: 0 additions & 1 deletion cmd/telemetrygen/internal/logs/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func (w worker) simulateLogs(res *resource.Resource, exporterFunc func() (sdklog
}()

for w.running.Load() {

var tid trace.TraceID
var sid trace.SpanID

Expand Down
1 change: 0 additions & 1 deletion cmd/telemetrygen/internal/metrics/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func (c *Config) Flags(fs *pflag.FlagSet) {

fs.StringVar(&c.TraceID, "trace-id", "", "TraceID to use as exemplar")
fs.StringVar(&c.SpanID, "span-id", "", "SpanID to use as exemplar")

}

// Validate validates the test scenario parameters.
Expand Down
1 change: 0 additions & 1 deletion cmd/telemetrygen/internal/traces/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,5 +391,4 @@ func configWithMultipleAttributes(qty int, statusCode string) *Config {
NumTraces: qty,
StatusCode: statusCode,
}

}
2 changes: 0 additions & 2 deletions confmap/provider/aesprovider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func (*provider) Shutdown(context.Context) error {
}

func (p *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) {

if !strings.HasPrefix(uri, schemaName+":") {
return nil, fmt.Errorf("%q uri is not supported by %q provider", uri, schemaName)
}
Expand Down Expand Up @@ -76,7 +75,6 @@ func (p *provider) Retrieve(_ context.Context, uri string, _ confmap.WatcherFunc
}

func (p *provider) decrypt(cipherText string) (string, error) {

cipherBytes, err := base64.StdEncoding.DecodeString(cipherText)
if err != nil {
return "", err
Expand Down
1 change: 0 additions & 1 deletion confmap/provider/aesprovider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
)

func TestAESCredentialProvider(t *testing.T) {

tests := []struct {
name string
configValue string
Expand Down
1 change: 0 additions & 1 deletion confmap/provider/s3provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func TestFunctionalityS3URISplit(t *testing.T) {
}

func TestURIs(t *testing.T) {

tests := []struct {
name string
uri string
Expand Down
4 changes: 2 additions & 2 deletions connector/datadogconnector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ require (
github.com/DataDog/datadog-agent/comp/logs/agent/config v0.59.0 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.59.0 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.59.0 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.58.0-devel.0.20240905201012-b02662b2ba27 // indirect
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.61.0-devel.0.20241113154145-0dd36f320496 // indirect
github.com/DataDog/datadog-agent/comp/trace/compression/def v0.59.0 // indirect
github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.59.0 // indirect
github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.59.0 // indirect
Expand Down Expand Up @@ -292,7 +292,7 @@ require (
go.uber.org/dig v1.18.0 // indirect
go.uber.org/fx v1.22.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sys v0.27.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions connector/datadogconnector/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/demo/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func main() {
}

func makeRequest(ctx context.Context) {

demoServerAddr, ok := os.LookupEnv("DEMO_SERVER_ENDPOINT")
if !ok {
demoServerAddr = "http://0.0.0.0:7080/hello"
Expand Down
1 change: 0 additions & 1 deletion examples/demo/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ func main() {
http.Error(w, "write operation failed.", http.StatusInternalServerError)
return
}

})

mux := http.NewServeMux()
Expand Down
Loading

0 comments on commit 4b8ca99

Please sign in to comment.