You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Tong Sun <su...@gmail.com> on 2022/07/06 22:34:56 UTC

Labeling with sample_variables

Hi,

In https://github.com/johrstrom/jmeter-prometheus-plugin/issues/3, it says


Jmeter allows for sample_variables to be populated and used in the
> SimpleWriter listener class. We should also use this feature for labeling.


This sounds like a very useful feature, but I cannot grasp how to make use
of it.

Can someone elaborate with a sample use-case example please.

Thanks

Re: Labeling with sample_variables

Posted by Dmitri T <gl...@live.com>.
It isn't different from any other JMeter Variables 
<https://jmeter.apache.org/usermanual/functions.html>

The process of adding labels to metrics is described in Using JMeter 
variables as labels 
<https://github.com/johrstrom/jmeter-prometheus-plugin#using-jmeter-variables-as-labels>

*sample_variables* is a special JMeter property 
<https://jmeter.apache.org/usermanual/listeners.html#sample_variables> 
which adds a variable value to the .jtl results file 
<https://cwiki.apache.org/confluence/display/jmeter/JtlFiles>and expose 
it to some other listeners like Flexible File Writer 
<https://www.blazemeter.com/blog/top-ten-jmeter-plugins#writer>

On 7/7/2022 12:34 AM, Tong Sun wrote:
> Hi,
>
> Inhttps://github.com/johrstrom/jmeter-prometheus-plugin/issues/3, it says
>
>
> Jmeter allows for sample_variables to be populated and used in the
>> SimpleWriter listener class. We should also use this feature for labeling.
>
> This sounds like a very useful feature, but I cannot grasp how to make use
> of it.
>
> Can someone elaborate with a sample use-case example please.
>
> Thanks
>