Skip to content

Commit

Permalink
chore: set hostname tag in apidump process
Browse files Browse the repository at this point in the history
  • Loading branch information
mudit-postman committed Nov 13, 2024
1 parent de3404c commit e1cf9c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apidump/apidump.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ func collectTraceTags(args *Args) map[tags.Key]string {
traceTags[tags.XAkitaSource] = tags.UserSource
}

// Set hostname tag
hostname, err := os.Hostname()
if err == nil {
traceTags[tags.XInsightsHostname] = hostname
}

printer.Debugln("trace tags:", traceTags)
return traceTags
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/OneOfOne/xxhash v1.2.8
github.com/Pallinder/go-randomdata v1.2.0
github.com/akitasoftware/akita-ir v0.0.0-20241008173748-ca8e2e3d5db4
github.com/akitasoftware/akita-libs v0.0.0-20241008174225-3b01e02d3430
github.com/akitasoftware/akita-libs v0.0.0-20241113094738-a80a280931a0
github.com/akitasoftware/go-utils v0.0.0-20240213133309-b95d4ace8803
github.com/andybalholm/brotli v1.0.1
github.com/aws/aws-sdk-go-v2 v1.17.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ github.com/akitasoftware/akita-ir v0.0.0-20241008173748-ca8e2e3d5db4 h1:jbsA7E68
github.com/akitasoftware/akita-ir v0.0.0-20241008173748-ca8e2e3d5db4/go.mod h1:WEWPzhZtxlJnov3MxcqSDiZaHHf00vs3aJwCdt3OwzA=
github.com/akitasoftware/akita-libs v0.0.0-20241008174225-3b01e02d3430 h1:rmeFo57G8voBffbLNBGsqpBtmc7+awRHcWSSk7XdBd4=
github.com/akitasoftware/akita-libs v0.0.0-20241008174225-3b01e02d3430/go.mod h1:5rzkpaJI1sA9CtGELYZpf15oczAVopcyda2WsYG5xno=
github.com/akitasoftware/akita-libs v0.0.0-20241113094738-a80a280931a0 h1:CKWTwuwY5gxKE6xJBLfo9yd0Fj5kXiT5cmD8ZfeQOJs=
github.com/akitasoftware/akita-libs v0.0.0-20241113094738-a80a280931a0/go.mod h1:5rzkpaJI1sA9CtGELYZpf15oczAVopcyda2WsYG5xno=
github.com/akitasoftware/go-utils v0.0.0-20240213133309-b95d4ace8803 h1:ebIh/EFuaP8GczzMe8EwVID/blSv5Tej6S8NE4xyarQ=
github.com/akitasoftware/go-utils v0.0.0-20240213133309-b95d4ace8803/go.mod h1:+IOXf7l/QCAQECJzjJwhTp1sBkRoJ6WciZwJezUwBa4=
github.com/akitasoftware/gopacket v1.1.18-0.20240820200020-7289ae956f70 h1:VnU7QLDBwRujpQoHwShs5yu0Ahv1fSalNJa4UijwlmY=
Expand Down

0 comments on commit e1cf9c5

Please sign in to comment.