-
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
Loki to Loki exporter not working #29013
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hello @trajano, are you seeing any errors in your loki backend that could explain the failure here? Or any other collector errors coming from the loki exporter? Also, I noticed this in your config:
From the README, the |
Checked, nothing in the logs. FYI I did copy that block from |
Oh, thanks for linking, you're right. We'll have to check with the loki code owners to see if one is wrong (maybe they both work?), and update documentation if necessary 👍 |
I'll have to defer to the Loki exporter code owners for now, I'm not very experienced here. |
NP I did try
And
No luck. I wonder if there's a way to debug the exporter itself so I can tell whether it is trying to send something |
One more thing: Could you try to run with the log level set to debug? Maybe there are some logs that will show. |
Nope all it showed was this which was part of the tracing #29015
I turned off the trace processors to silence that log but all I see is the |
IMHO it's config issue. Log MUST have some label(s) otherwise Loki can't index it. |
I had this originally
Shouldn't that add a label?
and still no luck. There's no explicit log message either. I updated the OP to show the screenshot on Grafana I also have
I presume those would add them. |
Try to use foo attribute as label because you don't have container attribute, pls |
Still not showing anything on Grafana loki when I send
|
Debug output always, pls. And format them for humans, pls e.g.:
This doesn't make sense:
It should be:
|
I sent the message based on the example https://grafana.com/docs/loki/latest/reference/api/#examples-4 I just swapped a couple of values |
Pls provide debug output. And format them for humans. |
I got it working with the following:
Seems |
So trying out a message from promtail
Got this If it is So seems to be a limitation then that if I do my initial labeling in promtail by the OTEL processes it those are gone unless I explicitly list it. Also it appears that the |
I think you have wrong expectation. Collector doesn't work like a "proxy" (receive, don't change anything and export). It is processing by default: receive -> convert to common OTLP format, so -> any exporter can convert it from common OTLP format into vendor specific format. When you have:
And you want to have all attributes as Loki labels, then you need:
|
Yeah I thought as much as I was going through it. https://grafana.com/docs/opentelemetry/collector/send-logs-to-loki/loki-receiver/#use-opentelemetry-collector-to-send-logs-to-loki needs to put your comment on the page in it's own section.
It should also note that Loki specific constructs like structured metadata is not part of OTEL and would be lost. Though I think OTEL should have a separate grouping for structured metadata on the logs. Or perhaps make it such that Same with the README In the end I think its a documentation bug because
makes it sound like a simple proxy, thus creating the expectation if I receive LOKI, I should be able to send it back out. Also that even if I receive LOKI I have to know what I get and parse it accordingly. |
right, all labels you configured in promtail will be lost in the collector unless you explicitly promote them to loki labels. Thank you for the feedback regarding docs. Agree docs should make it clear that collector is not a proxy |
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 Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I'm closing, as I believe this has been answered. |
Component(s)
exporter/loki
What happened?
Description
I am trying to send data from promtail to loki via the OTEL collector. It's does not appear to be sending to LOKI
Steps to Reproduce
Configure a loki receiver and loki exporter
Send a message based on the example
Expected Result
Debug message appears AND data appears in loki
Actual Result
Debug message appears but no data appears in loki.
Sending via
Works and I receive the entry.
Collector version
v0.88.0
Environment information
Environment
OS: DietPi
Docker Swarm
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: