You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jvm/README.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,24 +7,24 @@ Load following libraries:
7
7
-`com.m3.tracing:core`
8
8
-`com.m3.tracing:opencensus`(If you want to use OpenCensus)
9
9
10
-
And there are framework/library integrations, describe later.
10
+
Application framework integrations (e.g. integration with Spring Boot) are provided, which are described later.
11
11
12
12
13
13
## Initialization
14
14
15
15
### Load SDK
16
16
17
-
You need to specify tracing SDK to use.
17
+
You need to specify which tracing SDK to use.
18
18
19
19
To use OpenCensus, specify `com.m3.tracing.tracer.opencensus.M3OpenCensusTracer` into `M3_TRACER_FQCN` environment variable or `m3.tracer.fqcn` JVM system property.
20
20
21
-
By default, it uses `com.m3.tracing.tracer.logging.M3LoggingTracer` that just output trace information into SLF4J logs. It is useful for local test or stubbing but not useful for production.
21
+
By default, the library uses `com.m3.tracing.tracer.logging.M3LoggingTracer` that just outputs trace information into SLF4J logs. This setting is useful for local testing or stubbing but not for production purposes.
22
22
23
-
See [M3TracerFactory](core/src/main/kotlin/com/m3/tracing/M3TracerFactory.kt) for detail of SDK loading mechanism.
23
+
See [M3TracerFactory](core/src/main/kotlin/com/m3/tracing/M3TracerFactory.kt) for more details of SDK loading mechanisms.
24
24
25
25
### Configure SDK
26
26
27
-
To use OpenCensus, don't forget to look [opencensus/README](opencensus/README.md). You need to set sampling ration explicitly.
27
+
To use OpenCensus, don't forget to look at [opencensus/README](opencensus/README.md). You need to set sampling ratio explicitly.
28
28
29
29
## Integrate with application framework
30
30
@@ -34,48 +34,48 @@ Setup one or some of following integrations:
34
34
35
35
Load `com.m3.tracing:spring-boot` dependency.
36
36
37
-
It traces incoming HTTP request, outgoing HTTP request (with `RestTemplate`) and so on.
37
+
It traces incoming HTTP requests, outgoing HTTP requests (with `RestTemplate`) and so on.
38
38
39
-
See [spring-boot/README](spring-boot/README.md) how to use it.
39
+
See [spring-boot/README](spring-boot/README.md).
40
40
41
41
### Spring Framework without Spring Boot (`com.m3.tracing:spring-web`)
42
42
43
43
Load `com.m3.tracing:spring-web` dependency.
44
44
45
-
See [spring-web/README](spring-web/README.md) how to use it.
45
+
See [spring-web/README](spring-web/README.md).
46
46
47
47
### Servlet without any web framework (`com.m3.tracing:servlet`)
48
48
49
49
Load `com.m3.tracing:serlvet` dependency.
50
50
51
-
See [servlet/README](servlet/README.md) how to use it.
51
+
See [servlet/README](servlet/README.md).
52
52
53
53
## Integrate with libraries
54
54
55
55
### JDBC (trace SQLs of RDBMS)
56
56
57
57
You can use `com.m3.tracing:jdbc-p6spy` to capture SQLs via any JDBC driver.
58
58
59
-
See [jdbc-p6spy/README](jdbc-p6spy/README.md) how to use it.
59
+
See [jdbc-p6spy/README](jdbc-p6spy/README.md).
60
60
61
61
### Apache HttpClient
62
62
63
-
You can use `com.m3.tracing:apache-httpclient` to trace outgoing HTTP request of Apache HttpClient.
63
+
You can use `com.m3.tracing:apache-httpclient` to trace outgoing HTTP requests of Apache HttpClient.
64
64
65
-
See [apache-httpclient/README](apache-httpclient/README.md) how to use it.
65
+
See [apache-httpclient/README](apache-httpclient/README.md).
66
66
67
67
68
68
# Create span by manual
69
69
70
70
You can create span (element of trace) explicitly as like as:
71
71
72
72
```java
73
-
// note: If you are using framework integration, may able to use DI (e.g. `@Autowired Tracer` in spring-boot)
73
+
// note: If you are using framework integration, you might be able to use DI (e.g. `@Autowired Tracer` in spring-boot)
Also you can set custom tag to the span with`Span#set(tagName, value)` method.
87
+
Also you can set custom tag to the span by`Span#set(tagName, value)` method.
88
88
89
89
## Caution for thread / asynchronous operation
90
90
91
-
If your application perform operation over threads (e.g. using [Executor](https://docs.oracle.com/javase/jp/8/docs/api/java/util/concurrent/Executor.html), [Akka](https://akka.io/), ...), you need to propagate tracing context across threads.
91
+
If your application performs an operation over multiple threads (e.g. using [Executor](https://docs.oracle.com/javase/jp/8/docs/api/java/util/concurrent/Executor.html), [Akka](https://akka.io/), ...), you need to propagate the tracing context across threads.
92
92
93
-
Although this library hides context propagation matter as possible, but you need to write a code like this:
93
+
Although this library hides context propagation matters as possible as it can, you need to write a code like this:
0 commit comments