Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
gotomicro
ego
Repository navigation
Code
Issues
1
(1)
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
More
items
Releases
v0.6.2
v0.6.2
Compare
Choose a tag to compare
Sorry, something went wrong.
Filter
Loading
Sorry, something went wrong.
Uh oh!
There was an error while loading.
Please reload this page
.
No results found
askuy
released this
29 Jul 02:40
·
612 commits
to master since this release
v0.6.2
6b3b7de
This commit was created on GitHub.com and signed with GitHub’s
verified signature
. The key has expired.
根据环境变量EGO_LOG_EXTRA_KEYS,自定义日志,通常用于打印自定义Headers/Metadata。如用户ID(X-Ego-Uid)、订单ID(X-Ego-Order-Id)等。
* 配置格式 {key1},{key2},{key3}...,多个 key 之间通过 "," 分割。
* 比如 export EGO_LOG_EXTRA_KEYS=X-Ego-Uid,X-Ego-Order-Id
* 这些扩展的追踪字段会根据配置的 key1、key2、key3 等键名,从 Headers(HTTP) 或 Metadata(gRPC)或Context中查找对应值并打印到请求日志中
支持自定义字段通过context链路传递,将HTTP、gRPC、gorm、redis等常用中间件中传递,自定义字段例如uid、order_id,并记录到日志中。
拆分自定义header和context
You can’t perform that action at this time.