Skip to content

Commit

Permalink
cautionary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
captncraig committed Feb 9, 2024
1 parent 3afaa8c commit e5aebdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions component/loki/write/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ func (c *Component) Update(args component.Arguments) error {
}

cfgs := newArgs.convertClientConfigs()

uid := agentseed.Get().UID
for i := range cfgs {
//cfgs is slice of struct values, so we set by index
if cfgs[i].Headers == nil {
cfgs[i].Headers = map[string]string{}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func (i *Instance) ApplyConfig(c *InstanceConfig, g GlobalConfig, dryRun bool) e

uid := agentseed.Get().UID
for i := range c.ClientConfigs {
// ClientConfigs is a slice of struct, so we set values with the index
if c.ClientConfigs[i].Headers == nil {
c.ClientConfigs[i].Headers = map[string]string{}
}
Expand Down

0 comments on commit e5aebdf

Please sign in to comment.