Skip to content

Commit

Permalink
Merge pull request #67 from cisco-open/feature/v0.9.0/remove_entity_r…
Browse files Browse the repository at this point in the history
…eferences

Replace all references to entity with resource
  • Loading branch information
preet-dev authored Jan 4, 2023
2 parents 646aeb1 + fdb60e1 commit 6dc0fdd
Show file tree
Hide file tree
Showing 67 changed files with 1,003 additions and 1,003 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can do all of that in the command line using [curl](https://curl.se/) like t
mkdir my-test-telemetry
cd my-test-telemetry
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
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/entity-definition.yaml
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/resource-definition.yaml
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/trace-definition.yaml
curl -O https://raw.githubusercontent.com/cisco-open/test-telemetry-generator/master/example-definitions/cli-target-rest.yaml
```
Expand All @@ -45,7 +45,7 @@ Your `my-test-telemetry` directory should now contain the following files:

```shell
$ ls
cli-target-rest.yaml entity-definition.yaml test-telemetry-generator-otel-proto-0.9.0-fatjar.jar trace-definition.yaml
cli-target-rest.yaml resource-definition.yaml test-telemetry-generator-otel-proto-0.9.0-fatjar.jar trace-definition.yaml
```

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
Expand All @@ -59,7 +59,7 @@ restURL: http://localhost:4318/v1/traces
Finally, start the test-telemetry-generator:
```shell
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
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
```

If all goes well, you should see test-telemetry-generator printing out some logs for you:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

entities:
resources:
- name: frontend
count: 3
childrenDistribution:
Expand Down
6 changes: 3 additions & 3 deletions example-definitions/qa/log-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ logs:
payloadFrequencySeconds: 20
payloadCount: 10
copyCount: 1000
reportingEntitiesCounts:
reportingResourcesCounts:
container: 10
pod: 10
- name: logevents1
severityOrderFunction: 'severityDistributionCount(["ERROR", "WARN", "DEBUG"], [1, 1, 4])'
payloadFrequencySeconds: 20
payloadCount: 2
copyCount: 200
reportingEntitiesCounts:
reportingResourcesCounts:
node: 30
- name: logevents2
severityOrderFunction: 'severityDistributionPercentage(["INFO", "TRACE"], [20, 80])'
payloadFrequencySeconds: 10
payloadCount: 5
reportingEntitiesCounts:
reportingResourcesCounts:
ec2: 4
container: 150
28 changes: 14 additions & 14 deletions example-definitions/qa/metric-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,81 +21,81 @@ metrics:
unit: "{pods}"
otelType: gauge
valueFunction: 'arithmeticSequence(1, 2, "")'
reportingEntities: [node]
reportingResources: [node]
- name: pod.restarts
unit: "{restarts}"
otelType: sum
aggregationTemporality: delta
valueFunction: 'arithmeticSequence(1, 0, "")'
isMonotonic: true
reportingEntities: [ pod ]
reportingResources: [ pod ]
- name: cpu.allocatable
unit: "{cores}"
otelType: summary
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 5)'
isDouble: true
quantiles: [ 0, 0.5, 0.75, 1 ]
reportingEntities: [ node ]
reportingResources: [ node ]
- name: memory.usage
unit: "By"
otelType: summary
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 5)'
quantiles: [ 0, 1 ]
reportingEntities: [ pod ]
reportingResources: [ pod ]
- name: system.filesystem.mountpoint.limit
unit: "By"
otelType: summary
valueFunction: 'arithmeticSequence(1, 2, "")'
quantiles: [0, 1]
reportingEntities: [filesystem]
reportingResources: [filesystem]
- name: replicas.ready
unit: "{replicas}"
otelType: gauge
valueFunction: 'arithmeticSequence(1, 2, "")'
reportingEntities: [managed_replicaset]
reportingResources: [managed_replicaset]
- name: resource_quota.storage.requests.usage
unit: By
otelType: summary
quantiles: [ 0, 0.5, 0.75, 1 ]
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 3)'
reportingEntities: [resource_quota]
reportingResources: [resource_quota]
- name: container.cpu.used.utilization
unit: "%"
otelType: summary
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 7)'
isDouble: true
quantiles: [ 0, 0.5, 0.75, 1 ]
reportingEntities: [ container ]
reportingResources: [ container ]
- name: cpu.usage
unit: "{cores}"
otelType: summary
valueFunction: 'arithmeticSequenceSummary(1, 2, "", 5)'
isDouble: true
quantiles: [ 0, 0.5, 0.75, 1 ]
reportingEntities: [ managed_replicaset, unmanaged_replicaset ]
reportingResources: [ managed_replicaset, unmanaged_replicaset ]
- name: calls_min
unit: "{calls}/min"
otelType: summary
valueFunction: 'logarithmicSequenceSummary(23, 2, "", 3)'
quantiles: [ 0, 0.5, 0.75, 1 ]
reportingEntities: [ service, service_instance ]
reportingResources: [ service, service_instance ]
- name: pods.unknown
unit: "{pods}"
otelType: gauge
valueFunction: 'arithmeticSequence(1, 2, "")'
reportingEntities: [ pod ]
reportingResources: [ pod ]
- name: pods.running
unit: "{pods}"
otelType: gauge
valueFunction: 'arithmeticSequence(1, 2, "")'
reportingEntities: [ pod ]
reportingResources: [ pod ]
- name: pods.pending
unit: "{pods}"
otelType: gauge
valueFunction: 'arithmeticSequence(1, 2, "")'
reportingEntities: [ pod ]
reportingResources: [ pod ]
- name: pods.failed
unit: "{pods}"
otelType: gauge
valueFunction: 'arithmeticSequence(1, 2, "")'
reportingEntities: [ pod ]
reportingResources: [ pod ]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

entities:
resources:
- name: cluster
count: 3
childrenDistribution:
Expand Down Expand Up @@ -47,7 +47,7 @@ entities:
attributeOperations:
- 'copyFromParent("cluster", "k8s.cluster.name")'
runtimeModifications:
- entityModificationType: ADD
- resourceModificationType: ADD
modificationFrequencyMinutes: 2
modificationQuantity: 5
endAfterMinutes: 12
Expand Down Expand Up @@ -86,11 +86,11 @@ entities:
- 'modifyFromParent("managed_replicaset", "k8s.replicaset.name", "k8s.pod.owner.name", "")'
- 'modifyFromParent("managed_replicaset", "k8s.workload.kind", "k8s.pod.owner.kind", "")'
runtimeModifications:
- entityModificationType: ADD
- resourceModificationType: ADD
modificationFrequencyMinutes: 1
modificationQuantity: 15
endAfterMinutes: 6
- entityModificationType: CHURN
- resourceModificationType: CHURN
modificationFrequencyMinutes: 2
modificationQuantity: 25
endAfterMinutes: 8
Expand Down Expand Up @@ -164,7 +164,7 @@ entities:
- 'copyFromParent("pod", "k8s.pod.name")'
- 'copyFromParent("ec2", "host.name")'
runtimeModifications:
- entityModificationType: REMOVE
- resourceModificationType: REMOVE
modificationFrequencyMinutes: 1
modificationQuantity: 5
endAfterMinutes: 5
Expand Down Expand Up @@ -195,11 +195,11 @@ entities:
host.id: 'alphanumericSequence("iaf7").concat("-aws-ec2-").concat(alphanumericSequence("pexe"))'
host.name: 'alphanumericSequence("cic").concat(".host")'
runtimeModifications:
- entityModificationType: ADD
- resourceModificationType: ADD
modificationFrequencyMinutes: 1
modificationQuantity: 10
endAfterMinutes: 6
- entityModificationType: REMOVE
- resourceModificationType: REMOVE
modificationFrequencyMinutes: 2
modificationQuantity: 15
endAfterMinutes: 8
Expand Down Expand Up @@ -239,11 +239,11 @@ entities:
- 'copyFromParent("service", "service.namespace")'
- 'modifyFromParent("service", "service.name", "service.name", "roundRobin([\"\"])")'
runtimeModifications:
- entityModificationType: CHURN
- resourceModificationType: CHURN
modificationFrequencyMinutes: 2
modificationQuantity: 25
endAfterMinutes: 8
- entityModificationType: ADD
- resourceModificationType: ADD
modificationFrequencyMinutes: 1
modificationQuantity: 10
endAfterMinutes: 8
Expand Down Expand Up @@ -276,11 +276,11 @@ entities:
http.host: 'IPv4Sequence("198.134.1.11")'
http.port: 'roundRobin(["80", "8000", "8080"])'
runtimeModifications:
- entityModificationType: REMOVE
- resourceModificationType: REMOVE
modificationFrequencyMinutes: 1
modificationQuantity: 3
endAfterMinutes: 8
- entityModificationType: ADD
- resourceModificationType: ADD
modificationFrequencyMinutes: 1
modificationQuantity: 5
endAfterMinutes: 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

entities:
resources:
- name: service
count: 2
childrenDistribution:
Expand Down
Loading

0 comments on commit 6dc0fdd

Please sign in to comment.