-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
A note for the community
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Problem
The log_to_metric transform handles metrics with a value type of MetricValue::AggregatedHistogram or MetricValue::AggregatedSummary incorrectly, because it looks for the wrong keys in the log event when converting the log back to a metric. It's looking for the histogram and summary keys, but the keys are actually named aggregated_histogram and aggregated_summary, as per the log schema and based on how serde_json encodes the MetricValue enum in metric_to_log.
This causes any use of a log_to_metric transform with histogram or summary metrics to fail with this error:
vector::internal_events::log_to_metric: Missing required metric details. Required one of gauge, distribution, histogram, summary, counter error_code="missing_metric_details" error_type="parser_failed" stage="processing"
Configuration
[sources.opentelemetry]
type = "opentelemetry"
grpc.address = "0.0.0.0:4317"
http.address = "0.0.0.0:4318"
[transforms.my_metric_to_log]
type = "metric_to_log"
inputs = ["opentelemetry.metrics"]
[transforms.my_log_to_metric]
type = "log_to_metric"
inputs = [ "my_metric_to_log" ]
all_metrics = true
metrics = []Version
0.53.0
Debug Output
vector::internal_events::log_to_metric: Missing required metric details. Required one of gauge, distribution, histogram, summary, counter error_code="missing_metric_details" error_type="parser_failed" stage="processing"
Example Data
No response
Additional Context
No response
References
No response