observation(event): refine telemetry filter, and WithTelemetry()
This commit is contained in:
1 parent
fcb29ed919
commit
49a1563f6a
7 files changed
+527
-156
No files matched your search
@@ -13,6 +13,8 @@ import (
|
||||
"time"
|
||||
|
||||
pbs "github.com/hashicorp/boundary/internal/gen/controller/api/services"
|
||||
"github.com/hashicorp/boundary/internal/gen/controller/servers"
|
||||
"github.com/hashicorp/boundary/internal/gen/controller/servers/services"
|
||||
"github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/groups"
|
||||
"github.com/hashicorp/eventlogger"
|
||||
"github.com/hashicorp/eventlogger/formatter_filters/cloudevents"
|
||||
@@ -381,3 +383,44 @@ func testLogger(t *testing.T, testLock hclog.Locker) hclog.Logger {
|
||||
JSONFormat: true,
|
||||
})
|
||||
}
|
||||
|
||||
func testWorkerStatus(t testing.TB) *services.StatusRequest {
|
||||
t.Helper()
|
||||
return &services.StatusRequest{
|
||||
Jobs: []*services.JobStatus{
|
||||
{Job: &services.Job{
|
||||
Type: 1,
|
||||
JobInfo: nil,
|
||||
}},
|
||||
},
|
||||
UpdateTags: false,
|
||||
WorkerStatus: &servers.ServerWorkerStatus{
|
||||
PublicId: "testID",
|
||||
Name: "w_1234567890",
|
||||
Description: "A default worker created in",
|
||||
Address: "127.0.0.1:9202",
|
||||
Tags: []*servers.TagPair{
|
||||
{
|
||||
Key: "type",
|
||||
Value: "dev",
|
||||
},
|
||||
},
|
||||
KeyId: "ovary-valid-curler-scrambled-glutinous-alias-rework-debit",
|
||||
ReleaseVersion: "Boundary v0.13.1",
|
||||
OperationalState: "active",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func testWorkerStatusObservable(t testing.TB) *services.StatusRequest {
|
||||
t.Helper()
|
||||
return &services.StatusRequest{
|
||||
Jobs: []*services.JobStatus{},
|
||||
WorkerStatus: &servers.ServerWorkerStatus{
|
||||
PublicId: "testID",
|
||||
Tags: []*servers.TagPair{},
|
||||
ReleaseVersion: "Boundary v0.13.1",
|
||||
OperationalState: "active",
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user