Prepare k6 to export metrics #120
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/xk6-frostfs#120
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/xk6-frostfs:feat/metrics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates #119
Allow to set
instance
label for metrics. This can be useful in case of metrics export. This label will be used only with custom metrics.*_total
metrics renamed to*_success
where it corresponds to the meaning of these metrics.Added
*_bytes
metrics, because k6 doesn't export builtin metrics (data sent/data received) to prometheus.To send metrics to prometheus:
@ -10,0 +26,4 @@
}
func (m *RootModule) SetInstance(inst string) {
tagSet = Registry.RootTagSet().With("instance", inst)
tagSet
must be inherited from registry, otherwise k6 panics on export.6af368726a
toac02d5211a
WIP: Allow to specify instance tag for custome metricsto Prepare k6 to export metrics@abereziny @mmalygina Please, check metrics renaming -- they could be used somewhere in summary parsing, for example.
ac02d5211a
to060f949a3e
@ -146,3 +149,3 @@
onDataChunk func(chunk []byte),
) error {
var buf = make([]byte, 4*1024)
buf := make([]byte, 4*1024)
Unrelated to commit
fixed
@ -10,0 +25,4 @@
modules.Register("k6/x/frostfs/stats", &RootModule{})
}
func (m *RootModule) SetInstance(inst string) {
It could also be beneficial to attach other tags, like doing 7 loads in a row, each with its own tag.
Why did you go with
SetInstance
and notAddTag
, for example?fixed
Example:
-e METRIC_TAGS="instance:dstepanov;run:1"
060f949a3e
to1422422a23
1422422a23
to73409c6f81
73409c6f81
to965dcdcbe7