Skip to content

Commit 6dc0fdd

Browse files
authored
Merge pull request #67 from cisco-open/feature/v0.9.0/remove_entity_references
Replace all references to entity with resource
2 parents 646aeb1 + fdb60e1 commit 6dc0fdd

File tree

67 files changed

+1003
-1003
lines changed

Some content is hidden

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

67 files changed

+1003
-1003
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can do all of that in the command line using [curl](https://curl.se/) like t
3636
mkdir my-test-telemetry
3737
cd my-test-telemetry
3838
curl -O -L https://github.com/cisco-open/test-telemetry-generator/releases/download/v21.10.2/test-telemetry-generator-otel-proto-0.9.0-fatjar.jar
39-
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/entity-definition.yaml
39+
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/resource-definition.yaml
4040
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/trace-definition.yaml
4141
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/cli-target-rest.yaml
4242
```
@@ -45,7 +45,7 @@ Your `my-test-telemetry` directory should now contain the following files:
4545

4646
```shell
4747
$ ls
48-
cli-target-rest.yaml entity-definition.yaml test-telemetry-generator-otel-proto-0.9.0-fatjar.jar trace-definition.yaml
48+
cli-target-rest.yaml resource-definition.yaml test-telemetry-generator-otel-proto-0.9.0-fatjar.jar trace-definition.yaml
4949
```
5050

5151
Next, open the `cli-target-rest.yml` with an editor of your choice and set the `restURL` to your OTLP HTTP endpoint. For example, if you use an [OpenTelemetry
@@ -59,7 +59,7 @@ restURL: http://localhost:4318/v1/traces
5959
Finally, start the test-telemetry-generator:
6060
6161
```shell
62-
java -jar test-telemetry-generator-otel-proto-0.9.0-fatjar.jar -e entity-definition.yaml -s trace-definition.yaml -t cli-target-rest.yaml
62+
java -jar test-telemetry-generator-otel-proto-0.9.0-fatjar.jar -r resource-definition.yaml -s trace-definition.yaml -t cli-target-rest.yaml
6363
```
6464

6565
If all goes well, you should see test-telemetry-generator printing out some logs for you:

example-definitions/demo/entity-definition.yaml renamed to example-definitions/demo/resource-definition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17-
entities:
17+
resources:
1818
- name: frontend
1919
count: 3
2020
childrenDistribution:

example-definitions/qa/log-definition.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ logs:
2323
payloadFrequencySeconds: 20
2424
payloadCount: 10
2525
copyCount: 1000
26-
reportingEntitiesCounts:
26+
reportingResourcesCounts:
2727
container: 10
2828
pod: 10
2929
- name: logevents1
3030
severityOrderFunction: 'severityDistributionCount(["ERROR", "WARN", "DEBUG"], [1, 1, 4])'
3131
payloadFrequencySeconds: 20
3232
payloadCount: 2
3333
copyCount: 200
34-
reportingEntitiesCounts:
34+
reportingResourcesCounts:
3535
node: 30
3636
- name: logevents2
3737
severityOrderFunction: 'severityDistributionPercentage(["INFO", "TRACE"], [20, 80])'
3838
payloadFrequencySeconds: 10
3939
payloadCount: 5
40-
reportingEntitiesCounts:
40+
reportingResourcesCounts:
4141
ec2: 4
4242
container: 150

example-definitions/qa/metric-definition.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,81 +21,81 @@ metrics:
2121
unit: "{pods}"
2222
otelType: gauge
2323
valueFunction: 'arithmeticSequence(1, 2, "")'
24-
reportingEntities: [node]
24+
reportingResources: [node]
2525
- name: pod.restarts
2626
unit: "{restarts}"
2727
otelType: sum
2828
aggregationTemporality: delta
2929
valueFunction: 'arithmeticSequence(1, 0, "")'
3030
isMonotonic: true
31-
reportingEntities: [ pod ]
31+
reportingResources: [ pod ]
3232
- name: cpu.allocatable
3333
unit: "{cores}"
3434
otelType: summary
3535
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 5)'
3636
isDouble: true
3737
quantiles: [ 0, 0.5, 0.75, 1 ]
38-
reportingEntities: [ node ]
38+
reportingResources: [ node ]
3939
- name: memory.usage
4040
unit: "By"
4141
otelType: summary
4242
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 5)'
4343
quantiles: [ 0, 1 ]
44-
reportingEntities: [ pod ]
44+
reportingResources: [ pod ]
4545
- name: system.filesystem.mountpoint.limit
4646
unit: "By"
4747
otelType: summary
4848
valueFunction: 'arithmeticSequence(1, 2, "")'
4949
quantiles: [0, 1]
50-
reportingEntities: [filesystem]
50+
reportingResources: [filesystem]
5151
- name: replicas.ready
5252
unit: "{replicas}"
5353
otelType: gauge
5454
valueFunction: 'arithmeticSequence(1, 2, "")'
55-
reportingEntities: [managed_replicaset]
55+
reportingResources: [managed_replicaset]
5656
- name: resource_quota.storage.requests.usage
5757
unit: By
5858
otelType: summary
5959
quantiles: [ 0, 0.5, 0.75, 1 ]
6060
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 3)'
61-
reportingEntities: [resource_quota]
61+
reportingResources: [resource_quota]
6262
- name: container.cpu.used.utilization
6363
unit: "%"
6464
otelType: summary
6565
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 7)'
6666
isDouble: true
6767
quantiles: [ 0, 0.5, 0.75, 1 ]
68-
reportingEntities: [ container ]
68+
reportingResources: [ container ]
6969
- name: cpu.usage
7070
unit: "{cores}"
7171
otelType: summary
7272
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 5)'
7373
isDouble: true
7474
quantiles: [ 0, 0.5, 0.75, 1 ]
75-
reportingEntities: [ managed_replicaset, unmanaged_replicaset ]
75+
reportingResources: [ managed_replicaset, unmanaged_replicaset ]
7676
- name: calls_min
7777
unit: "{calls}/min"
7878
otelType: summary
7979
valueFunction: 'logarithmicSequenceSummary(23, 2, "", 3)'
8080
quantiles: [ 0, 0.5, 0.75, 1 ]
81-
reportingEntities: [ service, service_instance ]
81+
reportingResources: [ service, service_instance ]
8282
- name: pods.unknown
8383
unit: "{pods}"
8484
otelType: gauge
8585
valueFunction: 'arithmeticSequence(1, 2, "")'
86-
reportingEntities: [ pod ]
86+
reportingResources: [ pod ]
8787
- name: pods.running
8888
unit: "{pods}"
8989
otelType: gauge
9090
valueFunction: 'arithmeticSequence(1, 2, "")'
91-
reportingEntities: [ pod ]
91+
reportingResources: [ pod ]
9292
- name: pods.pending
9393
unit: "{pods}"
9494
otelType: gauge
9595
valueFunction: 'arithmeticSequence(1, 2, "")'
96-
reportingEntities: [ pod ]
96+
reportingResources: [ pod ]
9797
- name: pods.failed
9898
unit: "{pods}"
9999
otelType: gauge
100100
valueFunction: 'arithmeticSequence(1, 2, "")'
101-
reportingEntities: [ pod ]
101+
reportingResources: [ pod ]

example-definitions/qa/entity-definition.yaml renamed to example-definitions/qa/resource-definition.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17-
entities:
17+
resources:
1818
- name: cluster
1919
count: 3
2020
childrenDistribution:
@@ -47,7 +47,7 @@ entities:
4747
attributeOperations:
4848
- 'copyFromParent("cluster", "k8s.cluster.name")'
4949
runtimeModifications:
50-
- entityModificationType: ADD
50+
- resourceModificationType: ADD
5151
modificationFrequencyMinutes: 2
5252
modificationQuantity: 5
5353
endAfterMinutes: 12
@@ -86,11 +86,11 @@ entities:
8686
- 'modifyFromParent("managed_replicaset", "k8s.replicaset.name", "k8s.pod.owner.name", "")'
8787
- 'modifyFromParent("managed_replicaset", "k8s.workload.kind", "k8s.pod.owner.kind", "")'
8888
runtimeModifications:
89-
- entityModificationType: ADD
89+
- resourceModificationType: ADD
9090
modificationFrequencyMinutes: 1
9191
modificationQuantity: 15
9292
endAfterMinutes: 6
93-
- entityModificationType: CHURN
93+
- resourceModificationType: CHURN
9494
modificationFrequencyMinutes: 2
9595
modificationQuantity: 25
9696
endAfterMinutes: 8
@@ -164,7 +164,7 @@ entities:
164164
- 'copyFromParent("pod", "k8s.pod.name")'
165165
- 'copyFromParent("ec2", "host.name")'
166166
runtimeModifications:
167-
- entityModificationType: REMOVE
167+
- resourceModificationType: REMOVE
168168
modificationFrequencyMinutes: 1
169169
modificationQuantity: 5
170170
endAfterMinutes: 5
@@ -195,11 +195,11 @@ entities:
195195
host.id: 'alphanumericSequence("iaf7").concat("-aws-ec2-").concat(alphanumericSequence("pexe"))'
196196
host.name: 'alphanumericSequence("cic").concat(".host")'
197197
runtimeModifications:
198-
- entityModificationType: ADD
198+
- resourceModificationType: ADD
199199
modificationFrequencyMinutes: 1
200200
modificationQuantity: 10
201201
endAfterMinutes: 6
202-
- entityModificationType: REMOVE
202+
- resourceModificationType: REMOVE
203203
modificationFrequencyMinutes: 2
204204
modificationQuantity: 15
205205
endAfterMinutes: 8
@@ -239,11 +239,11 @@ entities:
239239
- 'copyFromParent("service", "service.namespace")'
240240
- 'modifyFromParent("service", "service.name", "service.name", "roundRobin([\"\"])")'
241241
runtimeModifications:
242-
- entityModificationType: CHURN
242+
- resourceModificationType: CHURN
243243
modificationFrequencyMinutes: 2
244244
modificationQuantity: 25
245245
endAfterMinutes: 8
246-
- entityModificationType: ADD
246+
- resourceModificationType: ADD
247247
modificationFrequencyMinutes: 1
248248
modificationQuantity: 10
249249
endAfterMinutes: 8
@@ -276,11 +276,11 @@ entities:
276276
http.host: 'IPv4Sequence("198.134.1.11")'
277277
http.port: 'roundRobin(["80", "8000", "8080"])'
278278
runtimeModifications:
279-
- entityModificationType: REMOVE
279+
- resourceModificationType: REMOVE
280280
modificationFrequencyMinutes: 1
281281
modificationQuantity: 3
282282
endAfterMinutes: 8
283-
- entityModificationType: ADD
283+
- resourceModificationType: ADD
284284
modificationFrequencyMinutes: 1
285285
modificationQuantity: 5
286286
endAfterMinutes: 6

example-definitions/simple/entity-definition.yaml renamed to example-definitions/simple/resource-definition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17-
entities:
17+
resources:
1818
- name: service
1919
count: 2
2020
childrenDistribution:

0 commit comments

Comments
 (0)