chore: refactor set in collection package (#5016)

This commit is contained in:
Kevin Wan
2025-07-18 21:25:40 +08:00
committed by GitHub
parent bf6ef5f033
commit 3c9b6335fb
5 changed files with 74 additions and 441 deletions

View File

@@ -29,8 +29,8 @@ func TraceHandler(serviceName, path string, opts ...TraceOption) func(http.Handl
opt(&options)
}
ignorePaths := collection.NewSet()
ignorePaths.AddStr(options.traceIgnorePaths...)
ignorePaths := collection.NewSet[string]()
ignorePaths.Add(options.traceIgnorePaths...)
return func(next http.Handler) http.Handler {
tracer := otel.Tracer(trace.TraceName)