feat: replace Promtail with OpenTelemetry collector#2784
Conversation
|
Tested by:
Was expecting the otel operator to get deployed automatically but it never happened |
The OTel App should be enabled immediately when Loki is. Console does this by the info found in |
|
The OTel app is now enabled from Core whenever Loki is enabled, during or after the upgrade. |
|
Could you update the datasource in line 332 of the core.yaml file to |
|
Tested clean install and upgrade, Promtail is removed when openTelemetry is enabled in Loki values. Loki plugin is working in Grafana after the schemastartdate has been passed and uses v13. |
Ani1357
left a comment
There was a problem hiding this comment.
Tested both scenarios: clean install and upgrade when Loki was already available. All logs were preserved.
📌 Summary
This PR upgrades Loki to the latest release and replaces log collection with OpenTelemetry.
To be added to Upgrade notes:
In this release, Loki is upgraded. In addition, Promtail is deprecated for log collection as it is no longer being maintained. If Loki has not been enabled before the upgrade, once it is enabled OpenTelemetry is used for log collection immediately and no further action is needed. In case there are prior logs from Loki, for maintaining access to them the transition must be delayed. This is due to a change in storage format required by OpenTelemetry, which requires a defined date for deciding which format to read and write:
After the upgrade, the platform administrator should check under Apps -> Loki settings (gear icon) the value of
v13SchemaStartDate. This is set at least one day into the future during the upgrade. On or after this date (UTC), the value ofenableOpenTelemetrycan be changed totrue. This uninstalls Promtail and enables the OpenTelemetry log collection instead.In case access to previous logs is not needed, the platform administrator may also choose to remove all data from the Loki storage bucket or create a new one, and change the value of
enableOpenTelemetrytotrueimmediately.v13SchemaStartDatecan then be set to an empty value.Most labels have been adjusted for Loki to match the former Promtail format, but not all have been migrated or indexed for efficiency reasons. For example
filenameis still present in the metadata, while not being indexed.jobhas been discarded as it is mostly represented by other labels (e.g.service_name).🔍 Reviewer Notes
Since the previous storage schema is not compatible with OpenTelemetry collection (requiring structured metadata), there are two scenarios.
apps.loki.enableOpenTelemetrytotrue. This enables the OpenTelemetry Collector for logs and removes Promtail.🧹 Checklist