integrated circuit creation timespan (#664)

* integrated circuit creation timespan

* integrated fabric changes

* updated changelog

* move json to correct block
This commit is contained in:
Cam Otts
2022-05-02 15:38:39 -04:00
committed by GitHub
parent c5ed72c711
commit 8ea6bdce4a
2 changed files with 24 additions and 3 deletions
+15
View File
@@ -1,6 +1,21 @@
# Release 0.25.5
* Bug fix: Fixes an issue where dial could fail if the terminator router didn't response to routing last
* Enhancement: Updated Control Channel to use new heartbeat logging mirroring Links in Release `0.25.0`
* Enhancement: Added Circuit Creation Timespan which denotes how long the fabric took to construct a requested circuit.
```json
{
"namespace": "namespace",
"event_type": "event_type",
"circuit_id": "circuit_id",
"timestamp": "2022-04-07T14:00:52.0500632-05:00",
"client_id": "client_id",
"service_id": "service_id",
"creation_timespan": 5000000, //Timespan in nanoseconds
"path": "path"
}
```
* Bug fix: Fixes an issue where Edge administrator checks would not take default admin flag into account
* Bug fix: Fix an issue with docker-compose quickstart not properly loading env vars
* Enhancement: Add support for Apple M1 using the ziti quickstart CLI script
+9 -3
View File
@@ -18,11 +18,12 @@ package subcmd
import (
"fmt"
"time"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/spf13/cobra"
"time"
)
func init() {
@@ -83,8 +84,13 @@ func (*circuitsHandler) HandleReceive(msg *channel.Message, _ channel.Channel) {
if event.EventType == mgmt_pb.StreamCircuitEventType_CircuitDeleted {
fmt.Printf("%v: circuitId: %v\n", eventType, event.CircuitId)
} else if event.EventType == mgmt_pb.StreamCircuitEventType_CircuitCreated {
fmt.Printf("%v: circuitId: %v, clientId: %v, serviceId: %v, path: %v\n",
eventType, event.CircuitId, event.ClientId, event.ServiceId, event.Path.CalculateDisplayPath())
fmt.Printf("%v: circuitId: %v, clientId: %v, serviceId: %v, path: %v%s\n",
eventType, event.CircuitId, event.ClientId, event.ServiceId, event.Path.CalculateDisplayPath(), func() string {
if event.CreationTimespan == nil {
return ""
}
return fmt.Sprintf(", creationTimespan: %s", time.Duration(*event.CreationTimespan))
}())
} else if event.EventType == mgmt_pb.StreamCircuitEventType_PathUpdated {
fmt.Printf("%v: circuitId: %v, path: %v\n",
eventType, event.CircuitId, event.Path.CalculateDisplayPath())