-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create JSON decoder #128
Comments
thanks for raising this topic. I am wondering what kind of other considerations we should have when talking about a new JSON schema for metrics.. maybe an expanded version of our msgpack format ? are we aware of another apps that ships metrics in JSON by using a specific format ? |
We should check OTLP since they added JSON as an alternative format for logs they might have done the same thing for metrics and in that case I think we'd probably want to make ours compatible with the standard. |
I am still thinking, do we need a JSON schema ?, I mean, if some client app wants to compose a compatible metrics format with CMetrics, just use cmetrics directly in C or the Golang bindings, encode as msgpack and ship it over the network |
@leonardo-albertovich does that mean we will have to depend on the OLTP proto files here? (don't know if that's even an issue) Found this which might be useful - https://github.com/Sannis/protobuf2json-c/blob/master/src/protobuf2json.c (last commit was in 2016 so not sure if it should actually be used, but might give an idea to approach this). @edsiper My main motivation for this issue was to output metrics from FluentBit to a data source that doesn't support any of the existing representations. I think that JSON schema will allow metrics to be exposed & integrated to a wider selection of data sources. |
@papigers ah, you mean something like "metrics to logs" conversion, if that is the case, yeah makes sense. (just I would like to avoid a JSON -> CMetrics conversion for now) |
now we have a readable "style" in msgpack format, we don't want to add a JSON writer here in cmetrics but the functionality is ready from Fluent Bit side. Closing as it won't be implemented here unless a specific json decoder for certain backend is added. |
This is a feature request to add a JSON decoder to allow exporting metrics to other data sources that expect a more structured way of organizing the data - like fluent output plugins.
(My specific use case is to support ingesting metrics into the new fluent-bit output plugin I wrote, but I thought it would be better to "enhance" it globally, here).
The format I suggest is inspired by the format of prom2json:
Notice that with this format, every metric sample would be a JSON record.
An alternative way, that is less optimal for my use case, but may be better for others, is to group samples by the metric (similar to how the metrics are represented in msgpack, and in prom2json)
I'd be happy to help and submit a PR, once you approve the specification.
The text was updated successfully, but these errors were encountered: