8000 Running several wasm modules but exposing a single pprof endpoint · Issue #107 · dispatchrun/wzprof · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Running several wasm modules but exposing a single pprof endpoint #107
Open
@alban

Description

@alban

I have a Go application (inspektor-gadget/inspektor-gadget#3992) that can potentially run several independent WASM modules with wazero. I am trying to use wzprof to expose pprof on a single TCP port, but it does not seem supported:

  • wzprof.Handler() is instantiated for a specific Profiling instance. I cannot call wzprof.ProfilingFor multiple times for a single http handler.
  • wzprof.Handler() cannot use a different path than "/debug/pprof/" because the handler would fail on pprof.go#L146 (strings.CutPrefix), so I cannot use several http handlers on separate URLs for different WASM modules.

At the moment, I listen on a different TCP port for each WASM module. Is it possible to use wzprof.Handler() in a different way to avoid using different TCP ports?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branch 2C8B es or pull requests

    Issue actions

      0