influxdata / influxdata/telegraf
Allow loki output to send raw messages
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
I frequently add new apps that use JSON logging, and I have to pass the logs through a processor plugin in order to access the structured fields in Loki. It would be nice to just look at the message and have the metadata show when clicking on the message, instead of viewing the message and other metadata as unordered key value pairs.

### Expected behavior
I would like there to be an option to set a message field in the loki output plugin then have all the option to either drop extra fields or have them sent to loki as labels.
### Actual behavior
Option to disable logfmt is missing.
### Additional info
_No response_
Contributor guide
Research direction
Start by locating the Loki output plugin and reviewing how it currently formats messages and extra fields. Define the option for selecting a message field, then verify that raw messages are sent with metadata either retained as labels or dropped according to the option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100