Skip to content

Commit

Permalink
more graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
maeddes committed Jul 29, 2024
1 parent 26ecc93 commit 7a63065
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ curl -X POST localhost:8080/todos/NEW

Open the Jaeger Web UI and search for the last trace we just generated. It will look like this:

TODO Screenshot
{{< figure src="images/jaeger_trace_auto_instrument.png" width=700 caption="Jaeger trace - Auto instrumentation" >}}

Now open the Java source file under `todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java` directly here in the editor.

Expand Down Expand Up @@ -153,7 +153,7 @@ You will see the two following methods:

The `addTodo` method is the entry point when the REST call arrives at the application. We can see that in the Jaeger trace. This is visible in the entry span called `POST/todos/{todo}`:

screenshot
{{< figure src="images/jaeger_trace_auto_instrument.png" width=700 caption="Jaeger trace - Auto instrumentation" >}}

With the invocation of `todoRepository.save(new Todo(todo));` the new item will be persisted in the database.
This is also visible in the Jaeger trace.
Expand Down Expand Up @@ -209,8 +209,12 @@ Observe the `POST` call once more.

You will now see that between the entry span `POST/todos/{todo}` and the third span `todoRepository.save` there is one called `todoRepository.someInternalMethod`. This is due to the annotation we did.

{{< figure src="images/jaeger_trace_annotated.png" width=700 caption="Jaeger trace - Auto instrumentation with annotations" >}}

If you expand the line of trace in the Jaeger UI you will get `Tags` and `Process` details. Expand all of it.

{{< figure src="images/jaeger_trace_span_detail.jpg" width=700 caption="Jaeger trace - Span Detail" >}}

Among other details you will be able to see the details of the method and name of the used library.

```
Expand Down Expand Up @@ -257,7 +261,7 @@ As the latest entry you should now see
todo - SMILE
```
Screenshot
{{< figure src="images/jaeger_trace_span_detail_todo.png" width=700 caption="Jaeger trace - Span Detail with value" >}}
This means you can now also see the specific parameter which has been passed and relate it to a slow performing call in case it happens.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ If there are any errors review the changes and repeat.

### Generate metrics

{{< figure src="images/tracer_generates_spans.drawio.png" width=650 caption="Tracing signal" >}}

To show a very simple form of metric collection we'll try to define a counter for the amount of invocations of a REST call.
We need to initialize the counter outside of this method.
Expand Down

0 comments on commit 7a63065

Please sign in to comment.