public class StatsdNotifier extends BuildNotifier
Modifier and Type | Field and Description |
---|---|
protected StatsdNotifierConfig |
config |
DEFAULT_LONG, DEFAULT_STRING
Constructor and Description |
---|
StatsdNotifier(StatsdNotifierConfig config) |
StatsdNotifier(StatsdWrapper client,
StatsdNotifierConfig config) |
Modifier and Type | Method and Description |
---|---|
String |
getBranchPath()
Returns the StatsD including the global prefix up to the branch bucket.
|
boolean |
isEnabled()
Determines whether this notifier is enabled.
|
void |
notifyBuildStageStatus(String jobName,
BuildStage stageItem)
Sends duration metric to StatsD by doing a timer metric.
|
void |
notifyFinalBuildStatus(BuildStage.State buildState,
Map<String,Object> parameters)
Sends final build status metric by doing a timer metric for blocked and unblocked job time.
|
String |
sanitizeAll(String key)
Applies all sanitizations to a key, folders are expanded into separate StatsD buckets.
|
void |
sendNonStageError(String jobName,
String nodeName)
Sends build status metric to StatsD by doing an increment on the buildState categories.
|
all, getLong, wantsOutOfStageErrors
protected StatsdNotifierConfig config
public StatsdNotifier(StatsdWrapper client, StatsdNotifierConfig config)
public StatsdNotifier(StatsdNotifierConfig config)
public boolean isEnabled()
isEnabled
in class BuildNotifier
public String getBranchPath()
public void notifyBuildStageStatus(String jobName, BuildStage stageItem)
notifyBuildStageStatus
in class BuildNotifier
jobName
- the name of the jobstageItem
- stage item describing the new statepublic void notifyFinalBuildStatus(BuildStage.State buildState, Map<String,Object> parameters)
notifyFinalBuildStatus
in class BuildNotifier
buildState
- the reported stateparameters
- build parameterspublic void sendNonStageError(String jobName, String nodeName)
jobName
- name of the jobnodeName
- the stage of the status on which to report onpublic String sanitizeAll(String key)
key
- key to sanitizeCopyright © 2016–2020. All rights reserved.