-
Notifications
You must be signed in to change notification settings - Fork 0
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
COSI-19, COSI-21: Enhance Scality COSI Driver with S3 and IAM Metrics, Logging, and IAM Client Improvements #85
base: feature/COSI-65-instrument-cosi-drover-with-gprc-metrics
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
@@ Coverage Diff @@
## feature/COSI-65-instrument-cosi-drover-with-gprc-metrics #85 +/- ##
============================================================================================
- Coverage 93.67% 93.42% -0.26%
============================================================================================
Files 10 11 +1
Lines 680 745 +65
============================================================================================
+ Hits 637 696 +59
- Misses 37 41 +4
- Partials 6 8 +2 |
- use middleware for aws sdk for adding metrics for s3 and iam
7e94e8d
to
d9b904f
Compare
d9b904f
to
8880371
Compare
Name: "s3_requests_total", | ||
Help: "Total number of S3 requests, categorized by method and status.", | ||
}, | ||
[]string{"method", "status"}, |
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.
I think the S3 operation type is commonly called action
throughout the product metrics.
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.
Okay, I will change that.
Thanks
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.
same for iam
|
||
| Metric Name | Description | Labels | Example Values | | ||
|---------------------------------------------------|------------------------------------------------------------|-------------------|----------------------------------| | ||
| `scality_cosi_driver_iam_request_duration_seconds`| Histogram of IAM request durations in seconds. | `method`, `status`| `CreateUser`, `success`, `error`| |
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.
You may want to mention only one of success
or error
in the example values
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.
And in the table below for IAM Operations
note that it is the method
label
And add another table for the status
label with success
and error
|
||
| Metric Name | Description | Labels | Example Values | | ||
|---------------------------------------------------|------------------------------------------------------------|-------------------|----------------------------------| | ||
| `scality_cosi_driver_s3_request_duration_seconds` | Histogram of S3 request durations in seconds. | `method`, `status`| `CreateBucket`, `success`, `error`| |
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 about mentioning only success
or error
if [[ "$CREATE_BUCKET_COUNT" -ne "$EXPECTED_CREATE_BUCKET" ]]; then | ||
echo "Error: CreateBucket count mismatch. Found: $CREATE_BUCKET_COUNT, Expected: $EXPECTED_CREATE_BUCKET" | tee -a "$LOG_FILE" | ||
exit 1 | ||
fi |
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 is duplicated 4 times, could be a function
validate 'CreateBucket' $CREATE_BUCKET_COUNT $EXPECTED_CREATE_BUCKET $CREATE_BUCKET_DURATION
|
||
1. Verify the bucket exists. | ||
2. Use the `DeleteBucket` operation to delete the bucket. Only empty bucket deletion is supported. | ||
|
||
## Additional Resource | ||
|
||
- [gRPC-Go Prometheus Metrics](https://github.com/grpc-ecosystem/go-grpc-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.
same here update link to deprecated lib
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.
👍 using aws sdk middleware looks nice
This pull request introduces enhancements to the Scality COSI driver, including metrics for IAM and S3 operations, improved logging, and updates to the IAM client initialization process. Key highlights include:
Metrics and Observability:
IAM Client Enhancements:
Testing and Validation:
These changes improve observability, robustness, and clarity in the Scality COSI driver’s operation and metrics tracking.