The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
yujianwjj

go 有像 Java agent 这种的技术吗?

  •  
  •   yujianwjj · Apr 7, 2023 · 3430 views
    This topic created in 1156 days ago, the information mentioned may be changed or developed.

    java agent 可以在不修改源代码的情况下,来对程序做 instrument 。这个在实际中有很多应用,比如搞个 java agent 做可观测性相关的工作。

    请教一下,go 有这种类似的方案和技术吗?

    4 replies    2023-04-07 15:51:18 +08:00
    monsterxx03
        1
    monsterxx03  
       Apr 7, 2023
    做过个类似的东西 https://github.com/monsterxx03/gospy

    不过只能读 runtime 信息,不能动态注入指令, 用处是不很大,但挺好玩的, 具体原理可以看 https://blog.monsterxx03.com/2019/09/20/gospy-non-invasive-goroutine-inspector/
    yanmu6626
        2
    yanmu6626  
       Apr 7, 2023
    涉及到 native 层,大多用钩子
    cookgo
        3
    cookgo  
       Apr 7, 2023
    ixiaohei
        4
    ixiaohei  
       Apr 7, 2023
    现在潮流往 opentelemetry 走,统一的 instrument ,各种中间件厂商自己接入,对于支持 instrument 的组件,应用集成 sdk 就会可以 export 的了; golang 真心不建议走 java 以前玩 APM 的老路,而且 opentelemetry 就是 CNCF 顶级项目
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2874 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 165ms · UTC 05:06 · PVG 13:06 · LAX 22:06 · JFK 01:06
    ♥ Do have faith in what you're doing.