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

subsegment cloudwatch latency metrics #368

Open
girotomas opened this issue Jan 13, 2023 · 1 comment
Open

subsegment cloudwatch latency metrics #368

girotomas opened this issue Jan 13, 2023 · 1 comment

Comments

@girotomas
Copy link

girotomas commented Jan 13, 2023

There is support to emit cloudwatch metrics per xray segment: https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-sdk-java-monitoring.html (Although I was not able to get it to work)

Feature Request:

Be able to emit latency metrics to cloudwatch on a SUBSEGMENT basis. Not for each segment, but also for the subsegments.

I would be able to work on this issue given guidance on how to do it.

Tagging people related to MetricsSegmentListener: @willarmiros @c1tadel

@willarmiros
Copy link
Contributor

Hi @girotomas - yes you can extend the MetricsSegmentListener using the same hooks but for subsegments instead of segments. See here for the SegmentListener interface, which includes subsegment creation/ending hooks: https://github.com/aws/aws-xray-sdk-java/blob/master/aws-xray-recorder-sdk-core/src/main/java/com/amazonaws/xray/listeners/SegmentListener.java

And the MetricsSegmentListener which creates metrics based on segments (the logic would be the same, but for subsegments): https://github.com/aws/aws-xray-sdk-java/blob/master/aws-xray-recorder-sdk-metrics/src/main/java/com/amazonaws/xray/metrics/MetricsSegmentListener.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants