-
Notifications
You must be signed in to change notification settings - Fork 254
Add language to metrics #4758
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
base: main
Are you sure you want to change the base?
Add language to metrics #4758
Conversation
Reviewer's GuideThis PR extends Linux analytics traits by capturing the system’s LANG environment variable and including it in the metrics payload. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Hey @albfan - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -17,5 +18,6 @@ func traits() analytics.Traits { | |||
} | |||
return base. | |||
Set("os_release_name", details.Name). | |||
Set("os_release_version_id", details.VersionID) | |||
Set("os_release_version_id", details.VersionID). | |||
Set("lang", os.Getenv("LANG")) |
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.
suggestion (bug_risk): Consider using os.LookupEnv to avoid adding empty lang trait
os.Getenv returns an empty string if LANG isn’t set, resulting in an empty 'lang' trait. Use os.LookupEnv to only set the trait when LANG is defined.
This still miss mac and windows implementation |
fixes #4755
Summary by Sourcery
New Features: