aws-observability / aws-otel-collector
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 47% duplication:
    • 4,835 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,312 duplicated lines
  • 276 duplicates
system47% (2,312 lines)
Duplication per Extension
yaml67% (2,242 lines)
ps124% (52 lines)
py5% (18 lines)
Duplication per Component (primary)
config/eks98% (1,115 lines)
config/ecs71% (519 lines)
deployment-template/ecs57% (496 lines)
deployment-template/eks16% (59 lines)
tools/ssm21% (46 lines)
ROOT68% (28 lines)
deployment-template/ec29% (13 lines)
config/apprunner42% (12 lines)
tools/packaging7% (12 lines)
tools/ctl8% (12 lines)
pkg/userutils0% (0 lines)
pkg/lambdacomponents0% (0 lines)
pkg/config0% (0 lines)
pkg/logger0% (0 lines)
pkg/extraconfig0% (0 lines)
pkg/defaultcomponents0% (0 lines)
tools/linters0% (0 lines)
tools/version0% (0 lines)
tools/release0% (0 lines)
tools/workflow0% (0 lines)
e2etest/templates0% (0 lines)
e2etest0% (0 lines)
cmd/awscollector0% (0 lines)

Duplication Between Components (50+ lines)

G ROOT ROOT config/ecs config/ecs ROOT--config/ecs 146 deployment-template/ec2 deployment-template/ec2 config/ecs--deployment-template/ec2 63 config/apprunner config/apprunner config/apprunner--config/ecs 66 config/eks config/eks deployment-template/ecs deployment-template/ecs config/eks--deployment-template/ecs 57

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 276 duplicates...
Size#FoldersFilesLinesCode
85 x 2 config/eks/prometheus
config/eks/prometheus
config-memcached.yaml
config-nginx.yaml
1:87 (72%)
1:87 (78%)
view
83 x 2 config/eks/prometheus
config/eks/prometheus
config-memcached.yaml
config-redis.yaml
1:85 (70%)
1:85 (72%)
view
83 x 2 config/eks/prometheus
config/eks/prometheus
config-nginx.yaml
config-redis.yaml
1:85 (76%)
1:85 (72%)
view
66 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-haproxy.yaml
108:173 (16%)
50:115 (37%)
view
62 x 2 config/ecs
config/ecs
ecs-cloudwatch-xray.yaml
ecs-cloudwatch.yaml
16:78 (66%)
13:75 (72%)
view
62 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-jmx.yaml
174:237 (15%)
8:71 (58%)
view
53 x 2 deployment-template/ecs
deployment-template/ecs
aws-otel-ec2-sidecar-deployment-cfn.yaml
aws-otel-fargate-sidecar-deployment-c...
147:199 (26%)
148:200 (26%)
view
52 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-nginx.yaml
108:159 (12%)
8:59 (48%)
view
52 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-memcached.yaml
108:159 (12%)
8:59 (44%)
view
52 x 2 config/eks/prometheus
config/eks/prometheus
config-haproxy.yaml
config-redis.yaml
50:101 (29%)
8:59 (45%)
view
52 x 2 config/eks/prometheus
config/eks/prometheus
config-haproxy.yaml
config-nginx.yaml
50:101 (29%)
8:59 (48%)
view
52 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-redis.yaml
108:159 (12%)
8:59 (45%)
view
52 x 2 config/eks/prometheus
config/eks/prometheus
config-haproxy.yaml
config-memcached.yaml
50:101 (29%)
8:59 (44%)
view
46 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-appmesh.yaml
213:259 (11%)
48:94 (46%)
view
46 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-appmesh.yaml
1:46 (11%)
1:46 (46%)
view
42 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-haproxy.yaml
47:88 (10%)
8:49 (23%)
view
39 x 2 config/ecs
config/ecs
ecs-amp-xray-prometheus.yaml
ecs-amp-xray.yaml
22:62 (59%)
13:53 (68%)
view
39 x 2 deployment-template/ecs
deployment-template/ecs
aws-otel-ec2-sidecar-deployment-cfn.yaml
aws-otel-fargate-sidecar-deployment-c...
22:60 (19%)
30:68 (19%)
view
39 x 2 deployment-template/ecs
deployment-template/ecs
aws-otel-ec2-instance-metrics-daemon-...
aws-otel-ec2-sidecar-deployment-cfn.yaml
1:39 (25%)
1:39 (19%)
view
34 x 2 config/eks/prometheus
config/eks/prometheus
config-all.yaml
config-haproxy.yaml
272:305 (8%)
140:173 (19%)
view