Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit 9593d79

Browse files
authored
Update akita-libs (#201)
Depends on postmanlabs/observability-shared-libs#188.
1 parent 104fa0d commit 9593d79

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

cmd/internal/get/graph.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,16 @@ func printGraphBySource(graph *api_schema.GraphResponse) {
273273
for i, e := range graph.HTTPEdges {
274274
// TODO: this assumes service is the only supported source vertex, which is true right now.
275275
if i > 0 && e.SourceAttributes != graph.HTTPEdges[i-1].SourceAttributes {
276-
fmt.Printf("\n%-30s -> ", hostOrUnknown(e.SourceAttributes.Host))
276+
fmt.Printf("\n%-30s -> ", hostOrUnknown(e.SourceAttributes.Host.String()))
277277
} else if i == 0 {
278-
fmt.Printf("%-30s -> ", hostOrUnknown(e.SourceAttributes.Host))
278+
fmt.Printf("%-30s -> ", hostOrUnknown(e.SourceAttributes.Host.String()))
279279
} else {
280280
// Don't repeat source information
281281
fmt.Printf("%-30s -> ", "")
282282
}
283283

284284
if e.TargetAttributes.PathTemplate == "" {
285-
fmt.Printf("%-30s\n", hostOrUnknown(e.TargetAttributes.Host))
285+
fmt.Printf("%-30s\n", hostOrUnknown(e.TargetAttributes.Host.String()))
286286
} else {
287287
fmt.Printf("%-30s %7s %s\n", e.TargetAttributes.Host, e.TargetAttributes.Method, e.TargetAttributes.PathTemplate)
288288
}
@@ -375,11 +375,11 @@ func printGraphByTarget(graph *api_schema.GraphResponse) {
375375
}
376376

377377
// TODO: this assumes service is the only supported source vertex, which is true right now.
378-
fmt.Printf("%-30s -> ", hostOrUnknown(e.SourceAttributes.Host))
378+
fmt.Printf("%-30s -> ", hostOrUnknown(e.SourceAttributes.Host.String()))
379379

380380
if (i > 0 && e.TargetAttributes != graph.HTTPEdges[i-1].TargetAttributes) || i == 0 {
381381
if e.TargetAttributes.PathTemplate == "" {
382-
fmt.Printf("%-30s\n", hostOrUnknown(e.TargetAttributes.Host))
382+
fmt.Printf("%-30s\n", hostOrUnknown(e.TargetAttributes.Host.String()))
383383
} else {
384384
fmt.Printf("%-30s %7s %s\n", e.TargetAttributes.Host, e.TargetAttributes.Method, e.TargetAttributes.PathTemplate)
385385
}
@@ -433,12 +433,12 @@ func printDot(graph *api_schema.GraphResponse) {
433433
for _, e := range graph.HTTPEdges {
434434
if e.TargetAttributes.PathTemplate == "" {
435435
fmt.Printf(" %q -> %q [label=\"%v\"]\n",
436-
hostOrUnknown(e.SourceAttributes.Host),
436+
hostOrUnknown(e.SourceAttributes.Host.String()),
437437
e.TargetAttributes.Host,
438438
e.Values[api_schema.Event_Count])
439439
} else {
440440
fmt.Printf(" %q -> \"%s\\n%s %s\" [label=\"%v\"]\n",
441-
hostOrUnknown(e.SourceAttributes.Host),
441+
hostOrUnknown(e.SourceAttributes.Host.String()),
442442
e.TargetAttributes.Host,
443443
e.TargetAttributes.Method,
444444
e.TargetAttributes.PathTemplate,

cmd/internal/get/timeline.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ func getTimeline(cmd *cobra.Command, args []string) error {
179179
fmt.Printf("%s %9.3fms %6s %s %s %s\n",
180180
event.Time.Format(time.RFC3339),
181181
float32Value(event.Values.P99Latency),
182-
formatStringAttr(timeline.GroupAttributes.Method),
183-
formatStringAttr(timeline.GroupAttributes.Host),
184-
formatStringAttr(timeline.GroupAttributes.PathTemplate),
182+
formatStringAttr(timeline.GroupAttributes.Method.String()),
183+
formatStringAttr(timeline.GroupAttributes.Host.String()),
184+
formatStringAttr(timeline.GroupAttributes.PathTemplate.String()),
185185
formatIntAttr(timeline.GroupAttributes.ResponseCode))
186186
timeline.Events = timeline.Events[1:]
187187
if len(timeline.Events) == 0 {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/OneOfOne/xxhash v1.2.8
88
github.com/Pallinder/go-randomdata v1.2.0
99
github.com/akitasoftware/akita-ir v0.0.0-20220630210013-8926783978fe
10-
github.com/akitasoftware/akita-libs v0.0.0-20230126182513-c49ba8585c34
10+
github.com/akitasoftware/akita-libs v0.0.0-20230313215021-6353210abb00
1111
github.com/akitasoftware/go-utils v0.0.0-20221207014235-6f4c9079488d
1212
github.com/akitasoftware/plugin-flickr v0.2.0
1313
github.com/andybalholm/brotli v1.0.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ github.com/akitasoftware/akita-ir v0.0.0-20211020161529-944af4d11d6e/go.mod h1:W
3131
github.com/akitasoftware/akita-ir v0.0.0-20220630210013-8926783978fe h1:0BeBDjLDFPwv2bkk6YuRAPf1r6U4Wby98NHI9+Lddvs=
3232
github.com/akitasoftware/akita-ir v0.0.0-20220630210013-8926783978fe/go.mod h1:WEWPzhZtxlJnov3MxcqSDiZaHHf00vs3aJwCdt3OwzA=
3333
github.com/akitasoftware/akita-libs v0.0.0-20211020162041-fe02207174fb/go.mod h1:YLFCjhwQ0ZFfYWSUD2c9KYKEeBn+R+Cz+A5SitXvJz8=
34-
github.com/akitasoftware/akita-libs v0.0.0-20230126182513-c49ba8585c34 h1:qxxD4qS6+O+g9W9LIbzmQp5Istbcw/pVXp2T3llqHaU=
35-
github.com/akitasoftware/akita-libs v0.0.0-20230126182513-c49ba8585c34/go.mod h1:qufiDcBb7r0oemPbxlXk9HUSyDt5rLO0PQGFOWRx3y4=
34+
github.com/akitasoftware/akita-libs v0.0.0-20230313215021-6353210abb00 h1:YwQ6GCVA5H2HLdic3KU7RU6FpC3WhOx5v9RXGZ0JI5E=
35+
github.com/akitasoftware/akita-libs v0.0.0-20230313215021-6353210abb00/go.mod h1:qufiDcBb7r0oemPbxlXk9HUSyDt5rLO0PQGFOWRx3y4=
3636
github.com/akitasoftware/go-utils v0.0.0-20221207014235-6f4c9079488d h1:pN1dbNacZ/mvlU1NcJVDxqmKnrDQDTVaN6iKOarfdYM=
3737
github.com/akitasoftware/go-utils v0.0.0-20221207014235-6f4c9079488d/go.mod h1:+IOXf7l/QCAQECJzjJwhTp1sBkRoJ6WciZwJezUwBa4=
3838
github.com/akitasoftware/gopacket v1.1.18-0.20210730205736-879e93dac35b h1:toBhS5rhCjo/N4YZ1cYtlsdSTGjMFH+gbJGCc+OmZiY=

0 commit comments

Comments
 (0)