-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Is there a metrics to log conversion connector ? #29456
Comments
No, there isn't as of now. If you have a need for such a component, can you describe your use case? |
I want the same data from a metrics receiver to be export to both thanos (metrics) and elastisearch (logs) backend. |
Still, I don't quite understand why you want the metrics exported to both a metrics backend (Thanos) and a logs backed (Elasticsearch). What kind of processing do you want to do with those logs-from-metrics and why? What would you expect the format of the logs-from-metrics to be? Would it be Prometheus exposition format? OpenMetrics? OTLP/JSON? Something else? |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
For very big number of metrics this can be a life saver. For example, if influxdb cannot handle the write operations, if conversion was possible, we would redirect the metrics, i.e, to quickwit, or cassandra, elastic easily. So a very much needed feature, i think. |
Let me ask the question again: What would you expect the format of the logs-from-metrics to be? Would it be Prometheus exposition format? OpenMetrics? OTLP/JSON? Something else? |
Sorry, for not seeing previous question and thank you for the answer; OTLP would be our go to option. You see, there is no way, as long as we can gather, to send OTLP metrics to logs backends (It seems elastic has, but we do not want to use it). For example, logs backends like Quickwit accept only trace or log format, but no metric format. If there would be some ways, we would just easily redirect metrics to logs backends/receivers. Additional fields is/should-be acceptable for us. The otherway around is writing OTLP logs from programming languages (this is what we have done for now), or writing metrics to log files and receiving those from OTLP receivers. |
If OTLP format is fine for you, you could probably use the File exporter. It outputs telemetry (logs, metrics, traces) as text formatted in OTLP JSON (by default) into a file. Then you could read this file with the Filelog receiver, getting them as logs. This is a definitely a workaround, not the end solution, but it should work. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
Chiming in here, I think there is some movement to use the same tools to process telemetry data. If logs, metrics, traces are exported to the same destination, and possibly queried with the same query language. Either for live debugging or for analytics or other more deep dive debugging later on. I think the OLTP JSON format would be great to expose to convert and route to logging exporters, in the same way its exposed in the FileExporter. |
That would be very nice, in fact. Thank you! |
I did some research and it does not seem to be as simple as that. I tried even doing
but I have to do a munch more research as Im not familiar with many of the internals required to do such thing. |
That seems a very good progress in the right direction |
I pushed what I have here: https://github.com/pecigonzalo/opentelemetry-collector-contrib/tree/feature/metrics-to-log/connector/logsconnector
|
If you can join a Collector SIG meeting (there's one in about one hour), discussing this synchronously might help. Otherwise, create a new issue of type New component proposal and describe your use case with details. I want to emphasize that you don't need to add such component to Contrib for it to be useful to you. You can create the component in your own repository and build a custom collector distro including the component using the Builder. |
Thank, ill try and join the meeting.
True, thanks for the reminder. I think this would be useful to other as well, so maybe Contrib is a good final target. |
Adding my own use case here, we're ingesting frontend traces using opentelemetry-js. The OTLP receiver has metadata enabled, and we upsert certain cloudfront viewer location headers from the metadata. Then potentially, I'd like to somehow generate spanmetrics that have the latitude/longitude so I can graph a geomap of frontend latency. The issue I'd run in to when shipping the metrics is the potential cardinality of a latitude/longitude label. Even when using Mimir, the cardinality would be tough to handle. Grafana's Faro SDK overcomes this for web-vitals measurements by converting them to log lines instead of metrics, which are shipped to Loki. Example of logfmt measurement for Cumulative Layout Shift:
By converting the spanmetrics into logs, we can insert the latitude/longitude into the log line and ship to Loki. Then using LogQL metrics queries, query an average latency summed by geographic location, and graph that data on Grafana's GeoMap panel. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
Component(s)
No response
What happened?
Description
Steps to Reproduce
Expected Result
Actual Result
Collector version
v0.89.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: