Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
05c8383
GH actions: upload agent binaries to GH releases
def Mar 8, 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
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
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
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
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
7e1c112
fix: exlude nudgebee-agent namespace
mayankpande88 Jul 11, 2024
3d10a87
fix: fix for test
mayankpande88 Jul 11, 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
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
})


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