-
Notifications
You must be signed in to change notification settings - Fork 0
release v1.0.0. supports most system metrics #8
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
Conversation
…o_exporter into add-more-metrics-zzc
Add more metrics zzc
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.
Pull Request Overview
This PR releases version 1.0.0 with new features to collect and expose additional system and build metrics from Bamboo.
- Added new build metrics (success, failure, build count) and their collection in collector/collector.go.
- Updated documentation and CI/CD workflows to support auto release and continuous integration.
- Enhanced the main exporter to expose a Prometheus metrics endpoint.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| collector/collector.go | Adds build metrics, new response type, and updates metric collection. |
| bamboo_exporter.go | Minor update: adds a comment for exposing the metrics endpoint. |
| README.md | Updates documentation to reflect new features and usage instructions. |
| .github/workflows/release.yml | Introduces an auto release workflow; includes version validation. |
| .github/workflows/ci.yml | Adds a CI workflow to run tests, vet, and format checks. |
|
|
||
| if err := e.scrapeBuildResults(); err != nil { | ||
| e.logger.Error("Failed to scrape build results", "error", err) | ||
| e.failures.Inc() |
Copilot
AI
May 24, 2025
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.
The code increments 'e.failures' on scrapeBuildResults error, but no such metric is defined; consider changing this to 'e.buildFailure.Inc()'.
| echo "Version in file: $CURRENT_VERSION" | ||
| # 验证版本格式 (x.y.z) | ||
| if ! echo "$CURRENT_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+ |
Copilot
AI
May 24, 2025
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.
The grep pattern for version validation is incomplete and missing the closing delimiter; please complete the regular expression to properly match the x.y.z pattern.
| if ! echo "$CURRENT_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+ | |
| if ! echo "$CURRENT_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then |
| done; then | ||
| echo "❌ Invalid version format in VERSION file: $CURRENT_VERSION" | ||
| echo "Expected format: x.y.z (e.g., 1.0.0)" | ||
| exit 1 |
Copilot
AI
May 24, 2025
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.
The syntax 'done; then' appears to be erroneous in the shell script; remove or adjust it so that the conditional structure is correctly formed.
| done; then | |
| echo "❌ Invalid version format in VERSION file: $CURRENT_VERSION" | |
| echo "Expected format: x.y.z (e.g., 1.0.0)" | |
| exit 1 | |
| done |
No description provided.