Skip to content

Commit 4584e42

Browse files
authored
Merge pull request #69 from cisco-open/add/json/examples
Add JSON input examples
2 parents b261f0d + b25678a commit 4584e42

File tree

12 files changed

+952
-17
lines changed

12 files changed

+952
-17
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"globalPayloadFrequencySeconds": 30,
3+
"logs": [
4+
{
5+
"attributes": {
6+
"log.labels": "{\"generator\": roundRobin([\"Telemetry-Generator\", \"Telemetry-Generator-v2\"]), \"type\": \"k8s\"}"
7+
},
8+
"severityOrderFunction": "severityDistributionCount([\"INFO\", \"ERROR\", \"DEBUG\"], [1, 2, 3])",
9+
"payloadFrequencySeconds": 20,
10+
"payloadCount": 10,
11+
"copyCount": 1000,
12+
"reportingResourcesCounts": {
13+
"container": 10,
14+
"pod": 10
15+
}
16+
},
17+
{
18+
"severityOrderFunction": "severityDistributionCount([\"ERROR\", \"WARN\", \"DEBUG\"], [1, 1, 4])",
19+
"payloadFrequencySeconds": 20,
20+
"payloadCount": 2,
21+
"copyCount": 200,
22+
"reportingResourcesCounts": {
23+
"node": 30
24+
}
25+
},
26+
{
27+
"severityOrderFunction": "severityDistributionPercentage([\"INFO\", \"TRACE\"], [20, 80])",
28+
"payloadFrequencySeconds": 10,
29+
"payloadCount": 5,
30+
"reportingResourcesCounts": {
31+
"ec2": 4,
32+
"container": 150
33+
}
34+
}
35+
]
36+
}
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
{
2+
"payloadFrequencySeconds": 60,
3+
"payloadCount": 30,
4+
"metrics": [
5+
{
6+
"name": "pods.allocatable",
7+
"unit": "{pods}",
8+
"otelType": "gauge",
9+
"valueFunction": "arithmeticSequence(1, 2, \"\")",
10+
"reportingResources": [
11+
"node"
12+
]
13+
},
14+
{
15+
"name": "pod.restarts",
16+
"unit": "{restarts}",
17+
"otelType": "sum",
18+
"aggregationTemporality": "delta",
19+
"valueFunction": "arithmeticSequence(1, 0, \"\")",
20+
"isMonotonic": true,
21+
"reportingResources": [
22+
"pod"
23+
]
24+
},
25+
{
26+
"name": "cpu.allocatable",
27+
"unit": "{cores}",
28+
"otelType": "summary",
29+
"valueFunction": "arithmeticSequenceSummary(1, 2, \"\", 5)",
30+
"isDouble": true,
31+
"quantiles": [
32+
0,
33+
0.5,
34+
0.75,
35+
1
36+
],
37+
"reportingResources": [
38+
"node"
39+
]
40+
},
41+
{
42+
"name": "memory.usage",
43+
"unit": "By",
44+
"otelType": "summary",
45+
"valueFunction": "arithmeticSequenceSummary(1, 2, \"\", 5)",
46+
"quantiles": [
47+
0,
48+
1
49+
],
50+
"reportingResources": [
51+
"pod"
52+
]
53+
},
54+
{
55+
"name": "system.filesystem.mountpoint.limit",
56+
"unit": "By",
57+
"otelType": "summary",
58+
"valueFunction": "arithmeticSequence(1, 2, \"\")",
59+
"quantiles": [
60+
0,
61+
1
62+
],
63+
"reportingResources": [
64+
"filesystem"
65+
]
66+
},
67+
{
68+
"name": "replicas.ready",
69+
"unit": "{replicas}",
70+
"otelType": "gauge",
71+
"valueFunction": "arithmeticSequence(1, 2, \"\")",
72+
"reportingResources": [
73+
"managed_replicaset"
74+
]
75+
},
76+
{
77+
"name": "resource_quota.storage.requests.usage",
78+
"unit": "By",
79+
"otelType": "summary",
80+
"quantiles": [
81+
0,
82+
0.5,
83+
0.75,
84+
1
85+
],
86+
"valueFunction": "arithmeticSequenceSummary(1, 2, \"\", 3)",
87+
"reportingResources": [
88+
"resource_quota"
89+
]
90+
},
91+
{
92+
"name": "container.cpu.used.utilization",
93+
"unit": "%",
94+
"otelType": "summary",
95+
"valueFunction": "arithmeticSequenceSummary(1, 2, \"\", 7)",
96+
"isDouble": true,
97+
"quantiles": [
98+
0,
99+
0.5,
100+
0.75,
101+
1
102+
],
103+
"reportingResources": [
104+
"container"
105+
]
106+
},
107+
{
108+
"name": "cpu.usage",
109+
"unit": "{cores}",
110+
"otelType": "summary",
111+
"valueFunction": "arithmeticSequenceSummary(1, 2, \"\", 5)",
112+
"isDouble": true,
113+
"quantiles": [
114+
0,
115+
0.5,
116+
0.75,
117+
1
118+
],
119+
"reportingResources": [
120+
"managed_replicaset",
121+
"unmanaged_replicaset"
122+
]
123+
},
124+
{
125+
"name": "calls_min",
126+
"unit": "{calls}/min",
127+
"otelType": "summary",
128+
"valueFunction": "logarithmicSequenceSummary(23, 2, \"\", 3)",
129+
"quantiles": [
130+
0,
131+
0.5,
132+
0.75,
133+
1
134+
],
135+
"reportingResources": [
136+
"service",
137+
"service_instance"
138+
]
139+
},
140+
{
141+
"name": "pods.unknown",
142+
"unit": "{pods}",
143+
"otelType": "gauge",
144+
"valueFunction": "arithmeticSequence(1, 2, \"\")",
145+
"reportingResources": [
146+
"pod"
147+
]
148+
},
149+
{
150+
"name": "pods.running",
151+
"unit": "{pods}",
152+
"otelType": "gauge",
153+
"valueFunction": "arithmeticSequence(1, 2, \"\")",
154+
"reportingResources": [
155+
"pod"
156+
]
157+
},
158+
{
159+
"name": "pods.pending",
160+
"unit": "{pods}",
161+
"otelType": "gauge",
162+
"valueFunction": "arithmeticSequence(1, 2, \"\")",
163+
"reportingResources": [
164+
"pod"
165+
]
166+
},
167+
{
168+
"name": "pods.failed",
169+
"unit": "{pods}",
170+
"otelType": "gauge",
171+
"valueFunction": "arithmeticSequence(1, 2, \"\")",
172+
"reportingResources": [
173+
"pod"
174+
]
175+
}
176+
]
177+
}
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"resources": [
3+
{
4+
"name": "frontend",
5+
"count": 3,
6+
"childrenDistribution": {
7+
"frontend_instance": "distribution(1, 1, 1)"
8+
},
9+
"attributes": {
10+
"service.name": "\"frontend\"",
11+
"service.namespace": "\"opentelemetry-demo\""
12+
}
13+
},
14+
{
15+
"name": "frontend_instance",
16+
"count": 6,
17+
"attributes": {
18+
"telemetry.sdk.name": "\"opentelemetry\"",
19+
"telemetry.sdk.language": "\"nodejs\"",
20+
"telemetry.sdk.version": "counter('1.2.')"
21+
},
22+
"attributeOperations": [
23+
"copyFromParent(\"container\", \"container.name\")",
24+
"copyFromParent(\"container\", \"container.id\")",
25+
"copyFromParent(\"frontend\", \"service.name\")",
26+
"copyFromParent(\"frontend\", \"telemetry.sdk.language\")",
27+
"copyFromParent(\"frontend\", \"service.namespace\")",
28+
"modifyFromParent(\"frontend\", \"service.name\", \"service.instance_id\", \"counter(\\\"-\\\")\")"
29+
]
30+
},
31+
{
32+
"name": "checkout",
33+
"count": 3,
34+
"childrenDistribution": {
35+
"checkout_instance": "distribution(1, 1, 1)"
36+
},
37+
"attributes": {
38+
"service.name": "\"checkout\"",
39+
"service.namespace": "\"opentelemetry-demo\""
40+
}
41+
},
42+
{
43+
"name": "checkout_instance",
44+
"count": 6,
45+
"attributes": {
46+
"telemetry.sdk.name": "\"opentelemetry\"",
47+
"telemetry.sdk.language": "\"go\"",
48+
"telemetry.sdk.version": "counter('1.3.')"
49+
},
50+
"attributeOperations": [
51+
"copyFromParent(\"container\", \"container.name\")",
52+
"copyFromParent(\"container\", \"container.id\")",
53+
"copyFromParent(\"checkout\", \"service.name\")",
54+
"copyFromParent(\"checkout\", \"telemetry.sdk.language\")",
55+
"copyFromParent(\"checkout\", \"service.namespace\")",
56+
"modifyFromParent(\"checkout\", \"service.name\", \"service.instance_id\", \"counter(\\\"-\\\")\")"
57+
]
58+
},
59+
{
60+
"name": "email",
61+
"count": 3,
62+
"childrenDistribution": {
63+
"email_instance": "distribution(1, 1, 1)"
64+
},
65+
"attributes": {
66+
"service.name": "\"email\"",
67+
"service.namespace": "\"opentelemetry-demo\""
68+
}
69+
},
70+
{
71+
"name": "email_instance",
72+
"count": 6,
73+
"attributes": {
74+
"telemetry.sdk.name": "\"opentelemetry\"",
75+
"telemetry.sdk.language": "\"ruby\"",
76+
"telemetry.sdk.version": "counter('0.1.')"
77+
},
78+
"attributeOperations": [
79+
"copyFromParent(\"container\", \"container.name\")",
80+
"copyFromParent(\"container\", \"container.id\")",
81+
"copyFromParent(\"email\", \"service.name\")",
82+
"copyFromParent(\"email\", \"telemetry.sdk.language\")",
83+
"copyFromParent(\"email\", \"service.namespace\")",
84+
"modifyFromParent(\"email\", \"service.name\", \"service.instance_id\", \"counter(\\\"-\\\")\")"
85+
]
86+
},
87+
{
88+
"name": "currency",
89+
"count": 3,
90+
"childrenDistribution": {
91+
"currency_instance": "distribution(1, 1, 1)"
92+
},
93+
"attributes": {
94+
"service.name": "\"currency\"",
95+
"service.namespace": "\"opentelemetry-demo\""
96+
}
97+
},
98+
{
99+
"name": "currency_instance",
100+
"count": 6,
101+
"attributes": {
102+
"telemetry.sdk.name": "\"opentelemetry\"",
103+
"telemetry.sdk.language": "\"cpp\"",
104+
"telemetry.sdk.version": "counter('0.1.')"
105+
},
106+
"attributeOperations": [
107+
"copyFromParent(\"container\", \"container.name\")",
108+
"copyFromParent(\"container\", \"container.id\")",
109+
"copyFromParent(\"currency\", \"service.name\")",
110+
"copyFromParent(\"currency\", \"telemetry.sdk.language\")",
111+
"copyFromParent(\"currency\", \"service.namespace\")",
112+
"modifyFromParent(\"currency\", \"service.name\", \"service.instance_id\", \"counter(\\\"-\\\")\")"
113+
]
114+
}
115+
]
116+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"traceCompletionTimeoutSecs": 120,
3+
"rootSpans": [
4+
{
5+
"name": "checkout",
6+
"spanKind": "SPAN_KIND_SERVER",
7+
"reportingResource": "frontend_instance",
8+
"attributes": {
9+
"http.method": "\"POST\"",
10+
"http.url": "\"/checkout/\".concat(UUIDFromStringCounter(\"checkout\"))"
11+
},
12+
"childSpans": [
13+
"doCheckout"
14+
],
15+
"payloadCount": 10,
16+
"copyCount": 5
17+
}
18+
],
19+
"childSpans": [
20+
{
21+
"name": "doCheckout",
22+
"errorFrequency": 5,
23+
"reportingResource": "checkout_instance",
24+
"spanKind": "SPAN_KIND_SERVER",
25+
"childSpans": [
26+
"sendEmail",
27+
"convertCurrency"
28+
],
29+
"attributes": {
30+
"http.method": "\"POST\"",
31+
"http.url": "\"/api/v1/checkout/\".concat(UUIDFromStringCounter(\"checkout\"))"
32+
}
33+
},
34+
{
35+
"name": "sendEmail",
36+
"reportingResource": "email_instance",
37+
"spanKind": "SPAN_KIND_SERVER",
38+
"attributes": {
39+
"http.method": "\"POST\"",
40+
"http.url": "\"/sendEmail\""
41+
}
42+
},
43+
{
44+
"name": "convertCurrency",
45+
"errorFrequency": 7,
46+
"reportingResource": "currency_instance",
47+
"spanKind": "SPAN_KIND_SERVER",
48+
"attributes": {
49+
"http.method": "\"GET\"",
50+
"http.url": "\"/currency/convert/\".concat(roundRobin([\"YEN\",\"BZR\"])).concat(\"/\").concat(roundRobin([\"EUR\", \"USD\"]))"
51+
}
52+
}
53+
]
54+
}

0 commit comments

Comments
 (0)