Class CirconusClient
java.lang.Object
com.arpnetworking.tsdcore.sinks.circonus.CirconusClient
Async Circonus API client. Hides the implementation of the HTTP calls.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of brokers from the Circonus API.getCheckBundle
(String cid) Gets a check bundle in Circonus.getOrCreateCheckBundle
(CheckBundle request) Gets or creates a check bundle in Circonus.CompletionStage<play.libs.ws.StandaloneWSResponse>
sendToHttpTrap
(Map<String, Object> data, URI httptrapURI) Sends a request to store data to an http trap monitor.Generate a Steno log compatible representation.toString()
updateCheckBundle
(CheckBundle request) Updates a check bundle in Circonus.
-
Method Details
-
getBrokers
Gets the list of brokers from the Circonus API.- Returns:
- Future with the results.
-
sendToHttpTrap
public CompletionStage<play.libs.ws.StandaloneWSResponse> sendToHttpTrap(Map<String, Object> data, URI httptrapURI) Sends a request to store data to an http trap monitor. NOTE: This method is a bit odd to have on the client. The URI of the httptrap is likely not on the API broker host at all. However, it doesn't make sense to move this method to another utility class at this time. TODO(vkoskela): This method needs to be renamed since it is used only to send metrics. [ISSUE-?] Furthermore, the method should probably return the deserialized response instead of the ws response.- Parameters:
data
- Json data to store.httptrapURI
- Url of the httptrap.- Returns:
- Future response.
-
getOrCreateCheckBundle
Gets or creates a check bundle in Circonus.- Parameters:
request
- Request details.- Returns:
- Future with the results.
-
getCheckBundle
Gets a check bundle in Circonus.- Parameters:
cid
- The check bundle's cid.- Returns:
- Future with the results.
-
updateCheckBundle
Updates a check bundle in Circonus.- Parameters:
request
- Request details.- Returns:
- Future with the results.
-
toLogValue
Generate a Steno log compatible representation.- Returns:
- Steno log compatible representation.
-
toString
-