Skip to content
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

处理器上的观测器无效, 服务上的观测器可以 #543

Open
hasikiFire opened this issue Jul 30, 2024 · 6 comments
Open

处理器上的观测器无效, 服务上的观测器可以 #543

hasikiFire opened this issue Jul 30, 2024 · 6 comments

Comments

@hasikiFire
Copy link

配置文件:

services:
  - name: service-9010
    addr: :9010
    # observer: observer-0 # 服务上的观测器
    handler:
      type: http2
      observer: observer-0
      metadata:
        enableStats: true # 开启统计
        observePeriod: 5s
    listener:
      type: http2
      tls:
        certFile: /etc/gost/fullchain.pem
        keyFile: /etc/gost/privkey.pem
    metadata:
      enableStats: true # 开启统计
      observePeriod: 5s
observers:
  - name: observer-0
    plugin:
      type: http
      addr: http://127.0.0.1:9000/observer
      timeout: 10s

如果将 服务上的观测器注释去掉,那就可以监听到服务的,但是 Handler 不行,导致 基于用户标识的流量统计 也无法实现

image

@hasikiFire
Copy link
Author

暂时方案是每个用户开一个 service,监听不同端口

@ginuerzh
Copy link
Member

用的哪个版本?

@hasikiFire
Copy link
Author

用的哪个版本?

应该是这版本: gogost/gost:3.0.0-nightly.2024071

@ginuerzh
Copy link
Member

ginuerzh commented Aug 1, 2024

本地没有复现。

@hasikiFire
Copy link
Author

方便贴一下你配置吗?我又试了几小时都不行。。

@ginuerzh
Copy link
Member

在最新的版本中用你提供的配置就可以。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants