Selaa lähdekoodia

goimports: imports reformatting

Nikolay Sivko 2 vuotta sitten
vanhempi
säilyke
c7c218978b
53 muutettua tiedostoa jossa 149 lisäystä ja 96 poistoa
  1. 4 3
      cgroup/cgroup.go
  2. 2 1
      cgroup/cgroup_linux.go
  3. 2 1
      cgroup/cgroup_test.go
  4. 2 1
      cgroup/cpu_test.go
  5. 2 1
      cgroup/io.go
  6. 2 1
      cgroup/io_test.go
  7. 2 1
      cgroup/memory_test.go
  8. 2 1
      cgroup/utils.go
  9. 3 2
      common/net.go
  10. 2 1
      common/net_test.go
  11. 2 1
      common/otel_test.go
  12. 2 1
      common/volumes_test.go
  13. 2 1
      containers/cilium.go
  14. 2 1
      containers/conntrack.go
  15. 3 2
      containers/containerd.go
  16. 5 4
      containers/crio.go
  17. 5 4
      containers/dockerd.go
  18. 1 0
      containers/journald.go
  19. 4 3
      containers/jvm.go
  20. 2 1
      containers/l7.go
  21. 5 4
      containers/registry.go
  22. 2 1
      containers/taskstats.go
  23. 2 1
      ebpftracer/init.go
  24. 3 2
      ebpftracer/l7/http2.go
  25. 2 1
      ebpftracer/l7/l7_test.go
  26. 1 0
      ebpftracer/l7/mongo.go
  27. 4 3
      ebpftracer/tls.go
  28. 6 5
      ebpftracer/tracer.go
  29. 7 6
      ebpftracer/tracer_test.go
  30. 4 3
      logs/journald_reader.go
  31. 3 2
      logs/otel.go
  32. 3 2
      logs/tail_reader.go
  33. 3 2
      logs/tail_reader_test.go
  34. 2 1
      node/cpu_test.go
  35. 2 1
      node/disk.go
  36. 2 1
      node/disk_test.go
  37. 2 1
      node/memory.go
  38. 2 1
      node/memory_test.go
  39. 3 2
      node/metadata/aws.go
  40. 2 1
      node/metadata/azure.go
  41. 2 1
      node/metadata/digital_ocean.go
  42. 2 1
      node/metadata/gcp.go
  43. 2 1
      node/metadata/hetzner.go
  44. 2 1
      node/metadata/metadata.go
  45. 2 1
      node/net.go
  46. 2 1
      node/net_test.go
  47. 2 1
      node/uptime_test.go
  48. 6 5
      pinger/pinger.go
  49. 2 1
      proc/net.go
  50. 2 1
      proc/ns.go
  51. 2 1
      proc/proc_test.go
  52. 9 8
      profiling/profiling.go
  53. 3 2
      tracing/tracing.go

+ 4 - 3
cgroup/cgroup.go

@@ -2,14 +2,15 @@ package cgroup
 
 import (
 	"fmt"
-	"github.com/coroot/coroot-node-agent/common"
-	"github.com/coroot/coroot-node-agent/flags"
-	"k8s.io/klog/v2"
 	"os"
 	"path"
 	"regexp"
 	"strings"
 	"time"
+
+	"github.com/coroot/coroot-node-agent/common"
+	"github.com/coroot/coroot-node-agent/flags"
+	"k8s.io/klog/v2"
 )
 
 var (

+ 2 - 1
cgroup/cgroup_linux.go

@@ -1,9 +1,10 @@
 package cgroup
 
 import (
+	"runtime"
+
 	"github.com/vishvananda/netns"
 	"golang.org/x/sys/unix"
-	"runtime"
 )
 
 func Init() error {

+ 2 - 1
cgroup/cgroup_test.go

@@ -1,9 +1,10 @@
 package cgroup
 
 import (
-	"github.com/stretchr/testify/assert"
 	"path"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestNewFromProcessCgroupFile(t *testing.T) {

+ 2 - 1
cgroup/cpu_test.go

@@ -1,9 +1,10 @@
 package cgroup
 
 import (
-	"github.com/stretchr/testify/assert"
 	"path"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestCgroup_CpuStat(t *testing.T) {

+ 2 - 1
cgroup/io.go

@@ -2,10 +2,11 @@ package cgroup
 
 import (
 	"io/ioutil"
-	"k8s.io/klog/v2"
 	"path"
 	"strconv"
 	"strings"
+
+	"k8s.io/klog/v2"
 )
 
 type IOStat struct {

+ 2 - 1
cgroup/io_test.go

@@ -1,9 +1,10 @@
 package cgroup
 
 import (
-	"github.com/stretchr/testify/assert"
 	"path"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestCgroup_IOStat(t *testing.T) {

+ 2 - 1
cgroup/memory_test.go

@@ -1,9 +1,10 @@
 package cgroup
 
 import (
-	"github.com/stretchr/testify/assert"
 	"path"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestCgroup_MemoryStat(t *testing.T) {

+ 2 - 1
cgroup/utils.go

@@ -2,9 +2,10 @@ package cgroup
 
 import (
 	"io/ioutil"
-	"k8s.io/klog/v2"
 	"strconv"
 	"strings"
+
+	"k8s.io/klog/v2"
 )
 
 func readVariablesFromFile(filePath string) (map[string]uint64, error) {

+ 3 - 2
common/net.go

@@ -1,11 +1,12 @@
 package common
 
 import (
+	"strconv"
+	"strings"
+
 	"github.com/coroot/coroot-node-agent/flags"
 	"inet.af/netaddr"
 	"k8s.io/klog/v2"
-	"strconv"
-	"strings"
 )
 
 var (

+ 2 - 1
common/net_test.go

@@ -1,9 +1,10 @@
 package common
 
 import (
+	"testing"
+
 	"github.com/stretchr/testify/assert"
 	"inet.af/netaddr"
-	"testing"
 )
 
 func TestConnectionFilter(t *testing.T) {

+ 2 - 1
common/otel_test.go

@@ -1,8 +1,9 @@
 package common
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestContainerIdToServiceName(t *testing.T) {

+ 2 - 1
common/volumes_test.go

@@ -1,8 +1,9 @@
 package common
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestParseKubernetesVolumeSource(t *testing.T) {

+ 2 - 1
containers/cilium.go

@@ -1,6 +1,8 @@
 package containers
 
 import (
+	"path/filepath"
+
 	"github.com/cilium/cilium/pkg/bpf"
 	"github.com/cilium/cilium/pkg/defaults"
 	"github.com/cilium/cilium/pkg/loadbalancer"
@@ -11,7 +13,6 @@ import (
 	"github.com/coroot/coroot-node-agent/proc"
 	"inet.af/netaddr"
 	"k8s.io/klog/v2"
-	"path/filepath"
 )
 
 var (

+ 2 - 1
containers/conntrack.go

@@ -1,12 +1,13 @@
 package containers
 
 import (
+	"syscall"
+
 	"github.com/coroot/coroot-node-agent/common"
 	"github.com/florianl/go-conntrack"
 	"github.com/vishvananda/netns"
 	"inet.af/netaddr"
 	"k8s.io/klog/v2"
-	"syscall"
 )
 
 type Conntrack struct {

+ 3 - 2
containers/containerd.go

@@ -4,6 +4,9 @@ import (
 	"context"
 	"encoding/json"
 	"fmt"
+	"strings"
+	"time"
+
 	"github.com/containerd/containerd"
 	"github.com/containerd/containerd/oci"
 	"github.com/containerd/containerd/pkg/cri/constants"
@@ -11,8 +14,6 @@ import (
 	"github.com/coroot/coroot-node-agent/proc"
 	"github.com/coroot/logparser"
 	"k8s.io/klog/v2"
-	"strings"
-	"time"
 )
 
 const containerdTimeout = 30 * time.Second

+ 5 - 4
containers/crio.go

@@ -5,14 +5,15 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
-	"github.com/coroot/coroot-node-agent/common"
-	"github.com/coroot/coroot-node-agent/proc"
-	"github.com/coroot/logparser"
-	"k8s.io/klog/v2"
 	"net"
 	"net/http"
 	"os"
 	"time"
+
+	"github.com/coroot/coroot-node-agent/common"
+	"github.com/coroot/coroot-node-agent/proc"
+	"github.com/coroot/logparser"
+	"k8s.io/klog/v2"
 )
 
 const crioTimeout = 30 * time.Second

+ 5 - 4
containers/dockerd.go

@@ -3,16 +3,17 @@ package containers
 import (
 	"context"
 	"fmt"
+	"os"
+	"path"
+	"strings"
+	"time"
+
 	"github.com/coroot/coroot-node-agent/common"
 	"github.com/coroot/coroot-node-agent/proc"
 	"github.com/coroot/logparser"
 	"github.com/docker/docker/client"
 	"github.com/vishvananda/netns"
 	"inet.af/netaddr"
-	"os"
-	"path"
-	"strings"
-	"time"
 )
 
 const dockerdTimeout = 30 * time.Second

+ 1 - 0
containers/journald.go

@@ -2,6 +2,7 @@ package containers
 
 import (
 	"fmt"
+
 	"github.com/coroot/coroot-node-agent/cgroup"
 	"github.com/coroot/coroot-node-agent/logs"
 	"github.com/coroot/coroot-node-agent/proc"

+ 4 - 3
containers/jvm.go

@@ -3,14 +3,15 @@ package containers
 import (
 	"bytes"
 	"fmt"
+	"path/filepath"
+	"strconv"
+	"time"
+
 	"github.com/coroot/coroot-node-agent/common"
 	"github.com/coroot/coroot-node-agent/proc"
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/xin053/hsperfdata"
 	"k8s.io/klog/v2"
-	"path/filepath"
-	"strconv"
-	"time"
 )
 
 func isJvm(cmdline []byte) bool {

+ 2 - 1
containers/l7.go

@@ -1,11 +1,12 @@
 package containers
 
 import (
+	"time"
+
 	"github.com/coroot/coroot-node-agent/ebpftracer/l7"
 	"github.com/prometheus/client_golang/prometheus"
 	"inet.af/netaddr"
 	"k8s.io/klog/v2"
-	"time"
 )
 
 type L7Metrics struct {

+ 5 - 4
containers/registry.go

@@ -3,6 +3,11 @@ package containers
 import (
 	"bytes"
 	"fmt"
+	"os"
+	"regexp"
+	"strings"
+	"time"
+
 	"github.com/coroot/coroot-node-agent/cgroup"
 	"github.com/coroot/coroot-node-agent/common"
 	"github.com/coroot/coroot-node-agent/ebpftracer"
@@ -11,10 +16,6 @@ import (
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/vishvananda/netns"
 	"k8s.io/klog/v2"
-	"os"
-	"regexp"
-	"strings"
-	"time"
 )
 
 var (

+ 2 - 1
containers/taskstats.go

@@ -2,8 +2,9 @@ package containers
 
 import (
 	"fmt"
-	"github.com/mdlayher/taskstats"
 	"sync"
+
+	"github.com/mdlayher/taskstats"
 )
 
 var (

+ 2 - 1
ebpftracer/init.go

@@ -1,9 +1,10 @@
 package ebpftracer
 
 import (
+	"strings"
+
 	"github.com/coroot/coroot-node-agent/proc"
 	"k8s.io/klog/v2"
-	"strings"
 )
 
 type file struct {

+ 3 - 2
ebpftracer/l7/http2.go

@@ -2,12 +2,13 @@ package l7
 
 import (
 	"encoding/binary"
-	"golang.org/x/net/http2"
-	"golang.org/x/net/http2/hpack"
 	"net/http"
 	"strconv"
 	"strings"
 	"time"
+
+	"golang.org/x/net/http2"
+	"golang.org/x/net/http2/hpack"
 )
 
 const (

+ 2 - 1
ebpftracer/l7/l7_test.go

@@ -3,9 +3,10 @@ package l7
 import (
 	"bytes"
 	"encoding/binary"
+	"testing"
+
 	"github.com/stretchr/testify/assert"
 	"go.mongodb.org/mongo-driver/bson"
-	"testing"
 )
 
 func TestParseHttp(t *testing.T) {

+ 1 - 0
ebpftracer/l7/mongo.go

@@ -2,6 +2,7 @@ package l7
 
 import (
 	"encoding/binary"
+
 	"go.mongodb.org/mongo-driver/bson"
 )
 

+ 4 - 3
ebpftracer/tls.go

@@ -7,15 +7,16 @@ import (
 	"debug/elf"
 	"errors"
 	"fmt"
+	"os"
+	"regexp"
+	"strings"
+
 	"github.com/cilium/ebpf/link"
 	"github.com/coroot/coroot-node-agent/proc"
 	"golang.org/x/arch/arm64/arm64asm"
 	"golang.org/x/arch/x86/x86asm"
 	"golang.org/x/mod/semver"
 	"k8s.io/klog/v2"
-	"os"
-	"regexp"
-	"strings"
 )
 
 const (

+ 6 - 5
ebpftracer/tracer.go

@@ -5,6 +5,12 @@ import (
 	"encoding/binary"
 	"errors"
 	"fmt"
+	"os"
+	"runtime"
+	"strconv"
+	"strings"
+	"time"
+
 	"github.com/cilium/ebpf"
 	"github.com/cilium/ebpf/link"
 	"github.com/cilium/ebpf/perf"
@@ -15,11 +21,6 @@ import (
 	"golang.org/x/sys/unix"
 	"inet.af/netaddr"
 	"k8s.io/klog/v2"
-	"os"
-	"runtime"
-	"strconv"
-	"strings"
-	"time"
 )
 
 const MaxPayloadSize = 1024

+ 7 - 6
ebpftracer/tracer_test.go

@@ -5,12 +5,6 @@ package ebpftracer
 import (
 	"bytes"
 	"fmt"
-	"github.com/containerd/cgroups"
-	cgroupsV2 "github.com/containerd/cgroups/v2"
-	"github.com/opencontainers/runtime-spec/specs-go"
-	"github.com/stretchr/testify/assert"
-	"github.com/stretchr/testify/require"
-	"golang.org/x/sys/unix"
 	"net"
 	"os"
 	"os/exec"
@@ -20,6 +14,13 @@ import (
 	"syscall"
 	"testing"
 	"time"
+
+	"github.com/containerd/cgroups"
+	cgroupsV2 "github.com/containerd/cgroups/v2"
+	"github.com/opencontainers/runtime-spec/specs-go"
+	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
+	"golang.org/x/sys/unix"
 )
 
 func skipIfNotVM(t *testing.T) {

+ 4 - 3
logs/journald_reader.go

@@ -2,12 +2,13 @@ package logs
 
 import (
 	"fmt"
-	"github.com/coreos/go-systemd/v22/sdjournal"
-	"github.com/coroot/logparser"
-	"k8s.io/klog/v2"
 	"strings"
 	"sync"
 	"time"
+
+	"github.com/coreos/go-systemd/v22/sdjournal"
+	"github.com/coroot/logparser"
+	"k8s.io/klog/v2"
 )
 
 type JournaldReader struct {

+ 3 - 2
logs/otel.go

@@ -2,6 +2,9 @@ package logs
 
 import (
 	"context"
+	"os"
+	"time"
+
 	otel "github.com/agoda-com/opentelemetry-logs-go"
 	"github.com/agoda-com/opentelemetry-logs-go/exporters/otlp/otlplogs"
 	"github.com/agoda-com/opentelemetry-logs-go/exporters/otlp/otlplogs/otlplogshttp"
@@ -13,8 +16,6 @@ import (
 	"go.opentelemetry.io/otel/sdk/resource"
 	semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
 	"k8s.io/klog/v2"
-	"os"
-	"time"
 )
 
 var otelLogger otelLogs.Logger

+ 3 - 2
logs/tail_reader.go

@@ -3,12 +3,13 @@ package logs
 import (
 	"bufio"
 	"context"
-	"github.com/coroot/logparser"
 	"io"
-	"k8s.io/klog/v2"
 	"os"
 	"strings"
 	"time"
+
+	"github.com/coroot/logparser"
+	"k8s.io/klog/v2"
 )
 
 var (

+ 3 - 2
logs/tail_reader_test.go

@@ -1,12 +1,13 @@
 package logs
 
 import (
-	"github.com/coroot/logparser"
-	"github.com/stretchr/testify/assert"
 	"io/ioutil"
 	"os"
 	"testing"
 	"time"
+
+	"github.com/coroot/logparser"
+	"github.com/stretchr/testify/assert"
 )
 
 func TestTailReader(t *testing.T) {

+ 2 - 1
node/cpu_test.go

@@ -1,8 +1,9 @@
 package node
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestNode_cpu(t *testing.T) {

+ 2 - 1
node/disk.go

@@ -1,12 +1,13 @@
 package node
 
 import (
-	"k8s.io/klog/v2"
 	"os"
 	"path"
 	"regexp"
 	"strconv"
 	"strings"
+
+	"k8s.io/klog/v2"
 )
 
 var blockDevice = regexp.MustCompile(`^(dm-\d+|(s|h|xv|v)d[a-z]|md\d+|nvme\d+n\d+|rbd\d+)`)

+ 2 - 1
node/disk_test.go

@@ -1,9 +1,10 @@
 package node
 
 import (
-	"github.com/stretchr/testify/assert"
 	"sort"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestGetNodeDisks(t *testing.T) {

+ 2 - 1
node/memory.go

@@ -2,10 +2,11 @@ package node
 
 import (
 	"io/ioutil"
-	"k8s.io/klog/v2"
 	"path"
 	"strconv"
 	"strings"
+
+	"k8s.io/klog/v2"
 )
 
 func memoryInfo(procRoot string) (MemoryStat, error) {

+ 2 - 1
node/memory_test.go

@@ -1,8 +1,9 @@
 package node
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestNode_memory(t *testing.T) {

+ 3 - 2
node/metadata/aws.go

@@ -4,11 +4,12 @@ import (
 	"context"
 	"encoding/json"
 	"errors"
-	"github.com/coroot/coroot-node-agent/proc"
 	"io"
-	"k8s.io/klog/v2"
 	"net"
 	"net/http"
+
+	"github.com/coroot/coroot-node-agent/proc"
+	"k8s.io/klog/v2"
 )
 
 const awsInstanceMetadataURL = "http://169.254.169.254/latest"

+ 2 - 1
node/metadata/azure.go

@@ -2,8 +2,9 @@ package metadata
 
 import (
 	"encoding/json"
-	"k8s.io/klog/v2"
 	"net/http"
+
+	"k8s.io/klog/v2"
 )
 
 const (

+ 2 - 1
node/metadata/digital_ocean.go

@@ -2,8 +2,9 @@ package metadata
 
 import (
 	"io"
-	"k8s.io/klog/v2"
 	"net/http"
+
+	"k8s.io/klog/v2"
 )
 
 const doInstanceMetadataURL = "http://169.254.169.254/metadata/v1/"

+ 2 - 1
node/metadata/gcp.go

@@ -1,9 +1,10 @@
 package metadata
 
 import (
+	"strings"
+
 	gcp "cloud.google.com/go/compute/metadata"
 	"k8s.io/klog/v2"
-	"strings"
 )
 
 func getGcpMetadata() *CloudMetadata {

+ 2 - 1
node/metadata/hetzner.go

@@ -1,9 +1,10 @@
 package metadata
 
 import (
+	"net/http"
+
 	"gopkg.in/yaml.v2"
 	"k8s.io/klog/v2"
-	"net/http"
 )
 
 const hetznerInstanceMetadataURL = "http://169.254.169.254/hetzner/v1/metadata"

+ 2 - 1
node/metadata/metadata.go

@@ -2,11 +2,12 @@ package metadata
 
 import (
 	"fmt"
-	"k8s.io/klog/v2"
 	"net/http"
 	"os"
 	"strings"
 	"time"
+
+	"k8s.io/klog/v2"
 )
 
 const metadataServiceTimeout = 5 * time.Second

+ 2 - 1
node/net.go

@@ -1,11 +1,12 @@
 package node
 
 import (
+	"regexp"
+
 	"github.com/coroot/coroot-node-agent/proc"
 	"github.com/vishvananda/netlink"
 	"golang.org/x/sys/unix"
 	"inet.af/netaddr"
-	"regexp"
 )
 
 var netDeviceFilterRe = regexp.MustCompile(`^(enp\d+s\d+(f\d+)?|eth\d+|eno\d+|ens\d+|em\d+|bond\d+|p\d+p\d+|enx[0-9a-f]{12})`)

+ 2 - 1
node/net_test.go

@@ -1,8 +1,9 @@
 package node
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestNetDeviceFilter(t *testing.T) {

+ 2 - 1
node/uptime_test.go

@@ -1,8 +1,9 @@
 package node
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestNode_uptime(t *testing.T) {

+ 6 - 5
pinger/pinger.go

@@ -5,6 +5,12 @@ import (
 	"encoding/binary"
 	"errors"
 	"fmt"
+	"net"
+	"os"
+	"strings"
+	"syscall"
+	"time"
+
 	"github.com/coroot/coroot-node-agent/proc"
 	"github.com/vishvananda/netns"
 	"golang.org/x/net/icmp"
@@ -12,11 +18,6 @@ import (
 	"golang.org/x/sys/unix"
 	"inet.af/netaddr"
 	"k8s.io/klog/v2"
-	"net"
-	"os"
-	"strings"
-	"syscall"
-	"time"
 )
 
 const (

+ 2 - 1
proc/net.go

@@ -5,9 +5,10 @@ import (
 	"bytes"
 	"encoding/binary"
 	"encoding/hex"
-	"inet.af/netaddr"
 	"net"
 	"os"
+
+	"inet.af/netaddr"
 )
 
 const (

+ 2 - 1
proc/ns.go

@@ -1,11 +1,12 @@
 package proc
 
 import (
+	"runtime"
+
 	"github.com/vishvananda/netlink"
 	"github.com/vishvananda/netns"
 	"golang.org/x/sys/unix"
 	"inet.af/netaddr"
-	"runtime"
 )
 
 func GetNetNs(pid uint32) (netns.NsHandle, error) {

+ 2 - 1
proc/proc_test.go

@@ -1,10 +1,11 @@
 package proc
 
 import (
+	"testing"
+
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 	"inet.af/netaddr"
-	"testing"
 )
 
 func init() {

+ 9 - 8
profiling/profiling.go

@@ -3,6 +3,15 @@ package profiling
 import (
 	"bytes"
 	"fmt"
+	"hash/fnv"
+	"io"
+	"net/http"
+	"net/url"
+	"os"
+	"strconv"
+	"sync"
+	"time"
+
 	"github.com/coroot/coroot-node-agent/common"
 	"github.com/coroot/coroot-node-agent/containers"
 	"github.com/go-kit/log"
@@ -14,15 +23,7 @@ import (
 	"github.com/grafana/pyroscope/ebpf/symtab/elf"
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/prometheus/model/labels"
-	"hash/fnv"
-	"io"
 	"k8s.io/klog/v2"
-	"net/http"
-	"net/url"
-	"os"
-	"strconv"
-	"sync"
-	"time"
 )
 
 const (

+ 3 - 2
tracing/tracing.go

@@ -3,6 +3,9 @@ package tracing
 import (
 	"context"
 	"fmt"
+	"os"
+	"time"
+
 	"github.com/coroot/coroot-node-agent/ebpftracer/l7"
 	"go.opentelemetry.io/otel"
 	"go.opentelemetry.io/otel/attribute"
@@ -15,8 +18,6 @@ import (
 	"go.opentelemetry.io/otel/trace"
 	"inet.af/netaddr"
 	"k8s.io/klog/v2"
-	"os"
-	"time"
 )
 
 const (