spring-boot - 记录 @SqsListener 时缺少 TraceId
问题描述
在我的 Spring Boot 项目中,TraceId 仅在 @SqsListener 注释方法中丢失。我已用于spring-cloud-starter-sleuth
日志记录和 logback 配置。
解决方案
Which sleuth version are you using? They removed SQS support since 3.0 release. https://github.com/spring-cloud/spring-cloud-sleuth/issues/1876.
This repo can be helpful in implementing putting traces into SQS messages but getting them from the message and injecting into MDC you need to implement on your own.
推荐阅读
- javascript - 逐个索引比较字符串字符并返回带有索引的不匹配字符
- apache-spark - 理想的 Spark 配置
- python-3.x - 如何在多个字典列表中进行迭代
- vue.js - 使用Vue + Chartjs时可以使用自定义数据格式吗
- javascript - Angular Firestore _methodName FieldValuea.serverTimestamp
- python - 从pyqt中的网格布局中删除最后两个小部件
- c++ - Clang 找不到转换运算符
- python - 看来我不能在另一个函数中使用一个函数
- java - nullpointerexception 错误我现在知道如何修复
- php - 我需要提取“无尽”字符串的持续时间