-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
OpenTelemetry should convert level to string #10
Comments
@leahneukirchen Hi Leah, thanks for pinging about this - I'm not familiar with Loki, so it's helpful to hear about things like this 🙏 Telemere's Open Telemetry handler currently does the following:
So in your case 1 should be correct, but I guess that Loki is also checking certain attribute values ("level" for example)? My initial preference was to prefer ":foo/bar" to "foo/bar" for keyword attribute values since that at least preserves some info about the type, but this'd be easy to change. Which option makes the most sense to you?:
|
Yes, Loki doesn't seem to use the severity level (but I'm converting with Alloy from OTLP to Loki, so it may get lost there. I'm trying direct ingestion next.) I think |
👍
Just to confirm- where exactly are you seeing symbols? I didn't quite understand this part in your original message. I believe Telemere's log record attribute names should all be strings; are you seeing something different? |
I switched to OTLP now, and while this sets I meant values, not names. Currently, |
Okay, but just to confirm- the values should also be strings (not symbols). So you're seeing: "level" (string key) mapped to ":error" (string value). In case you're not very familiar with Clojure, it has distinct string, symbol, and keyword types - so I'm just confirming that you're not somehow encountering symbols unexpectedly. |
Yes, it's |
I created confusion by saying symbol (that's what 20 years of Ruby do to you), I meant keywords of course. :) |
No worries, thanks for circling back to clarify 👍 |
Fixed on upcoming master |
Before: `:foo/bar` -> ":foo/bar" After: `:foo/bar` -> "foo/bar"
Before: `:foo/bar` -> ":foo/bar" After: `:foo/bar` -> "foo/bar"
On reflection the choice to drop ":" (and so type info) from ALL attribute keywords seems excessive. We can instead restrict the change only to the :level value. Feedback welcome.
On reflection the choice to drop ":" (and so type info) from ALL attribute keywords seems excessive. We can instead restrict the change only to the :level value. Feedback welcome.
On reflection the choice to drop ":" (and so type info) from ALL attribute keywords seems excessive. We can instead restrict the change only to the :level value. Feedback welcome.
On reflection the choice to drop ":" (and so type info) from ALL attribute keywords seems excessive. We can instead restrict the change only to the :level value. Feedback welcome.
On reflection the choice to drop ":" (and so type info) from ALL attribute keywords seems excessive. We can instead restrict the change only to the :level value. Feedback welcome.
On reflection the choice to drop ":" (and so type info) from ALL attribute keywords seems excessive. We can instead restrict the change only to the :level value. Feedback welcome.
I'm running Telemere 1.0.0-beta14 with io.opentelemetry/opentelemetry-exporter-otlp 1.39.0, sending to Alloy 1.1.1 to Loki 3.0.
By default, the message
"level"
(a symbol in Clojure) ends up as a string like":error"
in Loki, which is recognized as"unknown"
level. I thinksignal->attrs-map
should pass on(name level)
as"level"
, so"level"
is"error"
. Then Loki colors the events properly.The text was updated successfully, but these errors were encountered: