You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project might make an interesting "verification" step when standing up a new Tempo cluster. Currently, we document a few ways of getting data into the cluster which requires users to have already instrumented something and to be ready to start pushing traces. Could this replace the deprecated synthetic load generator?
Here is perhaps an easy way for kubernetes users to get started using k6, taken from a lab environment.
apiVersion: v1data:
param.js: | import { sleep } from 'k6' import tracing from 'k6/x/tracing' import { randomIntBetween } from 'https://jslib.k6.io/k6-utils/1.2.0/index.js' export let options = { vus: 1, duration: '1m', } const client = new tracing.Client({ endpoint: 'tempo.trace.svc.cluster.znet:4317', exporter: tracing.EXPORTER_OTLP, insecure: true, headers: { 'X-Scope-OrgID': 'k6' }, }) export default function () { let pushSizeTraces = randomIntBetween(2, 3) let pushSizeSpans = 0 let t = [] for (let i = 0; i < pushSizeTraces; i++) { let c = randomIntBetween(5, 35) pushSizeSpans += c t.push({ random_service_name: false, spans: { count: c, size: randomIntBetween(300, 30000), random_name: true, fixed_attrs: { test: 'test', }, }, }) } let gen = new tracing.ParameterizedGenerator(t) let traces = gen.traces() client.push(traces) console.log( `Pushed ${pushSizeSpans} spans from ${pushSizeTraces} different traces. Here is a random traceID: ${ t[Math.floor(Math.random() * t.length)].id }` ) sleep(1) } export function teardown() { client.shutdown() }kind: ConfigMapmetadata:
name: k6-tracing-confignamespace: trace
---
apiVersion: batch/v1kind: CronJobmetadata:
name: k6-tracingnamespace: tracespec:
jobTemplate:
spec:
backoffLimit: 1template:
metadata:
labels:
name: k6-tracingspec:
containers:
- args:
- run
- /config/param.jsimage: zalegrala/xk6-client-tracing:latestimagePullPolicy: Alwaysname: k6-tracingports:
- containerPort: 6565name: nonevolumeMounts:
- mountPath: /configname: k6-tracing-configrestartPolicy: Nevervolumes:
- configMap:
name: k6-tracing-configname: k6-tracing-configttlSecondsAfterFinished: 604800schedule: '*/10 * * * *'
The above CronJob will run k6 every 10 minutes for 1 minute. Is this worth working into this project, and perhaps writing a bit of documentation for users to verify a new cluster? Perhaps there is value in keeping a job around even if you have a running cluster.
The text was updated successfully, but these errors were encountered:
This project might make an interesting "verification" step when standing up a new Tempo cluster. Currently, we document a few ways of getting data into the cluster which requires users to have already instrumented something and to be ready to start pushing traces. Could this replace the deprecated synthetic load generator?
Here is perhaps an easy way for kubernetes users to get started using k6, taken from a lab environment.
The above CronJob will run k6 every 10 minutes for 1 minute. Is this worth working into this project, and perhaps writing a bit of documentation for users to verify a new cluster? Perhaps there is value in keeping a job around even if you have a running cluster.
The text was updated successfully, but these errors were encountered: