(key: &str)
| 963 | } |
| 964 | |
| 965 | fn parse_otel_resource_attribute(key: &str) -> Option<String> { |
| 966 | env::var("OTEL_RESOURCE_ATTRIBUTES").ok().and_then(|attrs| { |
| 967 | attrs.split(',').find_map(|part| { |
| 968 | let (attr_key, attr_value) = part.split_once('=')?; |
| 969 | (attr_key.trim() == key) |
| 970 | .then(|| attr_value.trim().to_string()) |
| 971 | .filter(|v| !v.is_empty()) |
| 972 | }) |
| 973 | }) |
| 974 | } |
| 975 | |
| 976 | /// Opcode and precompile names the metering inspector can parse. |
| 977 | /// |
no test coverage detected