Skip to content

Commit

Permalink
chore(scripts): save debuging manifests for otel
Browse files Browse the repository at this point in the history
  • Loading branch information
ioaiaaii committed Dec 10, 2024
1 parent 093903d commit c4baaa6
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 0 deletions.
29 changes: 29 additions & 0 deletions scripts/sample-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: sample-metrics
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 2
schedule: "* * * * *"
jobTemplate:
spec:
backoffLimit: 0
ttlSecondsAfterFinished: 3600
template:
spec:
containers:
- name: traces
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:v0.96.0
args:
- metrics
- --otlp-insecure
- --rate
- "20"
- --duration
- 5s
- --otlp-endpoint
- otel-collector.observability.svc.cluster.local:4317
restartPolicy: Never

29 changes: 29 additions & 0 deletions scripts/sample-traces.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: sample-traces
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 2
schedule: "* * * * *"
jobTemplate:
spec:
backoffLimit: 0
ttlSecondsAfterFinished: 3600
template:
spec:
containers:
- name: traces
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:v0.96.0
args:
- traces
- --otlp-insecure
- --rate
- "20"
- --duration
- 5s
- --otlp-endpoint
- otel-collector.observability.svc.cluster.local:4317
restartPolicy: Never

37 changes: 37 additions & 0 deletions scripts/span.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "test-with-curl2"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "manual-test"
},
"spans": [
{
"traceId": "71699b6fe85982c7c8995ea3d9c95df2",
"spanId": "3c191d03fa8be065",
"name": "spanitron",
"kind": 2,
"droppedAttributesCount": 0,
"events": [],
"droppedEventsCount": 0,
"status": {
"code": 1
}
}
]
}
]
}
]
}
20 changes: 20 additions & 0 deletions scripts/test.pod
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Pod
metadata:
name: debug
namespace: observability
spec:
containers:
- name: debug
image: curlimages/curl:latest
command:
- sleep
- "3600" # Keep the pod running
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 50m
memory: 64Mi

34 changes: 34 additions & 0 deletions scripts/trace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": { "stringValue": "new-test-service" }
}
]
},
"scopeSpans": [
{
"spans": [
{
"traceId": "1234567890abcdef1234567890abcdef",
"spanId": "abcdef1234567890",
"name": "new-test-span",
"kind": "SPAN_KIND_INTERNAL",
"startTimeUnixNano": 1672531200000000000,
"endTimeUnixNano": 1672531205000000000,
"attributes": [
{
"key": "test.attribute",
"value": { "stringValue": "new-value" }
}
]
}
]
}
]
}
]
}

0 comments on commit c4baaa6

Please sign in to comment.