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

AI observability upgrade #1587

Merged
merged 10 commits into from
Dec 16, 2024
Merged

AI observability upgrade #1587

merged 10 commits into from
Dec 16, 2024

Conversation

rinfx
Copy link
Collaborator

@rinfx rinfx commented Dec 12, 2024

本次PR是对ai系列插件可视化的整体改进,具体涉及:

ai-statistic

ai-security-guard

  • 增加调用内容安全耗时字段
  • 调大timeout

ai-cache

  • 增加cache状态字段:hit、miss、skip

ai-token-ratelimit

  • 增加限流日志字段
  • 解除对ai-statistic插件的依赖

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.50%. Comparing base (ef31e09) to head (dc9626d).
Report is 229 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1587      +/-   ##
==========================================
+ Coverage   35.91%   43.50%   +7.59%     
==========================================
  Files          69       76       +7     
  Lines       11576    12325     +749     
==========================================
+ Hits         4157     5362    +1205     
+ Misses       7104     6627     -477     
- Partials      315      336      +21     

see 69 files with indirect coverage changes

@rinfx rinfx changed the title Ai observability upgrade AI observability upgrade Dec 12, 2024
@@ -345,7 +352,7 @@ func onHttpRequestBody(ctx wrapper.HttpContext, config AISecurityConfig, body []
reqParams.Add(k, v)
}
reqParams.Add("Signature", signature)
err := config.client.Post(fmt.Sprintf("/?%s", reqParams.Encode()), [][2]string{{"User-Agent", AliyunUserAgent}}, nil, callback)
err := config.client.Post(fmt.Sprintf("/?%s", reqParams.Encode()), [][2]string{{"User-Agent", AliyunUserAgent}}, nil, callback, 2000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

超时时间暴露一个配置可以让用户自己配吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rinfx rinfx merged commit ec39d56 into alibaba:main Dec 16, 2024
11 checks passed
yunmaoQu pushed a commit to yunmaoQu/higress that referenced this pull request Dec 25, 2024
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 this pull request may close these issues.

4 participants