xk6-client-tracing icon indicating copy to clipboard operation
xk6-client-tracing copied to clipboard

GoError: sending queue is full

Open bilsch-nice opened this issue 8 months ago • 4 comments

I'm building a script based off of the param example and am getting an exception when I try to run:

{"dropped_items":19}
ERRO[0004] GoError: sending queue is full
        at reflect.methodValueCall (native)
        at file:///home/ubuntu/otel-tracing.js:71:16(76)  executor=ramping-vus scenario=write source=stacktrace
{"dropped_items":13}
ERRO[0004] GoError: sending queue is full
write   at reflect.methodValueCall (native)
        at file:///home/ubuntu/otel-tracing.js:71:16(76)  executor=ramping-vus scenario=write source=stacktrace
{"dropped_items":22}
ERRO[0004] GoError: sending queue is full
write   at reflect.methodValueCall (native)
        at file:///home/ubuntu/otel-tracing.js:71:16(76)  executor=ramping-vus scenario=write source=stacktrace
{"dropped_items":16}
ERRO[0004] GoError: sending queue is full
write   at reflect.methodValueCall (native)
        at file:///home/ubuntu/otel-tracing.js:71:16(76)  executor=ramping-vus scenario=write source=stacktrace
{"dropped_items":17}
ERRO[0004] GoError: sending queue is full
write   at reflect.methodValueCall (native)
        at file:///home/ubuntu/otel-tracing.js:71:16(76)  executor=ramping-vus scenario=write source=stacktrace
{}

I have modified a few parts from the original param example. The javascript for the script is as follows:

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: "20m",
};
*/

/**
 * Minimum amount of virtual users (VUs)
 * @constant {number}
 */
const MIN_VUS = 1

/**
 * Maximum amount of virtual users (VUs)
 * @constant {number}
 */
const MAX_VUS = 25;

export const options = {
  scenarios: {
    write: {
      executor: 'ramping-vus',
      exec: 'default',
      startVUs: MIN_VUS,
      stages: [
        { duration: '5m', target: MAX_VUS },
        { duration: '30m', target: MAX_VUS },
      ],
      gracefulRampDown: '1m',
    },
  },
};

const endpoint = "out.load.balancer:4317";
const client = new tracing.Client({
    endpoint,
    exporter: tracing.EXPORTER_OTLP,
    tls: {
      insecure: true,
    }
});

export default function () {
    let pushSizeTraces = randomIntBetween(2,3);
    let pushSizeSpans = 0;
    let t = [];
    for (let i = 0; i < pushSizeTraces; i++) {
        let c = randomIntBetween(5,10)
        pushSizeSpans += c;

        t.push({
            random_service_name: false,
            spans: {
                count: c,
                size: randomIntBetween(300,1000),
                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(15);
}

export function teardown() {
    client.shutdown();
}

Any ideas? What am I doing wrong here? I took the log and sleep out but otherwise the default function is unchanged.

This is running on ubuntu server compiled with go go version go1.21.9 linux/amd64.

bilsch-nice avatar Jun 24 '24 19:06 bilsch-nice