From 06c9f99c27e3c512eed9b8fda4cf2bce9098d508 Mon Sep 17 00:00:00 2001 From: Yusuke Abe Date: Mon, 10 Jun 2024 11:11:53 +0900 Subject: [PATCH] Replace deprecated `experimental.FunctionListenerFactoryKey` with `experimental.WithFunctionListenerFactory` (#108) --- internal/e2e/profiler/profiler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/e2e/profiler/profiler.go b/internal/e2e/profiler/profiler.go index a444ad7e..f7a10ea7 100644 --- a/internal/e2e/profiler/profiler.go +++ b/internal/e2e/profiler/profiler.go @@ -58,8 +58,9 @@ func main() { p := wzprof.ProfilingFor(guestBin) cpu := p.CPUProfiler() mem := p.MemoryProfiler() - ctx := context.WithValue(context.Background(), - experimental.FunctionListenerFactoryKey{}, + + ctx := experimental.WithFunctionListenerFactory( + context.Background(), experimental.MultiFunctionListenerFactory( wzprof.Sample(sampleRate, cpu), wzprof.Sample(sampleRate, mem),