Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Research: support verbose tracing #4344

Open
ka3de opened this issue Dec 5, 2023 · 1 comment
Open

Research: support verbose tracing #4344

ka3de opened this issue Dec 5, 2023 · 1 comment
Labels
area: browser evaluation needed proposal needs to be validated or tested before fully implementing it in k6 triage

Comments

@ka3de
Copy link
Contributor

ka3de commented Dec 5, 2023

Research the possibilities of using the tracing implementation done in grafana/xk6-browser#1100, which was mainly targeted towards providing a representation of browser actions to end users, as a means to also provide insights for the lower level browser implementation that can be used for internal debugging purposes. Ideally the tracing functionality will be configurable to address the differences between these two scenarios.

As a minimum we should answer the following questions:

  • How should the tracing detail be configured? Accept a single flag? Accept different possible levels?
  • Which methods should be traced? With which attributes?
  • Do some of these methods require particular implementation due to its async nature?
@inancgumus
Copy link
Member

inancgumus commented Dec 5, 2023

@ka3de

For a start, it would be great to see when each instance is deadlocking. At which stage while running a script (i.e. fillform).

For the next step, it would be great to see the associated CDP messages to help with debugging. For instance:

Iter X start (even if it's not a browser iter)
  Connect / Launch
    NewConnection
      EventTargetAttachedToTarget
        NewSession
          CDP messages
        CloseSession
    NewBrowserContext (with ID)
      GrantPermissions
      AddInitScript...
    initEvents
      CDP Events
    end initEvents
  NewPage
    NewFrameManager
      ..
    NewFrameSession
      ..
    initEvents
      ..
    AutoAttach
    AddBinding
Iter End

I've added the most critical ones that can be super helpful when debugging. But it's basically tracking what happens when the fill form example runs. This is not an exhaustive list. Still, I believe coming up with a simpler prototype can help us see what we can improve later.

@inancgumus inancgumus transferred this issue from grafana/xk6-browser Jan 30, 2025
@inancgumus inancgumus added evaluation needed proposal needs to be validated or tested before fully implementing it in k6 and removed browser-triage labels Jan 30, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area: browser evaluation needed proposal needs to be validated or tested before fully implementing it in k6 triage
Projects
None yet
Development

No branches or pull requests

3 participants