Skip to content

Commit abb895f

Browse files
committed
Fix traces to logs config
1 parent 15f0dfa commit abb895f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: grafana/dashboard.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ datasources:
3434
httpMethod: GET
3535
tracesToLogs:
3636
datasourceUid: my-loki
37-
tags: ['job', 'instance', 'pod', 'namespace', 'app']
37+
tags: []
38+
mappedTags: [{ key: 'service.name', value: 'app' }]
39+
mapTagNamesEnabled: true
3840

3941
# - name: tempo
4042
# type: tempo

Diff for: webapp/app/views.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ def index(request):
1313

1414
def service(request):
1515

16+
logger.error("Log1 on Webapp!")
17+
1618
with tracer.start_as_current_span("API call") as span:
17-
logger.error("Log on Webapp!")
19+
logger.error("Log2 on Webapp!")
1820

1921
time.sleep(0.3)
2022
r = requests.get("http://webapi:8001/add")

0 commit comments

Comments
 (0)