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

[DISCUSS] Should we add metric for log sender and zipkin ? #2693

Closed
gy09535 opened this issue Nov 10, 2020 · 8 comments · Fixed by #3070
Closed

[DISCUSS] Should we add metric for log sender and zipkin ? #2693

gy09535 opened this issue Nov 10, 2020 · 8 comments · Fixed by #3070
Assignees

Comments

@gy09535
Copy link
Contributor

gy09535 commented Nov 10, 2020

Issue description

Now the log sender batch store the data in memory , we can not know how many logs or spans is send, so I think we can add some metric to monitor it.

Environment

  • apisix version (cmd: apisix version):
  • OS:
@gy09535 gy09535 changed the title feat: Should we add metric for logger sender and zipkin ? feat: Should we add metric for log sender and zipkin ? Nov 10, 2020
@gy09535
Copy link
Contributor Author

gy09535 commented Nov 10, 2020

I do it in my private repository should apisix need it?

@spacewander
Copy link
Member

Could you provide a design about it?

@spacewander
Copy link
Member

I think we need to allow plugin to register their metrics. Like a _M.collect method and prometheus will call them when in need.

@gy09535
Copy link
Contributor Author

gy09535 commented Nov 10, 2020

Could you provide a design about it?

When prometheus exporter init , I add a gauge to metric with label : node,route_id, type。And I export two module function inc and set to change the gauge value. In "syslog-plugin" log method, I use this module method inc it value, and in batch process I reduce it value. And zipkin is also do that.
This can help us know how many remaining spans and logs per route can not send.

@gy09535
Copy link
Contributor Author

gy09535 commented Nov 10, 2020

I think we need to allow plugin to register their metrics. Like a _M.collect method and prometheus will call them when in need.

We can add plugin init method to register their own metric,And provide api to change it value.

@spacewander spacewander changed the title feat: Should we add metric for log sender and zipkin ? [DISCUSS] Should we add metric for log sender and zipkin ? Nov 10, 2020
@spacewander
Copy link
Member

We can add plugin init method to register their own metric,And provide api to change it value.

@gy09535
Pull request is welcome!

@gy09535
Copy link
Contributor Author

gy09535 commented Nov 12, 2020

We can add plugin init method to register their own metric,And provide api to change it value.

@gy09535
Pull request is welcome!

haha, I wil do it.

@gy09535
Copy link
Contributor Author

gy09535 commented Nov 12, 2020

We can add plugin init method to register their own metric,And provide api to change it value.

@gy09535
Pull request is welcome!

Please assign to me.

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

Successfully merging a pull request may close this issue.

2 participants