-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: measure object upload bytes #280
Conversation
storage/s3/src/main/java/io/aiven/kafka/tieredstorage/storage/s3/S3Storage.java
Outdated
Show resolved
Hide resolved
e49ca4a
to
2d28abc
Compare
storage/s3/src/main/java/io/aiven/kafka/tieredstorage/storage/s3/S3Storage.java
Outdated
Show resolved
Hide resolved
374ce3f
to
5cf07cc
Compare
5cf07cc
to
268fa38
Compare
10d035f
to
4c8a116
Compare
4c8a116
to
0ae6fb3
Compare
6ee4f15
to
f41a1d7
Compare
core/src/main/java/io/aiven/kafka/tieredstorage/RemoteStorageManager.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/aiven/kafka/tieredstorage/metrics/Metrics.java
Outdated
Show resolved
Hide resolved
f41a1d7
to
21dea2b
Compare
@@ -238,17 +238,20 @@ private void uploadSegmentLog(final RemoteLogSegmentMetadata remoteLogSegmentMet | |||
throws IOException, StorageBackendException { | |||
final String fileKey = objectKey.key(remoteLogSegmentMetadata, ObjectKey.Suffix.LOG); | |||
try (final var sis = transformFinisher.toInputStream()) { | |||
uploader.upload(sis, fileKey); | |||
final var bytes = uploader.upload(sis, fileKey); | |||
metrics.recordObjectUpload(ObjectKey.Suffix.LOG, bytes); |
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.
We need a way to get the aggregated number of bytes. It seems to me, one of:
- Add a separate aggregated sensor.
- Make the suffix a tag instead of a part of the sensor name (so we can sum by this tag).
- Don't bother with separating by tag, the log files will anyway be 99%.
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.
We can follow a similar approach as with topic vs topic-partition, and have an aggregated metric on INFO level, and by object type in DEBUG, wdyt?
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.
If you feel like it
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.
Sure, giving a try now. Pushed latest changes.
21dea2b
to
ae541e9
Compare
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.
Conflicts
ae541e9
to
569a1e1
Compare
569a1e1
to
75b4b43
Compare
Changes:
upload
is expanded to return the number of bytes uploaded.