Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
05c8383
GH actions: upload agent binaries to GH releases
def Mar 8, 2024
06f1732
Merge pull request #10 from nudgebee/test
mayankpande88 Mar 14, 2024
58edfcf
prevent deletion of an active connection while removing outdated conn…
def Mar 14, 2024
2c95818
Merge pull request #72 from coroot/fix_active_connection_gc
def Mar 14, 2024
011a574
retry app type detection during container initialization
def Mar 14, 2024
6b88611
Merge pull request #73 from coroot/fix_dotnet_app_detection
def Mar 14, 2024
d4054f2
Merge pull request #17 from nudgebee/test
blue4209211 Mar 21, 2024
5136c8a
Merge pull request #21 from nudgebee/test
blue4209211 Mar 28, 2024
5ce8eef
Merge pull request #24 from nudgebee/test
hsundar-git Mar 30, 2024
dff2224
metrics: set `info` log level
apetruhin Apr 11, 2024
44f6e37
profiling: set `SampleType` name
apetruhin Apr 11, 2024
e68f061
flags: add base `collector endpoint` URL
apetruhin Apr 11, 2024
7500d29
Merge pull request #74 from coroot/collector_endpoint_url
apetruhin Apr 11, 2024
d70ec9c
Merge pull request #36 from nudgebee/test
blue4209211 Apr 11, 2024
0175d1c
fix PVC detection on microk8s
def Apr 15, 2024
23505d2
Merge pull request #75 from coroot/fix_microk8s_pvc_detection
def Apr 15, 2024
f55e13d
Add script to install agent as a Systemd service
apetruhin Apr 16, 2024
ca6fba4
Merge pull request #76 from coroot/systemd_install
def Apr 16, 2024
e399cc2
Merge pull request #40 from nudgebee/test
mayankpande88 Apr 19, 2024
1b6a8fd
Listen on `localhost` when operating in push mode
apetruhin Apr 22, 2024
8b0243e
Merge pull request #77 from coroot/localhost_in_push_mode
apetruhin Apr 22, 2024
5554e02
Merge pull request #43 from nudgebee/test
mayankpande88 Apr 25, 2024
4e9a6fc
require either `debugfs` or `tracefs` to be mounted
def Apr 30, 2024
58f0336
Merge pull request #78 from coroot/tracefs
def Apr 30, 2024
41714cd
Add DNS protocol tracing
def May 7, 2024
827e918
Merge pull request #79 from coroot/dns_tracking
def May 7, 2024
9d731ec
add support for HashiCorp Nomad
def May 8, 2024
c4e4c21
Merge pull request #81 from coroot/nomad_support
def May 8, 2024
ce5baa8
fix garbage collection process for FQDN metrics
def May 10, 2024
fb023bb
Merge pull request #82 from coroot/fix_fqdn_gc
def May 10, 2024
d8f9e78
switch order in func machineID
May 20, 2024
bb35b99
Sorted the order of file paths in the machineID function
May 20, 2024
97d36da
Merge pull request #85 from Broot-bite/test-order-machineID
def May 20, 2024
4d233eb
process: implement lazy retrieval of network namespace
apetruhin May 24, 2024
15b2c76
Merge pull request #86 from coroot/process_lazy_netns
apetruhin May 24, 2024
6acd550
metrics: add `system_uuid` label
apetruhin May 27, 2024
4c8e82e
Merge pull request #87 from coroot/system_uuid_label
apetruhin May 27, 2024
87093a7
fix DNS request capturing
def May 28, 2024
eae516b
Merge pull request #89 from coroot/fix_dns_capturing
def May 28, 2024
c521ad4
fix active DNS request invalidation
def May 29, 2024
34a94ef
Merge pull request #91 from coroot/fix_active_dns_request_invalidation
def May 29, 2024
67ccce0
don't validate the zero bit in the DNS header
def May 30, 2024
990c7e9
Merge pull request #92 from coroot/fix_dns_response_capturing
def May 30, 2024
0f7052a
container: log TCP listen open/close events
apetruhin May 31, 2024
cd29567
Merge pull request #93 from coroot/log_listen_events
apetruhin May 31, 2024
0607a53
init: don't ignore errors
apetruhin Jun 3, 2024
c05a6a0
Merge pull request #94 from coroot/init_dont_ignore_errors
apetruhin Jun 3, 2024
16f8e53
enable tracking of all connections by default (0.0.0.0/0)
def Jun 4, 2024
042e50b
Merge pull request #96 from coroot/track_all_connections
def Jun 4, 2024
4c0f168
fix cgroup detection during systemd service initialization
def Jun 13, 2024
7fbb8a7
Merge pull request #97 from coroot/fix_cgroup_detection_on_service_init
def Jun 13, 2024
579482c
pinger: don't ping loopback and IPv6 IPs
def Jun 13, 2024
f98e1c1
pinger: read RX timestamp only upon receiving a valid ICMP Echo reply
def Jun 13, 2024
e46f8d8
Merge pull request #98 from coroot/pinger
def Jun 13, 2024
b8211bf
fix container RSS memory calculation with cgroup v2 stats.
def Jun 17, 2024
4787e13
Merge pull request #99 from coroot/cgroup_v2_memory
def Jun 17, 2024
d0e515d
add `systemd_triggered_by` label to `container_info` metric to detect…
def Jun 20, 2024
0e3b1f5
Merge pull request #100 from coroot/systemd_triggered_by
def Jun 20, 2024
c8de83a
add detection for Golang applications
def Jul 1, 2024
2d816cb
Merge pull request #102 from coroot/golang_app_type
def Jul 1, 2024
5a8715f
Merge remote-tracking branch 'upstream/main' into rebase-node-agent
mayankpande88 Jul 2, 2024
58b17dc
fix: disabled dns resolve
mayankpande88 Jul 2, 2024
13a2e78
fix: fix for invalid utf8
mayankpande88 Jul 2, 2024
527a064
feat: added flag to disable kube probe tracing
mayankpande88 May 20, 2024
4f3a531
fix: fix for crozz az info
mayankpande88 Jul 3, 2024
9d7c011
Revert "fix: fix for crozz az info"
mayankpande88 Jul 3, 2024
5c330f6
fix: map dns to trace
mayankpande88 Jul 4, 2024
7c2acf2
fix: fix for loggers
mayankpande88 Jul 8, 2024
54e14d4
fix: fix for dns mapping
mayankpande88 Jul 8, 2024
f644d33
fix: fix for logger
mayankpande88 Jul 8, 2024
1faeef3
fix: added trace source region and az
mayankpande88 Jul 8, 2024
b83b36e
fix: added az tracing
mayankpande88 Jul 8, 2024
a4218d1
fix: fix for invalid utf8 erro
mayankpande88 Jul 8, 2024
f214737
add the `container_net_tcp_connection_time_seconds_total` metric
def Jul 9, 2024
05c1e51
Merge pull request #107 from coroot/tcp_connection_time
def Jul 9, 2024
7e1c112
fix: exlude nudgebee-agent namespace
mayankpande88 Jul 11, 2024
3d10a87
fix: fix for test
mayankpande88 Jul 11, 2024
9009c5c
add `container_python_thread_lock_wait_time_seconds` metric
def Jul 11, 2024
163e1f1
Merge pull request #108 from coroot/python_gil_monitoring
def Jul 11, 2024
4c54df0
python: search for `pthread_cond_timedwait` in both libc.so and libpt…
def Jul 15, 2024
d135225
Merge pull request #109 from coroot/fix_python_instrumentation
def Jul 15, 2024
69f9db2
fix panic in `instrumentPython` (fixes #110)
def Jul 16, 2024
5851fb3
Merge pull request #111 from coroot/fix_panic
def Jul 16, 2024
409c784
fix possible panic in `guessApplicationType`
def Jul 16, 2024
9163bf8
fix openssl v1.0.1 attach uprobe failed issues
wenhuwang Jul 18, 2024
c40380d
Merge pull request #113 from wenhuwang/openssl_v1_0_1
apetruhin Jul 23, 2024
9f6909a
add `container_net_tcp_bytes_sent_total` and `container_net_tcp_bytes…
def Jul 29, 2024
83c3c1c
Merge pull request #116 from coroot/traffic_metrics
def Jul 29, 2024
cd14711
added: support mariadb (fully compatible with mysql)
tomseffect Jul 30, 2024
f030cd3
Merge pull request #117 from thed0ct0r/feature/mariadb
def Jul 31, 2024
bb1c742
Merge remote-tracking branch 'upstream/main'
mayankpande88 Aug 1, 2024
a5a9a5d
fix: fix for merge conflicts
mayankpande88 Aug 1, 2024
e1d34a8
Merge pull request #67 from nudgebee/rebase-upstream
blue4209211 Aug 1, 2024
47a0132
build(deps): bump github.com/docker/docker (#68)
dependabot[bot] Aug 1, 2024
c7af2e5
register non-tcp connections (UDP) in `active_connections`
def Aug 5, 2024
094c562
Merge pull request #119 from coroot/non_tcp_connection
def Aug 5, 2024
fedf910
Merge remote-tracking branch 'upstream/main' into rebase-upstream
mayankpande88 Aug 5, 2024
33f782a
Merge pull request #69 from nudgebee/rebase-upstream
mayankpande88 Aug 5, 2024
82a5e2f
fix: fix for nil pointer
mayankpande88 Aug 5, 2024
d5c7df2
Merge pull request #70 from nudgebee/fix-nil-pointer
blue4209211 Aug 5, 2024
18bf8b4
fix: fix for alpine image start
mayankpande88 Aug 20, 2024
858bfad
Merge pull request #73 from nudgebee/fix-alpine-image
blue4209211 Aug 20, 2024
97cb8e0
Merge branch 'test' into test-dev-backmerge
mayankpande88 Aug 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
file: 'Dockerfile'
file: 'Dockerfile.alpine'
push: true
tags: |
280501305789.dkr.ecr.us-east-1.amazonaws.com/nudgebee-node-agent:${{ env.tag }}
2 changes: 1 addition & 1 deletion .github/workflows/prod-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
file: 'Dockerfile'
file: 'Dockerfile.alpine'
push: true
tags: |
740395098545.dkr.ecr.us-east-1.amazonaws.com/nudgebee-node-agent:${{ env.tag }}
48 changes: 47 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write

steps:
Expand Down Expand Up @@ -45,3 +45,49 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.meta.outputs.version }}

- name: extract amd64 binary from the image
run: |
docker create --platform linux/amd64 --name amd64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} &&
docker cp amd64:/usr/bin/coroot-node-agent /tmp/coroot-node-agent-amd64

- name: extract arm64 binary from the image
run: |
docker create --platform linux/arm64 --name arm64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} &&
docker cp arm64:/usr/bin/coroot-node-agent /tmp/coroot-node-agent-arm64

- name: upload amd64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /tmp/coroot-node-agent-amd64
asset_name: coroot-node-agent-amd64
asset_content_type: application/octet-stream

- name: upload arm64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /tmp/coroot-node-agent-arm64
asset_name: coroot-node-agent-arm64
asset_content_type: application/octet-stream

- uses: actions/github-script@v7
env:
RELEASE_ID: ${{ github.event.release.id }}
with:
script: |
const { RELEASE_ID } = process.env
github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: `${RELEASE_ID}`,
prerelease: false,
make_latest: true
})


6 changes: 3 additions & 3 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ RUN CGO_ENABLED=1 go build -mod=readonly -ldflags "-X main.version=$VERSION" -o

FROM --platform=linux/amd64 alpine:3.19 AS release-stage
WORKDIR /app
COPY --from=build-stage /app/coroot-node-agent /app/coroot-node-agent
RUN chmod +x /app/coroot-node-agent
CMD ["/app/coroot-node-agent"]
COPY --from=build-stage /app/coroot-node-agent /usr/bin/coroot-node-agent
RUN chmod +x /usr/bin/coroot-node-agent
CMD ["coroot-node-agent"]
8 changes: 7 additions & 1 deletion cgroup/cgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ func NewFromProcessCgroupFile(filePath string) (*Cgroup, error) {
cg.subsystems[cgType] = path.Join(baseCgroupPath, parts[2])
}
}
if p := cg.subsystems["cpu"]; p != "" {
if p := cg.subsystems["name=systemd"]; p != "" {
cg.Id = p
cg.Version = V1
} else if p = cg.subsystems["cpu"]; p != "" {
cg.Id = p
cg.Version = V1
} else {
Expand All @@ -123,6 +126,9 @@ func containerByCgroup(path string) (ContainerType, string, error) {
if len(parts) < 2 {
return ContainerTypeStandaloneProcess, "", nil
}
if *flags.DisableKubeProbe && parts[1] == "kubelet.service" {
return ContainerTypeStandaloneProcess, "", nil
}
prefix := parts[0]
if prefix == "user.slice" || prefix == "init.scope" {
return ContainerTypeStandaloneProcess, "", nil
Expand Down
7 changes: 7 additions & 0 deletions cgroup/cgroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ func TestNewFromProcessCgroupFile(t *testing.T) {
assert.Equal(t, "73051af271105c07e1f493b34856a77e665e3b0b4fc72f76c807dfbffeb881bd", cg.ContainerId)
assert.Equal(t, ContainerTypeDocker, cg.ContainerType)

cg, err = NewFromProcessCgroupFile(path.Join("fixtures/proc/600/cgroup"))
assert.Nil(t, err)
assert.Equal(t, V1, cg.Version)
assert.Equal(t, "/system.slice/springboot.service", cg.Id)
assert.Equal(t, "/system.slice/springboot.service", cg.ContainerId)
assert.Equal(t, ContainerTypeSystemdService, cg.ContainerType)

baseCgroupPath = "/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-podc83d0428_58af_41eb_8dba_b9e6eddffe7b.slice/docker-0e612005fd07e7f47e2cd07df99a2b4e909446814d71d0b5e4efc7159dd51252.scope"
defer func() {
baseCgroupPath = ""
Expand Down
11 changes: 11 additions & 0 deletions cgroup/fixtures/proc/600/cgroup
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
11:freezer:/
10:blkio:/init.scope
9:hugetlb:/
8:memory:/init.scope
7:pids:/init.scope
6:devices:/init.scope
5:rdma:/
4:cpuset:/
3:net_cls,net_prio:/
2:cpu,cpuacct:/
1:name=systemd:/system.slice/springboot.service
6 changes: 1 addition & 5 deletions cgroup/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,13 @@ func (cg *Cgroup) memoryStatV1() (*MemoryStat, error) {
}

func (cg *Cgroup) memoryStatV2() (*MemoryStat, error) {
current, err := readUintFromFile(path.Join(cgRoot, cg.subsystems[""], "memory.current"))
if err != nil {
return nil, err
}
vars, err := readVariablesFromFile(path.Join(cgRoot, cg.subsystems[""], "memory.stat"))
if err != nil {
return nil, err
}
limit, _ := readUintFromFile(path.Join(cgRoot, cg.subsystems[""], "memory.max"))
return &MemoryStat{
RSS: current - vars["file"],
RSS: vars["anon"] + vars["file_mapped"],
Cache: vars["file"],
Limit: limit,
}, nil
Expand Down
4 changes: 2 additions & 2 deletions cgroup/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ func TestCgroup_MemoryStat(t *testing.T) {
cg, _ = NewFromProcessCgroupFile(path.Join("fixtures/proc/400/cgroup"))
stat, err = cg.MemoryStat()
assert.Nil(t, err)
assert.Equal(t, uint64(48648192-1044480), stat.RSS)
assert.Equal(t, uint64(44892160+0), stat.RSS)
assert.Equal(t, uint64(1044480), stat.Cache)
assert.Equal(t, uint64(0), stat.Limit)

cg, _ = NewFromProcessCgroupFile(path.Join("fixtures/proc/500/cgroup"))
stat, err = cg.MemoryStat()
assert.Nil(t, err)
assert.Equal(t, uint64(131047424-50835456), stat.RSS)
assert.Equal(t, uint64(75247616+4038656), stat.RSS)
assert.Equal(t, uint64(50835456), stat.Cache)
assert.Equal(t, uint64(4294967296), stat.Limit)

Expand Down
Loading