Skip to content

net/ghttp: MiddlewareServerTracing cannot be overridden or replaced. #4235

Open
@anythink-wx

Description

@anythink-wx

Is your feature request related to a problem?

Option Yes

Describe the solution you'd like

Image

When initializing the http server by calling g.Server, it automatically registers the internalMiddlewareServerTracing middleware internally, and I would like to be able to modify the internal working logic of this middleware, such as restricting certain interfaces from reporting span.

通过调用g.Server初始化http服务器时,其内部自动注册了 internalMiddlewareServerTracing 中间件,我希望可以修改该中间件的内部工作逻辑,比如限制某些接口不上报span。

It is desirable to provide configuration that prevents the registration of this middleware, which can be done manually.

希望提供配置可以阻止该中间件的注册,可以用手动的形式进行注册。

Describe alternatives you've considered

There is no alternative at this time as registration is in the system code base.
由于注册在系统代码库里,暂无替代方案。

Additional

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions