Skip to content
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(inputs.aerospike): Add latency info #15578

Closed
wants to merge 11 commits into from

Conversation

ajiraj2411
Copy link

@ajiraj2411 ajiraj2411 commented Jun 29, 2024

Summary

Opening a feature request for Telegraf Aerospike Plugin with Latency Info

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15579 which is duplicate of 4665

@ajiraj2411 ajiraj2411 changed the title Aerospike input plugin with latency info feat: Aerospike input plugin with latency info Jun 29, 2024
@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jun 29, 2024
Copy link
Member

@DStrand1 DStrand1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I see there's a linter issue still present, could you resolve that and my preliminary comments? Thanks!

plugins/inputs/aerospike/aerospike.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike.go Show resolved Hide resolved
plugins/inputs/aerospike/aerospike.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike.go Outdated Show resolved Hide resolved
@DStrand1 DStrand1 self-assigned this Jul 1, 2024
@DStrand1 DStrand1 changed the title feat: Aerospike input plugin with latency info feat(inputs.aerospike): Add latency info Jul 1, 2024
@telegraf-tiger telegraf-tiger bot added the plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins label Jul 1, 2024
@powersj powersj added the waiting for response waiting for response from contributor label Jul 8, 2024
@telegraf-tiger
Copy link
Contributor

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you!

@telegraf-tiger telegraf-tiger bot closed this Jul 23, 2024
@powersj
Copy link
Contributor

powersj commented Jul 24, 2024

Hi,

Would be happy to circle back around on this PR after the above changes are made. Thanks!

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Jul 24, 2024
@powersj powersj reopened this Jul 29, 2024
@powersj powersj added the waiting for response waiting for response from contributor label Jul 29, 2024
@telegraf-tiger
Copy link
Contributor

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you!

@telegraf-tiger telegraf-tiger bot closed this Aug 12, 2024
@ajiraj2411
Copy link
Author

ajiraj2411 commented Sep 1, 2024

@powersj Can you please re-open the PR? I've addressed the review comments.

cc: @srebhan @DStrand1

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Sep 1, 2024
@srebhan srebhan reopened this Sep 3, 2024
Copy link
Member

@DStrand1 DStrand1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes!

@DStrand1 DStrand1 assigned srebhan and unassigned DStrand1 Sep 5, 2024
@DStrand1 DStrand1 added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Sep 5, 2024
@srebhan
Copy link
Member

srebhan commented Sep 5, 2024

@ajiraj2411 could you please fix the failing integration test which complains about "command latency not registered". This makes me think if your change won't break the plugin with older versions of the aerospike server? If so, please add a flag to the configuration to manually enable gathering the latency!

@ajiraj2411
Copy link
Author

@srebhan As per the doc - https://aerospike.com/docs/server/reference/info?version=7&all=true#latencies, this configuration available from 5.1.

All enabled benchmarks can be tracked in Database 5.1 and later. Versions prior to 5.1 track only the auto-enabled benchmarks through the info protocol.

Can you please help me with this? We can connect if you want tomorrow.

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Sep 9, 2024

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

🥳 This pull request decreases the Telegraf binary size by -6.47 % for linux amd64 (new size: 243.8 MB, nightly size 260.6 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajiraj2411 thanks for your update! Some more small comments but we are close. Can I ask you for a favor? Could you please add an integration test with a newer version of an Aerospike container and actually collect the latency metric!? You should be able to copy and adapt the existing test.

plugins/inputs/aerospike/sample.conf Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike_test.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike_test.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike_test.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike_test.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike.go Outdated Show resolved Hide resolved
plugins/inputs/aerospike/aerospike.go Outdated Show resolved Hide resolved
Comment on lines +523 to +524
startTime, _ := time.Parse(time.TimeOnly, sTime)
endTime, _ := time.Parse(time.TimeOnly, eTime)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the returned errors as otherwise we may get strange results if the data provided by the API changes format or contains invalid values!

tests := []struct {
name string
args args
want float64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please name the variable expected.

Comment on lines +561 to +563
if got := getDurationOfTransaction(tt.args.sTimeWithTimeZone, tt.args.eTime); got != tt.want {
t.Errorf("getDurationOfTransaction() = %v, want %v", got, tt.want)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the corresponding require.Equal function!

@srebhan srebhan added the waiting for response waiting for response from contributor label Sep 16, 2024
@telegraf-tiger
Copy link
Contributor

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you!

@telegraf-tiger telegraf-tiger bot closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. waiting for response waiting for response from contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegraf Aerospike Plugin with Latency Info
5 participants