github.com/Jeffail/benthos/v3@v3.65.0/internal/component/output/docs.go (about)

     1  package output
     2  
     3  import "github.com/Jeffail/benthos/v3/internal/docs"
     4  
     5  var docsAsync = `
     6  This output benefits from sending multiple messages in flight in parallel for
     7  improved performance. You can tune the max number of in flight messages with the
     8  field ` + "`max_in_flight`" + `.`
     9  
    10  var docsBatches = `
    11  This output benefits from sending messages as a batch for improved performance.
    12  Batches can be formed at both the input and output level. You can find out more
    13  [in this doc](/docs/configuration/batching).`
    14  
    15  // Description appends standard feature descriptions to an output description
    16  // based on various features of the output.
    17  func Description(async, batches bool, content string) string {
    18  	if !async && !batches {
    19  		return content
    20  	}
    21  	content += "\n\n## Performance"
    22  	if async {
    23  		content += "\n" + docsAsync
    24  	}
    25  	if batches {
    26  		content += "\n" + docsBatches
    27  	}
    28  	return content
    29  }
    30  
    31  // InjectTracingSpanMappingDocs returns a field spec describing an inject
    32  // tracing span mapping.
    33  var InjectTracingSpanMappingDocs = docs.FieldBloblang(
    34  	"inject_tracing_map",
    35  	"EXPERIMENTAL: A [Bloblang mapping](/docs/guides/bloblang/about) used to inject an object containing tracing propagation information into outbound messages. The specification of the injected fields will match the format used by the service wide tracer.",
    36  	`meta = meta().merge(this)`,
    37  	`root.meta.span = this`,
    38  ).AtVersion("3.45.0").Advanced()