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: opentelemetry/README.md
+31-6Lines changed: 31 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,41 @@
1
1
# OpenTelemetry-Ktor Demo
2
2
3
3
## Running
4
+
5
+
**Note:** You need to have [Docker](https://www.docker.com/) installed and running to run the sample.
6
+
4
7
To run a sample, first, execute the following command in an `opentelemetry` directory:
8
+
5
9
```bash
6
10
./gradlew :runWithDocker
7
11
```
12
+
8
13
It will start a `Jaeger` in the docker container (`Jaeger UI` available on http://localhost:16686/search) and
9
14
then it will start a `server` on http://localhost:8080/
10
15
11
-
Then, to run the client, which will send requests to a server, you can execute the following command in an `opentelemetry` directory:
16
+
Then, to run the client, which will send requests to a server, you can execute the following command in
17
+
an `opentelemetry` directory:
18
+
12
19
```bash
13
20
./gradlew :client:run
14
21
```
15
22
16
-
[OpenTelemetry](https://opentelemetry.io/) has support for `Ktor`, you can find source code [here](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/ktor).
23
+
[OpenTelemetry](https://opentelemetry.io/) has support for `Ktor`, you can find source
You can find all extensions for the client plugin `KtorClientTracing` in the [extractions](./client/src/main/kotlin/opentelemetry/ktor/example/plugins/opentelemetry/extractions/) folder. \
54
-
And you can find all extensions for the server plugin `KtorServerTracing` in the [extractions](./server/src/main/kotlin/opentelemetry/ktor/example/plugins/opentelemetry/extractions/) folder.
72
+
73
+
You can find all extensions for the client plugin `KtorClientTracing` in
74
+
the [extractions](./client/src/main/kotlin/opentelemetry/ktor/example/plugins/opentelemetry/extractions/) folder. \
75
+
And you can find all extensions for the server plugin `KtorServerTracing` in
76
+
the [extractions](./server/src/main/kotlin/opentelemetry/ktor/example/plugins/opentelemetry/extractions/) folder.
55
77
56
78
## Examples
79
+
57
80
Let's see what we will see in the `Jaeger UI` after running the server (with Docker) and client:
58
-
1. We can see two services that send opentelemetry data: `opentelemetry-ktor-sample-server` and `opentelemetry-ktor-sample-client`:
81
+
82
+
1. We can see two services that send opentelemetry data: `opentelemetry-ktor-sample-server`
83
+
and `opentelemetry-ktor-sample-client`:
59
84

60
85
2. If we choose `opentelemetry-ktor-sample-server` service, we will see the next traces:
0 commit comments