vectordotdev/vector · error
could not parse path
Error message
could not parse path
What it means
This panic occurs in the CEF serializer's `Default`/default-config constructor when `ConfigTargetPath::try_from("cef.severity")` fails to parse. Target paths must be valid event path expressions; the library hardcodes these literals so failure is treated as an impossible internal invariant break.
Solutions
- Confirm you are on an unmodified build; this literal is hardcoded and should always parse
- Check for a recent Vector/codecs version change to path parsing rules and downgrade or upgrade accordingly
- Open an issue with the version and stack trace if it reproduces
Defensive patterns
Strategy: validation
Prevention
- Pin consistent versions of the codecs crate
- Read changelogs for target-path grammar changes before upgrading
- Report any occurrence with a stack trace — it indicates a library bug
When it happens
Trigger: Constructing the default CEF serializer config (e.g. `CefFields::default()` or the public `Self` constructor) when the path parser rejects the literal `"cef.severity"` — only possible if the path grammar or parser changed.
Common situations: Essentially unreachable for library users; could surface after a Vector version change that alters the accepted path syntax (e.g. stricter parsing rules for key names).
Related errors
- can't run runner twice
- enums must always have a tagging mode
- named struct fields must always have an ident
- static regex always compiles
- This can't fail because the inner writer is a Vec
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/35cc5c65d56981c7.
Report an issue: GitHub.
Appendix: source
Thrown at lib/codecs/src/encoding/format/cef.rs:253
docs::additional_props_description = "This is a path that points to the extension value of a log event.",
docs::required = true,
))]
pub extensions: HashMap<String, ConfigTargetPath>,
// TODO: use Template instead of ConfigTargetPath.
// Templates are in the src/ package, and codes are in the lib/codecs.
// Moving the Template to the lib/ package in order to prevent the circular dependency.
}
impl Default for CefSerializerOptions {
fn default() -> Self {
Self {
version: Version::default(),
device_vendor: String::from(DEFAULT_DEVICE_VENDOR),
device_product: String::from(DEFAULT_DEVICE_PRODUCT),
device_version: String::from(DEFAULT_DEVICE_VERSION),
device_event_class_id: String::from(DEFAULT_EVENT_CLASS_ID),
severity: ConfigTargetPath::try_from("cef.severity".to_string())
.expect("could not parse path"),
name: ConfigTargetPath::try_from("cef.name".to_string()).expect("could not parse path"),
extensions: HashMap::new(),
}
}
}
/// Serializer that converts an `Event` to the bytes using the CEF format.
/// CEF:{version}|{device_vendor}|{device_product}|{device_version>|{device_event_class}|{name}|{severity}|{encoded_fields}
#[derive(Debug, Clone)]
pub struct CefSerializer {
version: Version,
device: DeviceSettings,
severity: ConfigTargetPath,
name: ConfigTargetPath,
extensions: HashMap<String, ConfigTargetPath>,
}
impl CefSerializer {View on GitHub (pinned to bdb87aeaa4)