Signal to Metrics
Description
This connector generates custom metrics from logs, metrics, and traces using OTTL expressions.
Use
Use this connector to:
Count log events as metrics for monitoring error rates or request frequencies
Generate latency histograms from trace spans
Derive new metrics from existing metric datapoints
Build custom service level indicators from raw telemetry
Stability
Alpha
Supported Types
✓
✓
✓
All input types produce metrics as output.
Configuration
Telemetry Types
Select which signal types to process: Logs, Metrics, or Traces. At least one must be selected.
Metric Definitions
One or more metrics to generate. See metric definition fields below.
Metric Definition
Name
The metric name (e.g., http.request.count).
Description
Description of the metric.
Unit
Metric unit (e.g., ms, bytes, logs).
Type
Sum, Gauge, Histogram, or Exponential Histogram.
Value Expression
OTTL expression that returns the metric value.
Condition
OTTL condition to filter which signals generate this metric.
Buckets
Bucket boundaries (Histogram only). Default: [2, 4, 6, 8, 10, 50, 100, 200, 400, 800, 1000, 1400, 2000, 5000, 10000, 15000].
Max Size
Max bucket count (Exponential Histogram only). Default: 160.
Attributes
Attributes to include in the output metric.
Resource Attributes
Resource attributes to include in the output metric.
Metric Types
Sum
Aggregates numeric values. Use for counters and cumulative metrics.
Gauge
Records the last observed value. Use for current state metrics.
Histogram
Distributes values across explicit buckets. Optionally configure Buckets (default: [2, 4, 6, 8, 10, 50, 100, 200, 400, 800, 1000, 1400, 2000, 5000, 10000, 15000]).
Exponential Histogram
Uses dynamic bucket sizing. Optionally configure Max Size (default: 160).
Attributes
Specify which attributes from the source signal to include in the output metric. If no attributes are defined, the output metric will have no attributes.
Key
The attribute key to include.
Behavior
Required (default): incoming signals missing this attribute are skipped entirely. Optional: attribute is included if present on incoming signals, excluded if not. Has Default: use default value if attribute is missing from incoming signals.
Default Value
Value to use when attribute is missing (only with Has Default).
Resource Attributes
Specify which resource attributes to include in the output metric. If no resource attributes are defined, all incoming resource attributes are included.
Key
The resource attribute key to include.
Behavior
Optional (default) or Has Default. Same behavior as attributes, but Required is not available.
Default Value
Value to use when attribute is missing (only with Has Default).
Conditions
Filter which signals generate metrics using OTTL conditions.
Example conditions:
attributes["http.status_code"] >= 400— only error responsesseverity_number >= SEVERITY_NUMBER_ERROR— only error logsname == "HTTP GET"— specific span names
OTTL Expressions
The connector supports OTTL functions for extracting values.
Common expressions:
1— literal value for countingInt(attributes["response_time"])— extract integer attributeDouble(attributes["duration_ms"])— extract float attribute
For spans, AdjustedCount() calculates accurate counts when sampling is enabled:
Example Configuration(s)
Count Log Records by Severity
Count all log records, grouped by severity level.
Signal Type:
logsName:
log.record.countType:
SumValue Expression:
1Attributes: Key
severity, BehaviorOptional

HTTP Request Duration Histogram
Generate a latency histogram from HTTP server spans.
Signal Type:
spansName:
http.server.durationUnit:
msType:
HistogramValue Expression:
Double(attributes["http.server.request.duration"])Condition:
kind == SPAN_KIND_SERVERBuckets:
[5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000, 10000]Attributes: Key
http.route, BehaviorOptional; Keyhttp.method, BehaviorRequired

Error Count by Service
Count error logs grouped by service name.
Signal Type:
logsName:
error.countType:
SumValue Expression:
1Condition:
severity_number >= SEVERITY_NUMBER_ERRORResource Attributes: Key
service.name, BehaviorOptional

Span Count with Sampling Adjustment
Accurately count spans when sampling is enabled.
Signal Type:
spansName:
span.countType:
SumValue:
Int(AdjustedCount())

Technical Notes
The connector automatically adds signaltometrics.service.instance.id to every output metric for single-writer compliance.
The connector does not perform time-based aggregation. Metrics are aggregated per batch only.
Related Resources
Last updated
Was this helpful?