Skip to content

Commit

Permalink
fixed merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-kiss-sg committed Mar 11, 2024
1 parent 3ec68c5 commit 024bb22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion exporter/fileexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Config struct {
// Path of the file to write to. Path is relative to current directory.
Path string `mapstructure:"path"`

// Mode defines whether the exporter should append to the file
// Mode defines whether the exporter should append to the file.
// Options:
// - false[default]: truncates the file
// - true: appends to the file.
Expand Down
2 changes: 1 addition & 1 deletion exporter/fileexporter/file_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ func TestAppend(t *testing.T) {
// Wrap the buffer with the buffered writer closer that implements flush() method.
bwc := newBufferedWriteCloser(buf)
// Create a file exporter with flushing enabled.
feI := newFileExporter(cfg)
feI := newFileExporter(cfg, zap.NewNop())
assert.IsType(t, &fileExporter{}, feI)
fe := feI.(*fileExporter)

Expand Down
2 changes: 1 addition & 1 deletion exporter/fileexporter/grouping_file_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (e *groupingFileExporter) Start(context.Context, component.Host) error {
e.pathSuffix = pathParts[1]
e.maxOpenFiles = e.conf.GroupBy.MaxOpenFiles
e.newFileWriter = func(path string) (*fileWriter, error) {
return newFileWriter(path, nil, e.conf.FlushInterval, export)
return newFileWriter(path, e.conf.Append, nil, e.conf.FlushInterval, export)
}

writers, err := simplelru.NewLRU(e.conf.GroupBy.MaxOpenFiles, e.onEvict)
Expand Down

0 comments on commit 024bb22

Please sign in to comment.