Splunk® Data Stream Processor

Function Reference

Acrobat logo Download manual as PDF

Acrobat logo Download topic as PDF

Send data to SignalFx (trace)

Send trace data in Zipkin format to a SignalFx endpoint. See Create a connection to SignalFx for more information about creating a SignalFx connection.

SignalFx trace values in DSP are a collection of maps with a common trace ID, formatted as Zipkin spans. Each span represents some type of remote activity such as RPC calls, or messaging producers and consumers. See the Zipkin Data Model documentation for more details.

This is a connector-based function. To use it, you must first create a SignalFx connection. Use that connection_id as an argument for this function.

Function input schema

collection<record<R>>
This function takes in collections of records with schema R.

Required arguments

connection_id
Syntax: string
Description: The SignalFx connection ID.
Example: "576205b3-f6f5-4ab7-8ffc-a4089a95d0c4"
trace_value
Syntax: expression<collection<map<string,any>>>
Description: The SignalFx trace values can be constructed in one of the following ways:
  • Use DSP scalar functions to dynamically construct the trace value expressions.
  • Write a literal expression in the trace_value argument using Zipkin syntax. For example: [{"traceId": "my_traceId", "id": "id-value"}].
The following mandatory Zipkin arguments must be included in all expressions:
  • traceId: String. A unique identifier for a trace. Encoded as 16 or 32 lowercase hex characters corresponding to 64 or 128 bits.
  • id: String. A unique 64 bit identifier for the operation within the trace. Encoded as 16 lowercase hex characters.
See the Zipkin API POST /spans documentation for a complete list of mandatory and optional arguments that can be used for the expressions.
Example: [{"traceId": "my_traceId", "id": "id-value"}]

Optional arguments

parameters
Syntax: map<string, string>
Description: Defaults to empty { }. Key-value pairs that can be passed to SignalFx. This can be set to:
  • batch_size: The maximum number of elements to flush. The batch size can range between 50 and 10,000 elements. The default value is 2000.
  • batch_interval_msecs: The maximum time to wait before flushing. The batch size interval can range between 50 and 100,000 milliseconds. The default value is 2000.
Example: batch_size = 1000

SPL2 example

In these examples, the trace_value is constructed with a literal expression.

You can write the function by providing the arguments in this exact order.

...| into signalfx_trace("connection_id", [{"traceId": "my_traceId", "id": "id-value"}],  {"batch_size": "1000", "batch_interval_msecs": "10000"});

Alternatively, you can use named arguments to declare the arguments in any order and leave out optional arguments you don't want to declare. All unprovided arguments use their default values. See SPL2 syntax for more details. The following example provides the arguments in an arbitrary order.

...| into signalfx_trace(trace_value: [{"traceId": "my_traceId", "id": "id-value"}], connection_id: "connection_id", parameters: {"batch_size": "1000", "batch_interval_msecs": "10000"});

Port requirements

The Write to SignalFx function sends HTTP requests to the SignalFx endpoint via a dynamic or ephemeral port. Your local firewall configuration must be set up to allow outgoing HTTP traffic from at least one of the ports in the range of dynamic or ephemeral ports allocated by your operating system. These ports typically range from 49152 to 65535, but this can be different depending on the specific operating system you are using.

Last modified on 03 December, 2020
PREVIOUS
Send data to SignalFx (metric)
  NEXT
Send data to dev/null

This documentation applies to the following versions of Splunk® Data Stream Processor: 1.2.0


Was this documentation topic helpful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters