InitFromEnv initializes the global profiler using environment variables
(logger *slog.Logger)
| 186 | |
| 187 | // InitFromEnv initializes the global profiler using environment variables |
| 188 | func InitFromEnv(logger *slog.Logger) { |
| 189 | globalProfiler = New(logger, IsProfilingEnabled()) |
| 190 | } |
| 191 | |
| 192 | // ProfileFunc profiles a function using the global profiler |
| 193 | func ProfileFunc(ctx context.Context, operation string, fn func() error) (*Profile, error) { |
nothing calls this directly
no test coverage detected