diff --git a/src/productcatalogservice/main.go b/src/productcatalogservice/main.go index 2330212d79..12cfd4b53f 100644 --- a/src/productcatalogservice/main.go +++ b/src/productcatalogservice/main.go @@ -128,6 +128,7 @@ func main() { } log.Println("Shutdown meter provider") }() + openfeature.AddHooks(otelhooks.NewTracesHook()) err := openfeature.SetProvider(flagd.NewProvider()) if err != nil { log.Fatal(err) @@ -300,7 +301,7 @@ func (p *productCatalog) checkProductFailure(ctx context.Context, id string) boo if id != "OLJCESPC7Z" { return false } - openfeature.AddHooks(otelhooks.NewTracesHook()) + client := openfeature.NewClient("productCatalog") failureEnabled, _ := client.BooleanValue( ctx, "productCatalogFailure", false, openfeature.EvaluationContext{},