Skip to content

Commit d40b198

Browse files
mgencurcardil
authored andcommitted
[release-1.2] Backport upgrade event tracing (knative#6342)
* Wathola Tracing for upgrade tests (knative#6219) * wathola exposing trace information * Run update-deps.sh * Fix license * Fix import * Ensure backwards compatibility * Assert ParentID not nil in test * Separate old and new events sender APIs * Make loggingCfg in client private * Wait only 1 second for flushing tracing info The Reporter is created with a default batch interval 1 second. So, it should be enough to wait just 1 second because the data is flushed every 1 second. * Increase the sleep time to 1.5 seconds to be safe * The ticker runs every 100ms so it could be 1100 ms until the buffer really flushes. * Use Log.Fatal when tracing is not set up properly * Increase the sleep time to 5 seconds and reference knative/pkg issue * Process empty tracing config in test images (knative#6289) * Print traces for missed events in upgrade tests (knative#6249) * Upgrade tests reporting Trace information for missed events * TMP: Induce missed event * Revert "TMP: Induce missed event" This reverts commit 2fec7c7. * Report trace also for Duplicated events * TMP: Induce missed event * TMP: Simulate duplicate events * Fix readme * Unify path for duplicate and missed events * Revert "TMP: Simulate duplicate events" This reverts commit c126521. * Revert "TMP: Induce missed event" This reverts commit fcd9185. * Do not fail upgrade tests if tracing is not configured (knative#6299) * Do not fail upgrade tests if tracing is not configured * TMP: Do not deploy Knative Monitoring * Revert "TMP: Do not deploy Knative Monitoring" This reverts commit 086a8f9. * Limit the number of exported traces (knative#6329) Exporting traces for a large number of events can exceed the timeout of the whole test suite, leading to all upgrade tests being reported as failed. * Cleanup Zipkin tracing only once in upgrade test suite (knative#6331) * NPE fix (knative#6343) Co-authored-by: Chris Suszynski <[email protected]>
1 parent 6911db0 commit d40b198

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

test/upgrade/prober/sender.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
apierrors "k8s.io/apimachinery/pkg/api/errors"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/util/wait"
28+
"knative.dev/eventing/test/upgrade/prober/wathola/sender"
2829
pkgTest "knative.dev/pkg/test"
2930

3031
"knative.dev/eventing/test/upgrade/prober/wathola/sender"

test/upgrade/prober/wathola/sender/services.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ func RegisterEventSenderWithContext(es EventSenderWithContext) {
147147
eventSendersWithContext = append(eventSendersWithContext, es)
148148
}
149149

150+
// RegisterEventSenderWithContext will register EventSenderWithContext to be used.
151+
func RegisterEventSenderWithContext(es EventSenderWithContext) {
152+
eventSendersWithContext = append(eventSendersWithContext, es)
153+
}
154+
150155
// SendEvent will send cloud event to given url
151156
func SendEvent(ctx context.Context, ce cloudevents.Event, endpoint interface{}) error {
152157
sendersWithCtx := make([]EventSenderWithContext, 0, len(eventSendersWithContext)+1)

test/upgrade/prober/wathola/sender/types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@ type EventSenderWithContext interface {
3939
// SendEventWithContext will send event to the given endpoint and pass context.
4040
SendEventWithContext(ctx context.Context, ce cloudevents.Event, endpoint interface{}) error
4141
}
42+
43+
// EventSenderWithContext will be used to send events to configured endpoint, passing a context.
44+
type EventSenderWithContext interface {
45+
EndpointSupporter
46+
// SendEventWithContext will send event to the given endpoint and pass context.
47+
SendEventWithContext(ctx context.Context, ce cloudevents.Event, endpoint interface{}) error
48+
}

0 commit comments

Comments
 (0)