Labels and Fields¶
When shipping logs to FusionReactor Cloud, you can apply labels to them. These labels can be used to filter your log content using LogQL.
Default labels applied by FusionReactor include job, instance, app_name and filename but are not limited to these specific entries. If you ship logs through FusionReactor a label for the instance will be applied, and if you ship your logs through an alternate log client you can specify any labels you require.
If you are shipping logs from outside the FusionReactor agent, it is important to ensure the labels job and instance are applied to the logs.
Job is typically the name of the service you are running and instance will be the host the service is running on.
These labels allow you to isolate your LogQL queries to a selection of your online logging clients, without these you may have difficulty differentiating where logs are coming from.
In order to maintain performance when querying your data you should avoid high cardinality labels (such as having labels with similar names but incorporating a unique ID). You read more on why this is in the loki documentation.
Fields are derived from the log contents using key value pairs (“key=value”); these fields will give you the ability to collate log entries into a graph.
What is Logfmt¶
Logfmt is a log parser that allows FusionReactor Cloud to collate metric data from log fields that are represented as key=value data pairs.
When sending your logs you will gain greater value by using logfmt. FusionReactor logs themselves will be converted to logfmt when ingested.
You can read more on logfmt in documentation.