Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rakesh-garimella committed Jan 31, 2025
1 parent 5f15afc commit 402da29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
15 changes: 0 additions & 15 deletions internal/otelcollector/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ type Base struct {
Service Service `yaml:"service"`
}

type BaseExtensions struct {
HealthCheck Endpoint `yaml:"health_check,omitempty"`
Pprof Endpoint `yaml:"pprof,omitempty"`
}
type Extensions struct {
HealthCheck Endpoint `yaml:"health_check,omitempty"`
Pprof Endpoint `yaml:"pprof,omitempty"`
Expand Down Expand Up @@ -108,14 +104,3 @@ func DefaultExtensions() Extensions {
},
}
}

func DefaultBaseExtensions() BaseExtensions {
return BaseExtensions{
HealthCheck: Endpoint{
Endpoint: fmt.Sprintf("${%s}:%d", EnvVarCurrentPodIP, ports.HealthCheck),
},
Pprof: Endpoint{
Endpoint: fmt.Sprintf("127.0.0.1:%d", ports.Pprof),
},
}
}
4 changes: 2 additions & 2 deletions internal/otelcollector/config/log/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ type Exporters struct {
}

type Extensions struct {
config.BaseExtensions `yaml:",inline"`
FileStorage *FileStorage `yaml:"file_storage,omitempty"`
config.Extensions `yaml:",inline"`
FileStorage *FileStorage `yaml:"file_storage,omitempty"`
}

type FileStorage struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/otelcollector/config/log/agent/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func makeExtensionsConfig() Extensions {
return Extensions{
BaseExtensions: config.DefaultBaseExtensions(),
Extensions: config.DefaultExtensions(),
FileStorage: &FileStorage{
Directory: otelcollector.CheckpointVolumePath,
},
Expand Down

0 comments on commit 402da29

Please sign in to comment.