-
- All Implemented Interfaces:
-
java.io.Serializable,java.util.Map,java.util.concurrent.ConcurrentMap
public class DiagnosticContext extends ConcurrentHashMap<K, V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDiagnosticContext.TimeSeriesPoint
-
Constructor Summary
Constructors Constructor Description DiagnosticContext()DiagnosticContext(Clock clock)Creates a diagnostic context using the specified clock for timestamp values.
-
Method Summary
Modifier and Type Method Description DiagnosticContext.TimeSeriesPointmakeTimeSeriesPoint(String timeSeriesName)Makes a new time series point without a timestamp. DiagnosticContext.TimeSeriesPointmakeTimeSeriesPoint(String timeSeriesName, long tsMs)Makes a new time series point with a timestamp. DiagnosticContext.TimeSeriesPointmakeTimeSeriesPoint(String timeSeriesName, Instant ts)Makes a new time series point with an Instant. -
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEachEntry, forEachKey, forEachValue, get, getOrDefault, hashCode, isEmpty, keySet, keys, mappingCount, merge, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values -
Methods inherited from class java.util.AbstractMap
keySet -
Methods inherited from class java.util.Map
copyOf, entry, of, ofEntries -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
DiagnosticContext
DiagnosticContext()
-
DiagnosticContext
DiagnosticContext(Clock clock)
Creates a diagnostic context using the specified clock for timestamp values.
-
-
Method Detail
-
makeTimeSeriesPoint
DiagnosticContext.TimeSeriesPoint makeTimeSeriesPoint(String timeSeriesName)
Makes a new time series point without a timestamp. This is recommended for time series where the exact timestamp value isn't important and can be deduced via other means (i.e. Java logging timestamps).
- Parameters:
timeSeriesName- the name of the time series
-
makeTimeSeriesPoint
DiagnosticContext.TimeSeriesPoint makeTimeSeriesPoint(String timeSeriesName, long tsMs)
Makes a new time series point with a timestamp. This is recommended for time series where it's important to have the exact timestamp value.
- Parameters:
timeSeriesName- the name of the time seriestsMs- the timestamp of the time series point (in millis)
-
makeTimeSeriesPoint
DiagnosticContext.TimeSeriesPoint makeTimeSeriesPoint(String timeSeriesName, Instant ts)
Makes a new time series point with an Instant. This is recommended for time series where it's important to have the exact timestamp value, when the process is working in Instant values.
- Parameters:
timeSeriesName- the name of the time seriests- the timestamp of the time series point
-
-
-
-