From 4f69eabc5793ee4566ce376e1d2c556e57c0811e Mon Sep 17 00:00:00 2001
From: royalcat <k.adamovich20@gmail.com>
Date: Mon, 8 Jul 2024 20:18:09 +0300
Subject: [PATCH] update grafana stack and increase max trace size

---
 docker-compose.yaml |  8 ++++----
 loki/config.yaml    | 13 +++++++------
 tempo/config.yaml   |  2 ++
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/docker-compose.yaml b/docker-compose.yaml
index 2bead86..49736f0 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,6 +1,6 @@
 services:
   otel-collector:
-    image: otel/opentelemetry-collector-contrib:0.101.0
+    image: otel/opentelemetry-collector-contrib:0.104.0
     command: "--config=/etc/otel-collector-config.yaml"
     volumes:
       - ./otel-collector/config.yaml:/etc/otel-collector-config.yaml
@@ -16,7 +16,7 @@ services:
       - default
 
   pyroscope:
-    image: grafana/pyroscope:1.5.0
+    image: grafana/pyroscope:1.6.1
     expose:
       - 4040
     volumes:
@@ -27,7 +27,7 @@ services:
       - default
 
   loki:
-    image: grafana/loki:3.0.0
+    image: grafana/loki:3.1.0
     links:
       - mimir
     expose:
@@ -47,7 +47,7 @@ services:
       - mimir_data:/mimir
 
   tempo:
-    image: grafana/tempo:2.4.1
+    image: grafana/tempo:2.5.0
     command: ["-config.file=/etc/tempo/config.yaml"]
     links:
       - mimir
diff --git a/loki/config.yaml b/loki/config.yaml
index 649486a..7c9ea04 100644
--- a/loki/config.yaml
+++ b/loki/config.yaml
@@ -19,12 +19,13 @@ limits_config:
   allow_structured_metadata: true
   retention_period: 90d
   otlp_config:
-    log_attributes:
-      - action: index_label
-        attributes:
-          - component
-          - function
-          - endpoint
+    resource_attributes:
+      attributes_config:
+        - action: index_label
+          attributes:
+            - component
+            - function
+            - endpoint
 
 query_range:
   results_cache:
diff --git a/tempo/config.yaml b/tempo/config.yaml
index 68ed8b6..083f831 100644
--- a/tempo/config.yaml
+++ b/tempo/config.yaml
@@ -31,3 +31,5 @@ overrides:
   defaults:
     metrics_generator:
       processors: [service-graphs, span-metrics] # enables metrics generator
+    global:
+      max_bytes_per_trace: 10000000