NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4042 most downloaded on crates.io
serde-based serializer for prometheus' text-based exposition format
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 9 days to 1.7 years
Some releases are documented
notes for 10 of 17 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
17 releases · first in 2020
One column per quarter.
This is not a breaking change as previously serde_prometheus would return an error if a tuple was encountered during map key serialization.
Map keys previously used a naive ToString implementation to push to
the stack which made it difficult to push multiple values into labels
at the same time.
This change allows tuples to be used as map keys, with each value
pushed into the stack individually. As a contrived example, this
serialize implementation will extract the tuple (A, B, C, D) into
labels a, b, c, d:
#[derive(Default, Serialize)]
pub struct Metrics(BTreeMap<(u8, u8, u8, u8), TakeValues<u64>>);
pub struct TakeValues<T>(T);
impl<T: Serialize> Serialize for TakeValues<T> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_newtype_struct("!!!!|a==!!!<,b==!!<,c==!<,d==<", &self.0)
}
}
This is not a breaking change as previously serde_prometheus would return an error if a tuple was encountered during map key serialization.
Serialize empty tuples the same as None
Serialize empty tuples the same as None
Remove empty label stack elements to avoid imposing global label limit.
Remove empty label stack elements to avoid imposing global label limit.
Add additional context when overflowing label stack.
Add additional context when overflowing label stack.
Heapless has been upgraded to 0.8 (thanks @rursprung in #9).
Heapless has been upgraded to 0.8 (thanks @rursprung in #9).
Fixes a bug causing internal modifiers not to be parsed after following
label modifiers (ie. |x==<|:namespace=xyz would fail to parse).
This version fixes a bug that caused labels gathered via labels not properly be escaped that could cause potential metric ingestion issues.
This version fixes a bug that caused labels gathered via labels not properly be escaped that could cause potential metric ingestion issues.
This version includes the ability for consumers to override the global namespace by using "internal overrides", this is an extra "section" in the usua
This version includes the ability for consumers to override the global
namespace by using "internal overrides", this is an extra "section" in
the usual serialize_newtype_struct call:
x|y|:namespace=my_new_namespace
A small internal change to prevent unnecessary early formatting of labels during concatenation is also included.
This includes a workaround for a bug in heapless which causes an incorrect entry to be returned when using the entry API which under some circumstance
This includes a workaround for a bug in heapless which causes an
incorrect entry to be returned when using the entry API which under
some circumstances causes label values to be written to the incorrect
key (#6). Thanks @shaunbennett for the thorough investigation and
contribution.
This includes a fix for a small regression in v0.2.0 causing quotes not to be escaped inside fixed labels, significantly improving the ergonomics of l
This includes a fix for a small regression in v0.2.0 causing quotes not to be escaped inside fixed labels, significantly improving the ergonomics of labels in the process.
There's now two types of fixed labels, "quoted" and "unquoted" - the
"quoted" variant works as you'd expect, allowing any characters within
the boundaries of the quotes, and allows escaping quotes using the \
control character.
"Unquoted" labels will continue working as-is, but also allow escaping
the , delimiter used within labels.
|version="1.2.3(\"crusty, crustacean\")",build=123 -> {version = "1.2.3(\"crusty, crustacean\"), build = "123"}
|version=1.2.3("crusty\, crustacean"),build=123 -> {version = "1.2.3(\"crusty, crustacean\"), build = "123"}
The exposed API remains the same, and whilst striven for complete compatibility with 0.1, there are a few breaking changes to keep in mind when upgrad…
This change brings a major revamp in the internal parsing and state
engine in serde_prometheus, significantly improving performance
for applications exposing a large amount of metrics.
The exposed API remains the same, and whilst striven for complete compatibility with 0.1, there are a few breaking changes to keep in mind when upgrading:
serialize_newtype_struct users adding only labels now need to
include the | separator, even if no path modifications are given.
This separator was previously optional in 0.1.
my_label=my_value,other_label=other_value
|my_label=my_value,other_label=other_value
Labels, stack depth and modifiers are now no longer unbounded.
< operator)serialize_newtype_struct callserde_prometheus::write function is now exposed publicly that allows
for buffer reuse.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →