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

Display Broker and Brokerset Information in Orion UI #315

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

yisheng-zhou
Copy link
Contributor

This update enables Orion to store and display metrics for brokers and brokersets within the Orion interface.

Details

Broker Class

  • Introduces two new maps:
    • rawBrokerStatus: Stores raw data from the metrics API call as a map of String -> Double. Example: cpu_usage -> 0.22.
    • brokerStatus: Contains the keys and values that are displayed in the Orion UI. Both values are strings. Example: "CPU Usage" and "22%".

Brokerset Class

  • Also includes two new maps:
    • rawBrokersetStatus: Stores raw data after aggregating values across all brokers as a map of String -> Double. Example: max_cpu_usage -> 0.22.
    • brokersetStatus: Contains the keys and values to be shown in the Orion UI. Both values are strings. Example: "Max CPU Usage Across All Brokers" and "22%".

BrokerMetricsSensor Class

  • This class will be overridden by a sensor from the internal package.
  • The sensor is intended to periodically call metrics APIs, such as the CloudWatch API, and update the rawBrokerStatus.

JavaScript Changes

  • Multiple JavaScript updates were made to display the information.
  • The Brokersets page in the Service section will show:
    • Maximum CPU usage over 7 days.
    • Maximum disk usage over 7 days for all brokers.

Testing

  • The changes have been successfully tested within Pinterest.

@yisheng-zhou yisheng-zhou requested a review from a team as a code owner December 12, 2024 04:41
Comment on lines 226 to 240
return "NodeInfo [timestamp=" + timestamp +
", nodeId=" + nodeId +
", hostname=" + hostname +
", ip=" + ip +
", clusterId=" + clusterId +
", servicePort=" + servicePort +
", localtime=" + localtime +
", rack=" + rack +
", nodeType=" + nodeType +
", serviceInfo=" + serviceInfo +
", agentSettings=" + agentSettings +
", environment=" + environment +
", brokersets=" + brokersets +
", brokerStatus=" + brokerStatus +
", rawBrokerStatus=" + rawBrokerStatus + "]";
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Use String.format()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@yisheng-zhou yisheng-zhou merged commit 30bbab5 into master Dec 12, 2024
1 check passed
@yisheng-zhou yisheng-zhou deleted the broker_metrics branch December 12, 2024 20:01
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

Successfully merging this pull request may close these issues.

2 participants