generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add TCP stream reader using gopacket (#62)
## Which problem is this PR solving? Adds an alternative source of packet discovery using gopacket. This is an experimental thing and may be able to replace our kprobes that peice packets together using kprobes. - Closes #59 ## Short description of the changes - Add http/httputils.go which is the TCP stream reader using gopacket, will nee renaming / moving to be better discoverable - Add libcap-dev package to Dockerfile's (gopacket reads pcap files) - Enable CGO compilation in Makefile targets - Move tcp_probe.c to source sub directory as CGO doesn't like go and c files in same directory - Introduce manager struct for TCP probe to hold references for things we need to clean up, plus add New, Start and Close funcs - Add hostnetwork and NET_RAW cap to deployment.yaml - Update main.go to setup and configure both probes and tcp stream reader then clean up resources when detecting interrupt and term signals - Updates go version to 1.20.7 in .tools-versions ## How to verify that this has the expected result Can continue to build and deploy the agent. Events are delivered for both probe and tcp stream reader sources to Honeycomb (provided HONEYCOMB_API_KEY is set). PS We should no longer require `mac-*` makefile targets once the following is merged - #61 --------- Co-authored-by: JamieDanielson <jamieedanielson@gmail.com> Co-authored-by: Purvi Kanal <kanal.purvi@gmail.com> Co-authored-by: Purvi Kanal <purvikanal@honeycomb.io> Co-authored-by: Jamie Danielson <JamieDanielson@users.noreply.github.com> Co-authored-by: Robb Kidd <robb@thekidds.org> Co-authored-by: Vera Reynolds <verareynolds@honeycomb.io>
- Loading branch information
1 parent
bffeeef
commit 78ac240
Showing
11 changed files
with
720 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
golang 1.20.5 | ||
golang 1.20.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
FROM golang:1.20 as builder | ||
RUN apt update -yq && apt install -yq clang llvm make | ||
RUN apt update -yq && apt install -yq clang llvm make libpcap-dev | ||
WORKDIR /src | ||
COPY go.* . | ||
RUN go mod download | ||
COPY . . | ||
RUN make build | ||
|
||
FROM ubuntu:22.04 | ||
RUN apt-get update -yq && apt-get install -yq ca-certificates | ||
RUN apt-get update -yq && apt-get install -yq ca-certificates libpcap-dev | ||
COPY --from=builder /src/hny-ebpf-agent /bin/hny-ebpf-agent | ||
CMD [ "/bin/hny-ebpf-agent" ] | ||
ENTRYPOINT [ "/bin/hny-ebpf-agent" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.