- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试将 Jaeger 跟踪集成到 K-Streams 中。我正计划将跟踪添加到我最重要的几个管道中,并且想知道将 traceid 从一个管道传递到另一个管道的好方法是什么?
这是我目前所拥有的 - 在流处理管道开始时,我启动了一个服务器跨度并将 traceid 保存到状态存储中。稍后,在转换管道中,我访问 statestore 并从 transform() 方法捕获跟踪。这是在流处理中处理跟踪的好方法吗?
input
.mapValues(toSomethingThatMyAppUnderstands)
.mapValues(this::startStreamTrace)
.filter((k, v) -> v.isPresent())
.mapValues(Optional::get)
.mapValues(doSomethingHereWith)
.flatMapValues(doSomethingElse)
.filter((k, v) -> isInterestingEvent(v))
.transform(() -> new TransformerWithTracing<SomeObjectA, SomeObjectB>(IN_MEM_STORE_NAME, someFunction), IN_MEM_STORE_NAME)
.flatMapValues(c -> c)
.to(outTopic, Produced.with(Serdes.String(), new EventSerde()));
public class TransformerWithTracing<V, VR> implements Transformer<String, V, KeyValue<String, VR>> {
final Function valueAction;
final String storeId;
private KeyValueStore<String, String> traceIdStore;
public TransformerWithTracing(String storeId, Function valueAction) {
this.storeId = storeId;
this.valueAction = valueAction;
}
@Override
public void init(ProcessorContext context) {
// KeyValueStore store = ((KeyValueStore<String, String>) context.getStateStore(storeId));
InMemoryKeyValueStore inMemoryKeyValueStore = (InMemoryKeyValueStore) store;
this.traceIdStore = store;
}
@Override
public KeyValue<String, VR> transform(String key, V value) {
System.out.println(traceIdStore.get(key));
// BuildTraceHeader
try(Scope scope = serviceTracer.startServerSpan(traceHeader, "Converting to Enterprise Event")) {
return KeyValue.pair(key, (VR) valueAction.apply(value));
}
}
@Override
public KeyValue<String, VR> punctuate(long timestamp) {
return null;
}
@Override
public void close() {
// if (streamId != null) traceIdStore.delete(streamId);
}
}
最佳答案
@jeqo 在这个 zipkin/brave repo 中有类似的想法。
https://github.com/jeqo/brave/tree/kafka-streams-processor/instrumentation/kafka-streams
opentracing-contrib repo 中似乎也有一些可用的东西,但它似乎只在跟踪生产者/消费者级别。
https://github.com/opentracing-contrib/java-kafka-client/tree/master/opentracing-kafka-streams
关于java - 使用 Kafka Streams 进行 OpenTracing - 如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52875462/
我们正在使用 Micronaut (v1.2.0) 构建一个网络应用程序,它将部署在 Kubernetes 集群中(我们使用 Istio 作为服务网格)。 我们想检测关键方法调用,以便它们可以在 HT
我尝试在PHP项目中实现OpenTracing + Jaeger,遵循https://github.com/jonahgeorge/jaeger-client-php的“入门”示例 跟踪器,范围和范围
我正在尝试使用 OpenTracing.Contrib.NetCore与 Serilog。我需要将我的自定义日志发送给 Jaeger。现在,它仅在我使用默认记录器工厂 Microsoft.Extens
我使用 Jaeger 记录应用程序跟踪信息。 是否需要再次使用其他日志包? 最佳答案 OpenTracing 是分布式跟踪的框架。因此,它更多地是关于性能监控和可观察性而不是日志记录(NLog 是关于
在 #105 davidB 询问: I would like to have read access to the Span id (SpanContext id) to be able to use
我在 Docker 中一体安装了 jaeger: docker run --rm --name jaeger -p 5775:5775/udp -p 6831:6831/udp -p 6832:683
我的 API 网关启动了一个跟踪器和一个用于验证电子邮件的跨度。然后它传递给 user-service进行验证。 我想通过 span详情至user-service作为 json 对象并开始另一个 sp
您好,我正在我的 spring boot 项目中使用以下跟踪框架。 io.opentracing.contrib opentracing-spring-jaeger-cloud-st
W3C trace context定义 traceparent和 tracestate用于启用分布式跟踪的 header 。 我的问题是 它与 OpenTracing 有何不同。 如果 W3C 已经定
我已将以下注释添加到我的 Spring Boot 项目中: @CamelOpenTracing 这为我的消息经过的每条路线创建了一个跨度,并且效果完美。 但是,如何创建自己的跨度?我想在消息转到 on
有没有办法配置 opentracing-spring-jaeger-cloud-starter 来处理除 Uber-Trace-Id 之外的任何其他 header ?我将 Traefik 作为我的 k
我正在尝试将 Jaeger 跟踪集成到 K-Streams 中。我正计划将跟踪添加到我最重要的几个管道中,并且想知道将 traceid 从一个管道传递到另一个管道的好方法是什么? 这是我目前所拥有的
我们在 Istio 中使用 Opentracing/Jaeger 来跟踪多个基于 Spring Boot/Spring Cloud 的微服务。 我目前想知道是否有一个选项可以通过提供有关已执行查询(即
使用 MassTransit.RabbitMQ v5.3.2 和 OpenTracing.Contrib.NetCore v0.5.0。 我可以使用 MassTransit 向 RabbitMQ 发布
我只能找到在 Kafka 中使用 opentracing/jaeger 的旧的和不完整的例子。我想在本地运行一个示例作为概念证明 - opentracing spans to kafka。 我设法让其
我有一个使用 OpenTracing 的 Spring Boot 应用程序,我想将其数据推送到 Prometheus,这样我就可以通过 Grafana 查询所有指标(如本教程 https://www.
我正在努力为 Spring Boot 2.0.2 应用程序设置 OpenTracing/Jaeger。从 Spring Boot 1.5.3 的一个工作但非常示例开始,我转向了 Spring Boot
有一个使用 SLF4J 记录器的现有 Spring Boot 应用程序。我决定通过标准 opentracing 添加对分布式跟踪的支持以 Jaeger 作为跟踪器的 API。令人惊讶的是初始设置是如此
我是一名优秀的程序员,十分优秀!