【问题标题】:Adding JDBC query information to opentracing/Jaeger spans将 JDBC 查询信息添加到 opentracing/Jaeger 跨度
【发布时间】:2019-12-07 15:19:18
【问题描述】:

我们在 Istio 中使用 Opentracing/Jaeger 来跟踪多个基于 Spring Boot/Spring Cloud 的微服务。

我目前想知道是否可以通过提供有关已执行查询(即 SQL 语句)的信息来丰富跟踪范围?使用opentracing-contrib/java-spring-cloud 跟踪 JDBC 连接信息可以正常工作,但缺少其他信息。

我知道,例如glowroot 能够跟踪语句本身,但没有找到任何与 Opentracing 或 Jaeger 相关的内容。

如果有人能提供一些研究方向,那就太好了!

【问题讨论】:

    标签: spring-boot spring-cloud opentracing jaeger


    【解决方案1】:

    我遇到了类似的问题。 ConnectionInfo 被跟踪,但不是 SQL 语句。 就我而言,我必须启用 traceWithActiveSpanOnly=true。

    例如:jdbc:tracing:h2:mem:test?traceWithActiveSpanOnly=true

    在那之后,语句开始被追踪。

    Check the documentation of opentracing java-jdbc module here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-11-09
      • 1970-01-01
      • 1970-01-01
      • 2021-03-16
      • 2019-04-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多