Trace to Log
Convert trace events to log events
Configuration
Example configurations
{
"transforms": {
"my_transform_id": {
"type": "trace_to_log",
"inputs": [
"my-source-or-transform-id"
]
}
}
}[transforms.my_transform_id]
type = "trace_to_log"
inputs = [ "my-source-or-transform-id" ]
transforms:
my_transform_id:
type: trace_to_log
inputs:
- my-source-or-transform-id
{
"transforms": {
"my_transform_id": {
"type": "trace_to_log",
"inputs": [
"my-source-or-transform-id"
]
}
}
}[transforms.my_transform_id]
type = "trace_to_log"
inputs = [ "my-source-or-transform-id" ]
transforms:
my_transform_id:
type: trace_to_log
inputs:
- my-source-or-transform-id
graph
optional objectExtra graph configuration
Configure output for component when generated with graph command
graph.edge_attributes
optional objectEdge attributes to add to the edges linked to this component’s node in resulting graph
They are added to the edge as provided
graph.edge_attributes.*
required objectgraph.edge_attributes.*.*
required string literalgraph.node_attributes
optional objectNode attributes to add to this component’s node in resulting graph
They are added to the node as provided
graph.node_attributes.*
required string literalinputs
required [string]A list of upstream source or transform IDs.
Wildcards (*) are supported.
See configuration for more info.
measure_cpu_usage
optional boolEnable CPU usage metrics for this transform.
When set to true, each poll of the transform task is timed using the OS thread CPU clock
and the accumulated nanoseconds are reported as the component_cpu_usage_ns_total counter,
tagged with component_id, component_kind, and component_type.
Defaults to false. Enable only for transforms where CPU attribution is needed, as it
adds a clock_gettime call on every future poll.
falseInput Types
Traces
Outputs
<component_id>
Output Types
Logs
Warning
log event.Telemetry
Metrics
linkcomponent_discarded_events_total
counterfilter transform, or false if due to an error.component_errors_total
countercomponent_latency_mean_seconds
gaugeThe mean elapsed time, in fractional seconds, that an event spends in a single transform.
This includes both the time spent queued in the transform’s input buffer and the time spent executing the transform itself.
This value is smoothed over time using an exponentially weighted moving average (EWMA).
component_latency_seconds
histogramThe elapsed time, in fractional seconds, that an event spends in a single transform.
This includes both the time spent queued in the transform’s input buffer and the time spent executing the transform itself.
component_received_event_bytes_total
countercomponent_received_events_count
histogramA histogram of the number of events passed in each internal batch in Vector’s internal topology.
Note that this is separate than sink-level batching. It is mostly useful for low level debugging performance issues in Vector due to small internal batches.
component_received_events_total
countercomponent_sent_event_bytes_total
countercomponent_sent_events_total
countertransform_buffer_max_byte_size
gaugeDeprecated
transform_buffer_max_size_bytes.transform_buffer_max_event_size
gaugeDeprecated
transform_buffer_max_size_events.transform_buffer_max_size_bytes
gaugetransform_buffer_max_size_events
gaugetransform_buffer_utilization
histogramtransform_buffer_utilization_level
gaugetransform_buffer_utilization_mean
gaugeutilization
gaugeExamples
Trace to Log
Given this event...[{"trace":{"service":"my-service","span_id":"abc123","span_name":"test-span","trace_id":"xyz789"}}]transforms:
my_transform_id:
type: trace_to_log
inputs:
- my-source-or-transform-id
[transforms.my_transform_id]
type = "trace_to_log"
inputs = [ "my-source-or-transform-id" ]
{
"transforms": {
"my_transform_id": {
"type": "trace_to_log",
"inputs": [
"my-source-or-transform-id"
]
}
}
}[{"log":{"service":"my-service","span_id":"abc123","span_name":"test-span","trace_id":"xyz789"}}]