@@ -13,7 +13,12 @@ const os = require('os');
1313const dashdash = require ( 'dashdash' ) ;
1414
1515const luggite = require ( './luggite' ) ;
16- const { JSONPrinter, InspectPrinter, FilePrinter} = require ( './printers' ) ;
16+ const {
17+ JSONPrinter,
18+ InspectPrinter,
19+ FilePrinter,
20+ SpacerPrinter,
21+ } = require ( './printers' ) ;
1722const { TraceWaterfallPrinter} = require ( './waterfall' ) ;
1823const { MetricsSummaryPrinter} = require ( './metrics-summary' ) ;
1924const { LogsSummaryPrinter} = require ( './logs-summary' ) ;
@@ -40,6 +45,7 @@ const PRINTER_NAMES = [
4045 'logs-summary' ,
4146 'summary' ,
4247
48+ 'spacer' , // print a blank line between printed outputs separated by a time gap
4349 'trace-file' , // saving into fs for UI and other processing
4450] ;
4551
@@ -91,9 +97,9 @@ const OPTIONS = [
9197 {
9298 names : [ 'o' ] ,
9399 type : 'arrayOfPrinters' ,
94- help : `Output formats for printing OTLP data. Comma-separated, one or more of " ${ PRINTER_NAMES . join (
95- '", " '
96- ) } " . Default: "inspect,summary" `,
100+ help : `Output formats for printing OTLP data. Comma-separated, one or more of: ${ PRINTER_NAMES . join (
101+ ', '
102+ ) } . Default: "inspect,summary,spacer". `,
97103 } ,
98104 {
99105 names : [ 'hostname' ] ,
@@ -139,7 +145,7 @@ async function main() {
139145 // The way dashdash `--help` output prints the default of an array is
140146 // misleading, so we'll apply the default here and manually document
141147 // the default in the "help:" string above.
142- opts . o = [ 'inspect' , 'summary' ] ;
148+ opts . o = [ 'inspect' , 'summary' , 'spacer' ] ;
143149 }
144150
145151 /** @type {Array<'http'|'grpc'|'ui'> } */
@@ -222,6 +228,9 @@ async function main() {
222228 printers . push ( new LogsSummaryPrinter ( log ) ) ;
223229 break ;
224230
231+ case 'spacer' :
232+ printers . push ( new SpacerPrinter ( log ) ) ;
233+ break ;
225234 case 'trace-file' :
226235 printers . push ( new FilePrinter ( log ) ) ;
227236 break ;
0 commit comments