Skip to content

Commit 80e0dd8

Browse files
authored
Merge pull request #1 from cisco-open/import/all/code
Import all code from private repo
2 parents d57eca4 + fb15f1f commit 80e0dd8

File tree

90 files changed

+8688
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+8688
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
.gradle
3+
build
4+
/logs

build.gradle

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
plugins {
2+
id 'java'
3+
id 'java-library'
4+
}
5+
6+
sourceSets {
7+
main {
8+
resources {
9+
srcDirs "example-definitions", "config"
10+
}
11+
}
12+
}
13+
14+
group="io.opentelemetry.contrib"
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
api group: 'jakarta.el', name: 'jakarta.el-api', version: '4.0.0'
22+
api group: 'org.glassfish', name: 'jakarta.el', version: '4.0.2'
23+
api group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
24+
api group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.11'
25+
api group: 'org.projectlombok', name: 'lombok', version: '1.18.20'
26+
api group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.13.2'
27+
api group: 'io.opentelemetry', name: 'opentelemetry-proto', version: '1.6.0-alpha'
28+
api group: 'com.google.guava', name: 'guava', version: 'r05'
29+
api group: 'org.apache.commons', name: 'commons-collections4', version: '4.4'
30+
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
31+
api group: 'commons-cli', name: 'commons-cli', version: '1.5.0'
32+
api group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0.1'
33+
api group: 'com.github.f4b6a3', name: 'uuid-creator', version: '4.3.1'
34+
api group: 'io.grpc', name: 'grpc-protobuf', version: '1.44.0'
35+
api group: 'io.grpc', name: 'grpc-stub', version: '1.44.0'
36+
api group: 'io.grpc', name: 'grpc-netty', version: '1.44.0'
37+
api group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.48.Final'
38+
api group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.2'
39+
40+
implementation group: 'org.testng', name: 'testng', version: '7.5'
41+
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.20'
42+
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.20'
43+
}
44+
45+
test {
46+
useTestNG()
47+
}
48+
49+
task fatJar(type: Jar) {
50+
classifier("all")
51+
manifest {
52+
attributes 'Main-Class': 'io.opentelemetry.contrib.generator.telemetry.cli.CLIProcessor'
53+
}
54+
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
55+
with jar
56+
}
57+
58+
jar {
59+
manifest {
60+
attributes 'Main-Class': 'io.opentelemetry.contrib.generator.telemetry.cli.CLIProcessor'
61+
}
62+
finalizedBy fatJar
63+
}

config/logback-test.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration debug="true">
3+
4+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
5+
<encoder>
6+
<pattern>
7+
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{25} - %msg%n
8+
</pattern>
9+
</encoder>
10+
</appender>
11+
12+
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
13+
<file>logs/generator.log</file>
14+
<append>false</append>
15+
<encoder>
16+
<pattern>
17+
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{25} - %msg%n
18+
</pattern>
19+
</encoder>
20+
</appender>
21+
22+
23+
<root level="${LOG_LEVEL:-INFO}">
24+
<appender-ref ref="STDOUT"/>
25+
<appender-ref ref="FILE"/>
26+
</root>
27+
28+
</configuration>
Lines changed: 288 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
entities:
2+
- name: cluster
3+
count: 3
4+
childrenDistribution:
5+
namespace: 'distribution(3, 0, 0)'
6+
node: 'distribution(5, 2, 10)'
7+
attributes:
8+
k8s.cluster.name: '"cluster-".concat(alphanumericSequence("dppteam"))'
9+
- name: namespace
10+
count: 10
11+
childrenDistribution:
12+
resource_quota: 'distribution(2, 2, 1)'
13+
managed_replicaset: 'distribution(2, 0, 0)'
14+
workload: 'distribution(3, 5, 5)'
15+
attributes:
16+
k8s.namespace.name: 'counter("namesxace")'
17+
attributeOperations:
18+
- 'copyFromParent("cluster", "k8s.cluster.name")'
19+
- name: node
20+
count: 25
21+
childrenDistribution:
22+
pod: 'distribution(3, 0, 0)'
23+
attributes:
24+
k8s.node.uid: 'alphanumericSequence("remodel").concat(".node")'
25+
k8s.node.name: 'alphanumericSequence("amzc").concat(".node")'
26+
cloud.provider: 'roundRobin(["AWS", "GCP", "Azure"])'
27+
k8s.node.system.uuid: 'UUIDFromStringCounter("node")'
28+
cloud.host.instance.id: 'alphanumericSequence("io1").concat("-").concat(alphanumericSequence("taylbee"))'
29+
k8s.node.ip.internal: 'IPv4Sequence("10.134.1.101")'
30+
k8s.node.role: 'roundRobin(["master", "worker"])'
31+
attributeOperations:
32+
- 'copyFromParent("cluster", "k8s.cluster.name")'
33+
runtimeModifications:
34+
- entityModificationType: ADD
35+
modificationFrequencyMinutes: 2
36+
modificationQuantity: 5
37+
endAfterMinutes: 12
38+
- name: resource_quota
39+
count: 25
40+
attributes:
41+
k8s.rq.name: 'alphanumericSequence("uoi").concat(".resource_quota")'
42+
k8s.resource_quota.uid: 'alphanumericSequence("remodel").concat(".resource_quota")'
43+
attributeOperations:
44+
- 'copyFromParent("namespace", "k8s.cluster.name")'
45+
- 'copyFromParent("namespace", "k8s.namespace.name")'
46+
- name: workload
47+
count: 50
48+
childrenDistribution:
49+
pod: 'distribution(1, 10, 5)'
50+
attributes:
51+
k8s.workload.name: 'alphanumericSequence("craps").concat(".workload")'
52+
attributeOperations:
53+
- 'copyFromParent("namespace", "k8s.cluster.name")'
54+
- 'copyFromParent("namespace", "k8s.namespace.name")'
55+
- name: pod
56+
count: 75
57+
childrenDistribution:
58+
container: 'distribution(2, 0, 0)'
59+
attributes:
60+
k8s.pod.ip: 'IPv4Sequence("153.29.54.1")'
61+
k8s.pod.status: 'roundRobin(["Pending","Running","Succeeded","Unknown"])'
62+
k8s.pod.uid: 'alphanumericSequence("new.model").concat(".pod")'
63+
attributeOperations:
64+
- 'copyFromParent("workload", "k8s.cluster.name")'
65+
- 'copyFromParent("node", "k8s.node.uid")'
66+
- 'copyFromParent("workload", "k8s.namespace.name")'
67+
- 'copyFromParent("node", "k8s.node.name")'
68+
- 'copyFromParent("node", "k8s.node.ip.internal")'
69+
- 'modifyFromParent("node", "k8s.cluster.name", "k8s.pod.name", "counter(\"-pod-\")")'
70+
- 'modifyFromParent("managed_replicaset", "k8s.replicaset.name", "k8s.pod.owner.name", "")'
71+
- 'modifyFromParent("managed_replicaset", "k8s.workload.kind", "k8s.pod.owner.kind", "")'
72+
runtimeModifications:
73+
- entityModificationType: ADD
74+
modificationFrequencyMinutes: 1
75+
modificationQuantity: 15
76+
endAfterMinutes: 6
77+
- entityModificationType: CHURN
78+
modificationFrequencyMinutes: 2
79+
modificationQuantity: 25
80+
endAfterMinutes: 8
81+
- name: managed_replicaset
82+
count: 20
83+
childrenDistribution:
84+
pod: 'distribution(3, 15, 15)'
85+
attributes:
86+
k8s.replicaset.uid: 'alphanumericSequence("remodel").concat(".managed_replicaset")'
87+
k8s.replicaset.owner.name: 'alphanumericSequence("dpprep").concat(".replicaset-owner")'
88+
k8s.namespace.name: 'counter("namesxace")'
89+
k8s.cluster.name: '"cluster-".concat(alphanumericSequence("dppteam"))'
90+
k8s.replicaset.name: 'alphanumericSequence("nrec").concat(".replicaset")'
91+
k8s.workload.kind: 'roundRobin(["managed_replicaset"])'
92+
appd.workload.subtype: 'roundRobin(["statefulset", "daemonset"])'
93+
- name: unmanaged_replicaset
94+
count: 20
95+
childrenDistribution:
96+
pod: 'distribution(3, 15, 15)'
97+
attributes:
98+
k8s.replicaset.uid: 'alphanumericSequence("remodel").concat(".unmanaged_replicaset")'
99+
k8s.namespace.name: 'counter("namesxace")'
100+
k8s.cluster.name: '"cluster-".concat(alphanumericSequence("dppteam"))'
101+
k8s.replicaset.name: 'alphanumericSequence("nrec").concat(".replicaset")'
102+
k8s.workload.kind: 'roundRobin(["unmanaged_replicaset"])'
103+
- name: deployment
104+
count: 12
105+
childrenDistribution:
106+
managed_replicaset: 'distribution(1, 3, 2)'
107+
attributes:
108+
k8s.deployment.uid: 'alphanumericSequence("remodel").concat(".deployment")'
109+
k8s.deployment.name: 'alphanumericSequence("dpprep").concat(".replicaset-owner")'
110+
k8s.namespace.name: 'counter("namesxace")'
111+
k8s.cluster.name: '"cluster-".concat(alphanumericSequence("dppteam"))'
112+
- name: pvc
113+
count: 20
114+
attributes:
115+
k8s.pvc.uid: 'alphanumericSequence("remodel").concat(".pvc")'
116+
k8s.pvc.name: 'alphanumericSequence("vxe4").concat(".pvc")'
117+
attributeOperations:
118+
- 'copyFromParent("namespace", "k8s.cluster.name")'
119+
- 'copyFromParent("namespace", "k8s.namespace.name")'
120+
- name: disk_infra
121+
count: 100
122+
attributes:
123+
disk.device: '"device-".concat(alphanumericSequence("amx3q"))'
124+
attributeOperations:
125+
- 'copyFromParent("aws_ec2", "host.id")'
126+
- name: network
127+
count: 120
128+
attributes:
129+
clou.network.id: 'alphanumericSequence("IDfr3x").concat(".network")'
130+
attributeOperations:
131+
- 'copyFromParent("aws_ec2", "host.id")'
132+
- name: filesystem
133+
count: 80
134+
attributes:
135+
filesystem.mount_point: 'counter("/dev/sdb")'
136+
filesystem.type: 'roundRobin(["ext2", "ext3", "ext4", "xfs"])'
137+
attributeOperations:
138+
- 'copyFromParent("ec2", "host.id")'
139+
- name: container
140+
count: 150
141+
attributes:
142+
container.id: 'alphanumericSequence("iz1").concat("xr1f79").concat(alphanumericSequence("i5q")).concat("1v0dka4appd07oc11v0dka4appd07oc11v0dka4appd07oc1peak")'
143+
container.id.short: 'alphanumericSequence("iz1").concat("xr1f79").concat(alphanumericSequence("i5q"))'
144+
container.name: 'alphanumericSequence("omat").concat(".container")'
145+
container.image.name: '"dtr.corp.appdynamics.com/".concat(roundRobin(["cps", "dpp", "dis", "fmm"])).concat("/").concat(alphanumericSequence("a1sat34x"))'
146+
attributeOperations:
147+
- 'copyFromParent("pod", "k8s.namespace.name")'
148+
- 'copyFromParent("pod", "k8s.pod.name")'
149+
- 'copyFromParent("ec2", "host.name")'
150+
runtimeModifications:
151+
- entityModificationType: REMOVE
152+
modificationFrequencyMinutes: 1
153+
modificationQuantity: 5
154+
endAfterMinutes: 5
155+
- name: classic_load_balancer
156+
count: 50
157+
attributes:
158+
cloud.loadbalancer.id: 'alphanumericSequence("iz1").concat("xr1f79").concat(alphanumericSequence("ID-CLB"))'
159+
cloud.platform: 'roundRobin(["aws_classic_load_balancer"])'
160+
- name: application_load_balancer
161+
count: 80
162+
attributes:
163+
cloud.loadbalancer.id: 'alphanumericSequence("iz1").concat("xr1f79").concat(alphanumericSequence("ID-ALB"))'
164+
cloud.platform: 'roundRobin(["aws_application_load_balancer"])'
165+
- name: network_load_balancer
166+
count: 80
167+
attributes:
168+
cloud.loadbalancer.id: 'alphanumericSequence("iz1").concat("xr1f79").concat(alphanumericSequence("ID-NLB"))'
169+
cloud.platform: 'roundRobin(["aws_network_load_balancer"])'
170+
- name: ec2
171+
count: 80
172+
childrenDistribution:
173+
disk_infra: 'distribution(1, 0, 0)'
174+
network: 'distribution(1, 2, 1)'
175+
container: 'distribution(1, 10, 1)'
176+
filesystem: 'distribution(1, 0, 0)'
177+
attributes:
178+
cloud.platform: 'roundRobin(["aws_ec2"])'
179+
host.id: 'alphanumericSequence("iaf7").concat("-aws-ec2-").concat(alphanumericSequence("pexe"))'
180+
host.name: 'alphanumericSequence("cic").concat(".host")'
181+
runtimeModifications:
182+
- entityModificationType: ADD
183+
modificationFrequencyMinutes: 1
184+
modificationQuantity: 10
185+
endAfterMinutes: 6
186+
- entityModificationType: REMOVE
187+
modificationFrequencyMinutes: 2
188+
modificationQuantity: 15
189+
endAfterMinutes: 8
190+
- name: vm
191+
count: 80
192+
childrenDistribution:
193+
disk_infra: 'distribution(1, 0, 0)'
194+
container: 'distribution(1, 10, 1)'
195+
filesystem: 'distribution(1, 0, 0)'
196+
attributes:
197+
cloud.platform: 'roundRobin(["azure_vm"])'
198+
host.id: 'alphanumericSequence("i4fc").concat("-azure-vm-").concat(alphanumericSequence("pldsj4e"))'
199+
- name: host_cloud
200+
count: 3
201+
childrenDistribution:
202+
vm: 'distribution(2, 1, 0)'
203+
attributes:
204+
host.id: '"ID-".concat(alphanumericSequence("i4fc")).concat("-azure-vm-")'
205+
cloud.provider: '"device-".concat(alphanumericSequence("a3x"))'
206+
cloud.account.id: '"ID-".concat(alphanumericSequence("a3xzq9"))'
207+
- name: service
208+
count: 4
209+
childrenDistribution:
210+
service_instance: 'distribution(1, 0, 0)'
211+
business_transaction: 'distribution(1, 0, 0)'
212+
service_endpoint: 'distribution(1, 0, 0)'
213+
attributes:
214+
service.name: '"service-".concat(alphanumericSequence("alerting-test"))'
215+
service.namespace: 'counter("svcnamespace")'
216+
- name: service_instance
217+
count: 40
218+
childrenDistribution:
219+
instance_endpoint: 'distribution(1, 0, 0)'
220+
attributes:
221+
service.instance.id: 'counter("alerting-svc-instance")'
222+
attributeOperations:
223+
- 'copyFromParent("service", "service.namespace")'
224+
- 'modifyFromParent("service", "service.name", "service.name", "roundRobin([\"\"])")'
225+
runtimeModifications:
226+
- entityModificationType: CHURN
227+
modificationFrequencyMinutes: 2
228+
modificationQuantity: 25
229+
endAfterMinutes: 8
230+
- entityModificationType: ADD
231+
modificationFrequencyMinutes: 1
232+
modificationQuantity: 10
233+
endAfterMinutes: 8
234+
- name: business_transaction
235+
count: 4
236+
attributes:
237+
bt.name: '"bt-".concat(alphanumericSequence("trx"))'
238+
attributeOperations:
239+
- 'copyFromParent("service", "service.namespace")'
240+
- 'modifyFromParent("service", "service.name", "service.name", "roundRobin([\"\"])")'
241+
- name: service_endpoint
242+
count: 4
243+
attributes:
244+
endpoint.name: 'counter("alerting-svc-endpoint")'
245+
attributeOperations:
246+
- 'copyFromParent("service", "service.namespace")'
247+
- 'modifyFromParent("service", "service.name", "service.name", "roundRobin([\"\"])")'
248+
- name: instance_endpoint
249+
count: 4
250+
attributes:
251+
endpoint.name: 'counter("alerting-instance-endpoint")'
252+
attributeOperations:
253+
- 'copyFromParent("service_instance", "service.namespace")'
254+
- 'copyFromParent("service_instance", "service.name")'
255+
- 'copyFromParent("service_instance", "service.instance.id")'
256+
- name: http_backend
257+
count: 4
258+
attributes:
259+
backend.name: 'roundRobin(["alerting-svc-backend"])'
260+
http.host: 'IPv4Sequence("198.134.1.11")'
261+
http.port: 'roundRobin(["80", "8000", "8080"])'
262+
runtimeModifications:
263+
- entityModificationType: REMOVE
264+
modificationFrequencyMinutes: 1
265+
modificationQuantity: 3
266+
endAfterMinutes: 8
267+
- entityModificationType: ADD
268+
modificationFrequencyMinutes: 1
269+
modificationQuantity: 5
270+
endAfterMinutes: 6
271+
- name: request
272+
count: 3
273+
attributes:
274+
type: 'roundRobin(["HTTP", "JMS", "HTTPS"])'
275+
async: 'roundRobin(["true", "false"])'
276+
- name: database_backend
277+
count: 3
278+
attributes:
279+
backend.name: '"database_backend-".concat(alphanumericSequence("coushin"))'
280+
- name: messaging_backend
281+
count: 3
282+
attributes:
283+
backend.name: '"messaging_backend-".concat(alphanumericSequence("msgy"))'
284+
- name: custom_backend
285+
count: 3
286+
attributes:
287+
type: 'roundRobin(["messaging_backend", "database_backend", "http_backend"])'
288+
backend.name: '"custom_backend-".concat(alphanumericSequence("msgy"))'

0 commit comments

Comments
 (0)