Questions tagged [distributed-tracing]

Distributed Tracing aims to provide better observability into distributed systems and microservices for purposes of performance monitoring and troubleshooting issues.

Distributed Tracing

Distributed Tracing aims to provide better observability into distributed systems and microservices for purposes of performance monitoring and troubleshooting issues.

Modern Internet services are often implemented as complex, large-scale distributed systems. These applications are constructed from collections of software modules that may be developed by different teams, perhaps in different programming languages, and could span many thousands of machines across multiple physical facilities. Tools that aid in understanding system behavior and reasoning about performance issues are invaluable in such an environment.

Source: Dapper, a Large-Scale Distributed Systems Tracing Infrastructure

How it works in a nutshell

Distributed Tracing works by collecting the various entry and exit points and useful intermediate data and metrics done by a request until the final response is served to the requesting end. Some Distributed Tracing systems collect this information fully automatic while some other require manual instrumentation of code.

When entering a system, the request is usually assigned a unique Trace ID. This ID is then propagated to any participating systems. Information gathered this way is sent to some sort of backend collecting the data. The collector then aggregates the data via the Trace ID, thus showing the full request as it passed through the distributed system.

Metrics usually included are request time, latency, errors, status codes, etc. but not limited to this.

Open Source implementations:

Several Open Source implementations for Distributed Tracing exist:

  • http://opencensus.io

    A single distribution of libraries for metrics and distributed tracing with minimal overhead that allows you to export data to multiple backends.

  • http://opentracing.io

    Vendor-neutral APIs and instrumentation for distributed tracing

  • http://zipkin.io

    Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in microservice architectures. It manages both the collection and lookup of this data.

  • http://www.jaegertracing.io

    Jaeger, inspired by Dapper and OpenZipkin, is a distributed tracing system released as open source by Uber Technologies. It is used for monitoring and troubleshooting microservices-based distributed systems

There is also a W3 working group aiming to standardize context propagation across various Distributed Tracing systems:

Because Distributed Tracing is crucial for application performance monitoring, most APM vendors adopted it in one way or another. Notable APM vendors offering Distributed Tracing are AppDynamics, DynaTrace, Instana, Lightstep or New Relic.

219 questions
0
votes
1 answer

Custom traceId from headers

I'm using sleuth 3.1.8 and spring-boot 2.7.11 When I call my rest api from another spring application, traceId is propagated and printing correctly. But when I try to call my rest api from postman passing below headers, sleuth is not considering…
Ganesh P
  • 1,075
  • 1
  • 13
  • 19
0
votes
0 answers

Spring Boot 3 context propagation using micrometer does not work

We have a microservices architecture and are trying to implement distributed tracing, with the below somewhat naive implementation: I've got the following dependencies for micrometer and reactor:
Nestor Milyaev
  • 5,845
  • 2
  • 35
  • 51
0
votes
1 answer

Distributed Tracing Using brave and Brave-context-log4j

I have one legacy project which is using jetty,apache http client, log4j2. I want to implement distributed tracing and want to populate trace id and span id into the logs,since this is not a spring boot project I cannot use spring slueth which do…
0
votes
1 answer

New relic - Passing custom attribute in distributed tracing

We have below app archtecture setup. ReactJS UI -> NodeJs layer ->Azure Service Bus -> Spring boot app. When we make a call from UI, the request goes through the above flow and the response gets back to the UI. We have web, Java and node JS new…
0
votes
1 answer

Springboot OpenTelemetry Setup for Tracing - TraceId and SpanId are zeros

I am trying to get open telemetry tracing setup in my spring boot 2.7 project. It is just a simple REST api project. The tutorial I am following is the following one. I checked several other articles as well, but all of them discuss the same…
vigamage
  • 1,975
  • 7
  • 48
  • 74
0
votes
1 answer

How can I automate data deletion in jaeger and elasticsearch?

I want to automate the process of removing old data from elastic search container. I have written a docker-compose file to run elastic search, jaeger collector, agent, and query containers and then configured jaeger with elastic search. Now I want…
0
votes
6 answers

Capture flask request when entering and leaving the application

I'm struggling a bit with writing decorators to capture and modify requests within my flask application once the requests enters the application context and leaves the application context. My function in a flask application looks like below. I want…
xan
  • 4,640
  • 13
  • 50
  • 83
0
votes
0 answers

How to disable activity trace propagation for a specific HttpClientHandler?

As I understand there are 2 main methods to disable trace propagation in .NET 6 (for header alteration): DistributedContextPropagator.Current = DistributedContextPropagator.CreateNoOutputPropagator() to make a process-wide change; new…
0
votes
1 answer

Logging in microservice architecture

We are currently creating an application in .NET framework with the microservice architecture. As this is an application that'll need to be implemented at our customers, on premise, we require logging. We do not want this to be cloud based, and…
dgrs
  • 57
  • 6
0
votes
0 answers

Adding TraceId headers to responses in Spring REST webservice only works when response body is not empty

We have a Spring Boot application, that contains this class, which should add as UUID as a header to each response to a requests to the app's REST operations. /** * Adds the trace-id as a header to each response */ @ControllerAdvice public class…
0
votes
0 answers

Distributed Tracing -JaegerUi not showing service name

I'm trying to implement distributed tracing in .net 6. I am running jaeger from cmd by using .\jaeger-all-in-one.exe. I am able to run and i can view through http://localhost:16686/. now I added below code in…
0
votes
0 answers

How do I extract micrometer TracingContext using Json log4j formatting

I currently have a spring boot project with log4j2, log4j-layout-template-json and, micrometer-tracing The for illustrative purposes, log message that gets created looks like the following: (note that newlines have been added to make this more…
0
votes
0 answers

Unable to change zipkin endpoint URL in spring-boot

Starting with Spring-boot 3.0.4, support for distributed tracing has been migrated to Spring-boot from spring-cloud-sleuth. I have created a spring-boot micro-service that is supposed to post the traces to Zipkin. By default, spring-boot uses…
0
votes
0 answers

Excluding health and actuator url in opentelemetry java agent

I am using opentelemetry-javaagent.jar. Health check and actuator url are also coming in jaeger. Can I exclude those url patterns somehow in java command itself like -Dotel.exclude.url?
0
votes
1 answer

Unable to use the Golang otel http client to propagate B3 headers to downstream service

I'm trying to use the otel packages to do tracing header (b3) propagation. Unfortunately I'm unable to get this to work. For the purposes of explaining, I have created a project on github which illustrates my problem:…
Rogier Lommers
  • 2,263
  • 3
  • 24
  • 38