tracer: add default context attr funcs option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-07-06 00:09:27 +03:00
parent 00b3ceb468
commit 35e62fbeb0
4 changed files with 10 additions and 4 deletions

View File

@@ -21,8 +21,11 @@ var (
"HealthService.Ready",
"HealthService.Version",
}
DefaultContextAttrFuncs []ContextAttrFunc
)
type ContextAttrFunc func(ctx context.Context) []interface{}
func init() {
logger.DefaultContextAttrFuncs = append(logger.DefaultContextAttrFuncs,
func(ctx context.Context) []interface{} {