Skip to content

Commit

Permalink
[POA-2516] Introduce errors field in body meta (#221)
Browse files Browse the repository at this point in the history
Depends on postmanlabs/observability-ir#16
Added an error enum to the body meta to capture parsing errors.
  • Loading branch information
shreys7 authored Dec 13, 2024
1 parent 0af65b8 commit 7fac08b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/OneOfOne/xxhash v1.2.8
github.com/akitasoftware/akita-ir v0.0.0-20241008173748-ca8e2e3d5db4
github.com/akitasoftware/akita-ir v0.0.0-20241213050034-057d7b6097e8
github.com/akitasoftware/go-utils v0.0.0-20221207014235-6f4c9079488d
github.com/akitasoftware/objecthash-proto v0.0.0-20211020004800-9990a7ea5dc0
github.com/amplitude/analytics-go v1.0.1
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=
github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/akitasoftware/akita-ir v0.0.0-20241008173748-ca8e2e3d5db4 h1:jbsA7E68G4dkK+ldQKQNPFIaRojFCn+cEB3gEEUSEU4=
github.com/akitasoftware/akita-ir v0.0.0-20241008173748-ca8e2e3d5db4/go.mod h1:WEWPzhZtxlJnov3MxcqSDiZaHHf00vs3aJwCdt3OwzA=
github.com/akitasoftware/akita-ir v0.0.0-20241212105914-68c47ec34a0a h1:7qu19Mmi+I9AwDZqrbGUPYmsyXu/UbwRFnlnvjyuboQ=
github.com/akitasoftware/akita-ir v0.0.0-20241212105914-68c47ec34a0a/go.mod h1:WEWPzhZtxlJnov3MxcqSDiZaHHf00vs3aJwCdt3OwzA=
github.com/akitasoftware/akita-ir v0.0.0-20241213050034-057d7b6097e8 h1:sf2aaOG8o+tAIMxuk7peMkKrHPp9l3/r+JmiQ3dwJ5U=
github.com/akitasoftware/akita-ir v0.0.0-20241213050034-057d7b6097e8/go.mod h1:WEWPzhZtxlJnov3MxcqSDiZaHHf00vs3aJwCdt3OwzA=
github.com/akitasoftware/go-utils v0.0.0-20221207014235-6f4c9079488d h1:pN1dbNacZ/mvlU1NcJVDxqmKnrDQDTVaN6iKOarfdYM=
github.com/akitasoftware/go-utils v0.0.0-20221207014235-6f4c9079488d/go.mod h1:+IOXf7l/QCAQECJzjJwhTp1sBkRoJ6WciZwJezUwBa4=
github.com/akitasoftware/gopacket v1.1.18-0.20240820200020-7289ae956f70 h1:VnU7QLDBwRujpQoHwShs5yu0Ahv1fSalNJa4UijwlmY=
Expand Down
6 changes: 5 additions & 1 deletion spec_util/ir_hash/generated_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ func HashHTTPBody(node *pb.HTTPBody) []byte {
hash.Write(intHashes[2])
hash.Write(Hash_Unicode(node.OtherType))
}
if node.Errors != 0 {
hash.Write(intHashes[3])
hash.Write(Hash_Int32(int32(node.Errors)))
}
return hash.Sum(nil)
}
func HashHTTPCookie(node *pb.HTTPCookie) []byte {
Expand Down Expand Up @@ -901,4 +905,4 @@ func HashWitness(node *pb.Witness) []byte {
return hash.Sum(nil)
}

var ProtobufFileHashes map[string][]byte = map[string][]byte{"method.proto": []byte{31, 208, 148, 29, 192, 101, 63, 116}, "witness.proto": []byte{42, 213, 185, 25, 124, 226, 76, 187}, "types.proto": []byte{98, 84, 34, 180, 249, 140, 214, 227}, "spec.proto": []byte{13, 101, 129, 126, 232, 252, 1, 146}}
var ProtobufFileHashes map[string][]byte = map[string][]byte{"method.proto": []byte{255, 184, 253, 195, 222, 123, 171, 60}, "witness.proto": []byte{42, 213, 185, 25, 124, 226, 76, 187}, "types.proto": []byte{98, 84, 34, 180, 249, 140, 214, 227}, "spec.proto": []byte{13, 101, 129, 126, 232, 252, 1, 146}}

0 comments on commit 7fac08b

Please sign in to comment.