in quickstarttest/testcases.go [57:81]
func InstrumentationQuickstartTest(t *testing.T, quickstartRoot string) {
ctx := context.Background()
composeStack := composeUp(ctx, t, quickstartRoot)
// Let the docker compose app run until some spans/logs/metrics are sent to GCP
t.Logf("Compose stack is up, waiting for prometheus metrics indicating successful export")
// Check the collector's self-observability prometheus metrics to see that exports to GCP were successful.
for _, tc := range testCases {
t.Run(tc.metricName, func(t *testing.T) {
require.EventuallyWithT(
t,
func(collect *assert.CollectT) {
promMetrics, err := getPromMetrics(ctx, composeStack)
if !assert.NoError(collect, err) {
return
}
verifyPromMetric(collect, promMetrics, tc)
},
time.Minute*2, // wait for up to
time.Second, // check at interval
)
})
}
}