Jaeger

Jaeger is a distributed tracing tool compatible with the OpenTelemetry protocol, which allows you to monitor and resolve performance issues in complex and distributed systems, providing detailed visibility into transactions and dependencies.

Here is the revised text keeping the original content:


The integration with OpenTelemetry is native to the Devprime platform, simplifying the software developer’s journey with the use of this capability that adds a lot of value in the distributed systems scenario, allowing you to track a business process across all the microservices involved.

The main Cloud platforms on the market already support OpenTelemetry, which facilitates its adoption in a production environment. There is the option to use it in Kubernetes or any other managed solution.

In the context of our demo, we’ll use a local docker container to set up the data collector and the Jaeger tool. To configure, you must specify the protocol and endpoint in the configuration.

Protocol URL
grpc http://localhost:4317
http http://localhost:4318

Follow the steps below:

  1. Install the Devprime CLI.

  2. Initialize the Jaeger container provided in the docker documentation.

  3. Clone the repository with the two microservices (ms-order/ms-payment) or implement manually:

    git clone https://github.com/devprime/devprime-microservices-order-payment.git
    
  4. Enter the cloned folder and run the command dp stack:

    dp stack
    

a) Open the file in Visual Studio Code inside the folder of each microservice:

code src/App/appsettings.json

b) Open the Observability key and verify that the Enable option is set to true. Next, go to the Trace option and set Enable to true, Type to Jaeger, and set the host/port/endpoint with the service URL according to the protocol (grpc/http). On local docker, the default URL for grpc is “http://localhost:4317”.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 "Devprime_Observability": {
    "Enable": "true",
    "Log": {
      "Enable": "true",
      "Save": "false",
      "Type": "text",
      "FileSize": "5242880",
      "HideDetails": "false",
      "HideDateTime": "false",
      "ShowAppName": "false",
      "Path": "",
      "ShowHttpErrors": "400",
      "Export": {
        "Enable": "false",
        "Type": "seq",
        "Host": "http://localhost:5341",
        "ApiKey": "your api key",
        "ControlLevelSwitch": "Information"
      }
    },
    "Metrics": {
      "Enable": "false"
    },
    "Trace": {
      "enable": "true",
      "Type": "Jaeger",
      "Host": "localhost",
      "Port": "4317",
      "Endpoint": "http://localhost:4317",
      "Protocol": "grpc"
    }
  },
  1. Run the ‘ms-order’ microservice and notice in the log that the configured Open Telemetry information will already be in operation. The log already shows that the Trace is set to Enable and the Type is set to “Jaeger”.
1
2
[App][Observability]["Enable"][Log "Enable"][Export "Disable"]
[Trace "Enable"][Type "jaeger"][Metrics "Disable"]

Tracking the trace of two or more microservices

  1. Run the ms-order and ms-payment microservice
  2. Open the browser in http://localhost:5000 and make one or more posts in /v1/order
  3. Open Jaeger in the browser in http://localhost:16686 and view

Welcome Jaeger

  1. Check all processing details

Welcome Jaeger

Legal information:
Jaeger is an opensource tool compatible with the Open Telemetery standard. Any information on licensing and use we recommend the manufacturer.

Last modified November 20, 2024 (61099f59)