tracing: add span for cacher.Get

Also updates tracing integration tests for cacher.GetList
This commit is contained in:
Vadim Rutkovsky
2024-09-12 14:18:40 +02:00
parent 7ad1eaa66b
commit dff0075e7c
2 changed files with 43 additions and 1 deletions

View File

@@ -472,6 +472,23 @@ endpoint: %s`, listener.Addr().String())), os.FileMode(0755)); err != nil {
"Writing http response done",
},
},
{
name: "cacher.Get",
attributes: map[string]func(*commonv1.AnyValue) bool{
"audit-id": func(v *commonv1.AnyValue) bool {
return v.GetStringValue() != ""
},
"key": func(v *commonv1.AnyValue) bool {
return v.GetStringValue() == "/minions/fake"
},
"resource-version": func(v *commonv1.AnyValue) bool {
return v.GetStringValue() == ""
},
},
events: []string{
"About to Get from underlying storage",
},
},
{
name: "etcdserverpb.KV/Range",
attributes: map[string]func(*commonv1.AnyValue) bool{
@@ -562,6 +579,22 @@ endpoint: %s`, listener.Addr().String())), os.FileMode(0755)); err != nil {
"Writing http response done",
},
},
{
name: "cacher.GetList",
attributes: map[string]func(*commonv1.AnyValue) bool{
"audit-id": func(v *commonv1.AnyValue) bool {
return v.GetStringValue() != ""
},
"type": func(v *commonv1.AnyValue) bool {
return v.GetStringValue() == "nodes"
},
},
events: []string{
"Ready",
"Listed items from cache",
"Filtered items",
},
},
{
name: "SerializeObject",
attributes: map[string]func(*commonv1.AnyValue) bool{