MACRO::JSON_OUTPUT_A(3stap)

πŸ’– MACRO::JSON_OUTPUT_A(3stap) πŸ’–

okay so bestie, we're in the JSON Tapset section of the manual and this page is literally all about one lil macro that makes your metrics look cute in JSON. let's get into it ✨


🌸 NAME 🌸

macro::json_output_array_string_value β€” outputs a string value for a metric that lives in an array πŸŽ€


✨ SYNOPSIS ✨

@json_output_array_string_value(array_name,array_index,metric_name,value)

🫢 ARGUMENTS 🫢

  • array_name β€” the name of the array. the whole vibe check for where we're looking πŸ’…
  • array_index β€” the array index (as a string, no cap) that tells you where to store the string value πŸ“
  • metric_name β€” the name of the string metric. yes it's a string metric, keep up bestie πŸ“
  • value β€” the actual string value you want to output. the main character fr fr πŸ‘‘

🌈 DESCRIPTION 🌈

so the json_output_array_string_value macro is designed to be called from the 'json_data' probe in the user's script β€” that's the moment, that's the spot 🎯 β€” and what it does is output a metric's string value that's sitting inside an array.

⚠️ one thing tho: this metric should have been added with json_add_array_string_metric first. like, you can't just show up to the function without your metric already existing, that's not the vibe 😭

πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page bestie, you ate that πŸ’…βœ¨

SystemTap Tapset Reference, dated September 2026 πŸ¦‹ ty for reading, ily, go forth and output those string values πŸ’œ

πŸ“¦ where this page comes from