Don't add reporter twice

This commit is contained in:
Marco Munizaga 2022-06-29 21:09:48 -07:00
parent ac716c1bf3
commit 662c094201

View File

@ -47,7 +47,7 @@ func WithTrace(path string) Option {
func WithTraceReporter(reporter TraceReporter) Option {
return func(r *resourceManager) error {
if r.trace == nil {
r.trace = &trace{reporters: []TraceReporter{reporter}}
r.trace = &trace{}
}
r.trace.reporters = append(r.trace.reporters, reporter)
return nil