An example of a definition for a backfilled metric which corresponds to the source in backfill1.c. The key difference when compared with the definition for a metric sampled at runtime (for example, custom1.xml) is that the backfill
attribute is set to true
.
1 <
metricdefinitions version=
"1">
2 <
metric id=
"com.allinea.metrics.backfill1.events">
4 <
dataType>
uint64_t</
dataType>
6 <
backfill>
true</
backfill>
7 <
source ref=
"com.allinea.metrics.backfill_src" 8 functionName=
"backfilled_metric"/>
10 <
displayName>
Events</
displayName>
11 <
description>
Total number of events</
description>
16 <
metricGroup id=
"Backfill1">
17 <
displayName>
Backfill1</
displayName>
18 <
description>
Number of events</
description>
19 <
metric ref=
"com.allinea.metrics.backfill1.events"/>
21 <
source id=
"com.allinea.metrics.backfill_src">
22 <
sharedLibrary>
libbackfill1.so</
sharedLibrary>
24 <
start>
start_profiling</
start>
25 <
stop>
stop_profiling</
stop>