-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load Generator (locust) doesn't make the application emit traces #2051
Comments
Hello @aloussase, the load generator does generate traffic and emit traces. |
Hello @julianocosta89 thanks for your reply 2025-02-19.20-54-54.mp4I have added a demo of the behaviour I am experiencing. As you can see, the load generator doesn't seem to produce traces. Actually, before trying the load generator I wrote some scripts to simulate some scenarios, since I didn't know about the load generator. But these scripts did not cause the application to emit traces either. This makes me think that traces are being emitted from somewhere else. Do you see anything I might be doing wrong in this demo? Thank you very much. |
You are correct, I've just tested and it seems that playwright is not working properly. Thanks for reporting it, we'll look into it |
I wonder if the default Otel SDK batch 5000ms timeout is the cause here? |
I am now using this code with Playwright to simulate the application: from playwright.sync_api import sync_playwright, expect
import random
import logging
import config
logger = logging.getLogger(__name__)
def execute(n: int = 1):
"""This workflow adds some products to the cart and then checks out."""
with sync_playwright() as p:
browser = p.chromium.launch()
context = browser.new_context()
context.set_default_timeout(5000)
iterations = 0
while iterations < n:
page = context.new_page()
page.goto(config.get_app_url())
product_list = page.locator('css=[data-cy="product-list"]')
logging.debug("Got products list")
product_card = product_list.locator("a").nth(random.randrange(0, 4))
product_url = product_card.get_attribute("href")
logging.debug("Selected a product card: %s", product_url)
page.goto(f'{config.get_app_url()}{product_url}')
page.locator('css=[data-cy="product-add-to-cart"]').click()
logging.debug(f"Added product to cart")
page.locator('css=[data-cy="checkout-place-order"]').click()
logging.debug('Checked out')
iterations += 1
browser.close() With this code I do see the traces being emitted. I don't know if this helps in any way. |
@aloussase I've just merged a change on the loadgen, could you try to build it and validate if it is back to working? I was able to get it up, running and producing load, just want to double check ✅ ✅ |
I've created this issue on the |
Hi @julianocosta89 , I just pulled from main but the problem seems to persist on my side. |
When running from main, I see traces that originate from These same traces are not present in Demo 2.0.0, released earlier in the week. |
@puckpuck perfect, I'll cut a 2.0.1 release later |
@aloussase just running some tests here and I can confirm that loadgen is working: This is a span that has the attribute The only thing that I don't see is a trace that starts on the loadgen and goes through |
Hello,
I am using the Load Generator included with the demo.
I would expect it to cause the application to emit traces, but it doesn't.
I am inspecting the traces on WireShark with the following filter:
This works when I manually use the application, but not when using the Load Generator.
My guess is just hitting the API endpoints does not cause the app to emit trace data.
When exactly is trace data emitted?
The text was updated successfully, but these errors were encountered: