You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/03/12 15:39:38 UTC
[camel-k] 07/10: chore: Log on first Integration readiness
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 6bd275b073e036df55e51514a9ab1e2001d0c114
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Fri Mar 12 12:21:44 2021 +0100
chore: Log on first Integration readiness
---
pkg/controller/integration/monitor.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pkg/controller/integration/monitor.go b/pkg/controller/integration/monitor.go
index dbfcbd6..c92e9e5 100644
--- a/pkg/controller/integration/monitor.go
+++ b/pkg/controller/integration/monitor.go
@@ -103,7 +103,9 @@ func (action *monitorAction) Handle(ctx context.Context, integration *v1.Integra
(previous == nil || previous.FirstTruthyTime == nil || previous.FirstTruthyTime.IsZero()) &&
next != nil && next.Status == corev1.ConditionTrue && !(next.FirstTruthyTime == nil || next.FirstTruthyTime.IsZero()) {
// Observe the time to first readiness metric
- timeToFirstReadiness.Observe(next.FirstTruthyTime.Time.Sub(integration.Status.InitializationTimestamp.Time).Seconds())
+ duration := next.FirstTruthyTime.Time.Sub(integration.Status.InitializationTimestamp.Time)
+ action.L.Infof("First readiness after %s", duration)
+ timeToFirstReadiness.Observe(duration.Seconds())
}
return integration, nil