-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
WIP feat: support customizing additional labels of metrics #6450
Conversation
@@ -438,6 +438,9 @@ plugin_attr: | |||
export_addr: | |||
ip: 127.0.0.1 | |||
port: 9091 | |||
# labels: | |||
#remote_addr: $remote_addr | |||
#request_method: $request_method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is useful for us. we add metrics too on our code as hard code way.
Can you list lables or give a link which labels are support on doc ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @dmsolr Can you add test cases to cover this good feature?
@@ -132,6 +132,24 @@ plugin_attr: | |||
export_uri: /apisix/metrics | |||
``` | |||
|
|||
## 如何自定义附加标签 | |||
|
|||
该插件支持在`conf/config`的`plugin_attr`部分自定义度量标签`Status codes`和`Latency`。亚马尔` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
亚马尔 ??
Maybe `yaml" ?
@@ -129,10 +129,28 @@ Here is an example: | |||
|
|||
```yaml | |||
plugin_attr: | |||
prometheus: | |||
prometheus: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prometheus: | |
prometheus: |
There seems to be a mistake here.
|
||
| Name | Type | Default | Description | | ||
| ---------- | ------ | ------- | --------------------------------- | | ||
| labels | array | | custom labels from [Nginx variables](http://nginx.org/en/docs/varindex.html) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better include the references to APISIX build-in variables as well
@@ -132,6 +132,24 @@ plugin_attr: | |||
export_uri: /apisix/metrics | |||
``` | |||
|
|||
## 如何自定义附加标签 | |||
|
|||
该插件支持在`conf/config`的`plugin_attr`部分自定义度量标签`Status codes`和`Latency`。亚马尔` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该插件支持在`conf/config`的`plugin_attr`部分自定义度量标签`Status codes`和`Latency`。亚马尔` | |
该插件支持在 `conf/config` 的 `plugin_attr` 部分自定义度量标签 `Status codes` 和 `Latency`。 |
|
||
| 名称 | 类型 | 默认值 | 描述 | ||
| --------- | ----- | -------- | ------------------------- | | ||
| labels | array | | 使用 [Nginx 变量](http://nginx.org/en/docs/varindex.html)作为自定义标签 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
What this PR does / why we need it:
Pre-submission checklist:
#4273