Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Latest commit

 

History

History
41 lines (37 loc) · 1.22 KB

README.md

File metadata and controls

41 lines (37 loc) · 1.22 KB

Aliyun LOG Jaeger Sender

Introduction

These components make Jaeger compatible with Aliyun Log Service.

Usage

Adding the Dependencies in pom.xml

<dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-api</artifactId>
      <version>0.31.0</version>
</dependency>
<dependency>
      <groupId>com.aliyun.openservices</groupId>
      <artifactId>aliyun-log-jaeger-sender</artifactId>
      <version>0.0.9</version>
</dependency>
<dependency>
    <groupId>com.uber.jaeger</groupId>
    <artifactId>jaeger-core</artifactId>
    <version>0.26.0</version>
</dependency>

Build a Tracer

aliyunLogSender = new AliyunLogSender
      .Builder(projectName, logStore, endpoint, accessKeyId, accessKey)
      .withTopic(topic)
      .build();
RemoteReporter remoteReporter = new RemoteReporter.Builder().withSender(aliyunLogSender).build();
tracer = new Tracer.Builder(serviceName)
  .withReporter(remoteReporter)
  .withSampler(new ConstSampler(true))
  .build();

Reference

simple-opentracing-demo

spring-boot-opentracing-demo