Skip to content

Rework otel crud storage#826

Draft
FrancesTwisk wants to merge 49 commits into
wearefrank:masterfrom
FrancesTwisk:rework-otel-crud-storage
Draft

Rework otel crud storage#826
FrancesTwisk wants to merge 49 commits into
wearefrank:masterfrom
FrancesTwisk:rework-otel-crud-storage

Conversation

@FrancesTwisk

Copy link
Copy Markdown

Processes spans to reports. Steps:

  1. Buffers spans into traces.
  2. traces get evicted from buffer.
  3. Calls testtool.checkpoint to make start-, info- and endpoints for each span.
  4. checks if report in progress: yes -> then normal workflow. no -> check if report with same corrId in storage, if so reopen, if not then normal workflow and create a new report.
  5. When report is reopend and checkpoints have an id and parentId -> report gets restructured to append new checkpoints in correct place to form the tree.
  6. report closes.

…rage

# Conflicts:
#	ladybug-backend-jaxrs/pom.xml
#	ladybug-backend-jaxrs/src/main/java/org/wearefrank/ladybug/web/jaxrs/api/TracingApi.java
#	ladybug-backend-springmvc/pom.xml
#	ladybug-backend-springmvc/src/main/java/org/wearefrank/ladybug/web/springmvc/api/TracingApi.java
#	ladybug-common/pom.xml
#	ladybug-common/src/main/java/org/wearefrank/ladybug/web/common/TracingApiImpl.java
Comment thread README.md

```
<property name="openTelemetryEndpoint" ref="openTelemetryEndpoint"/>
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have an end-to-end test some time with Cypress. I also would like to have end-to-end tests with openTelemetryEndpoint enabled and test environments with openTelemetryEndpoint disabled. Would be nice if that could be added to this PR, but in my opinion it can also be done in a later PR.

import java.util.Objects;
import java.util.Scanner;
import java.util.Set;
import java.util.*;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer explicit import, for example java.util.List or java.util.ArrayList or something. I would like to see explicitly what you are importing from each package. I think this may help me in the future when I see a classname somewhere and I want to know what package it is coming from.

Comment thread ladybug-common/src/main/java/org/wearefrank/ladybug/TestTool.java Outdated
}

@Test
public void testOrphanGetsReparentedLater() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test. This is quite helpful.

<!-- Use memory storage by default as Cypress tests depend on memory storage / starting with empty storages -->

<bean name="debugStorage" class="org.wearefrank.ladybug.storage.memory.MemoryLogStorage">
<bean name="debugStorage" class="org.wearefrank.ladybug.storage.memory.MemoryCrudStorage">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug storage should be a LogStorage because otherwise users can change reports in the debug tab which is not desired. This emphasizes the need to have a different environment for testing OpenTelemetry.


@Override
public void store(Report report) throws StorageException {
storeWithoutException(report);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't expect this to be necessary. A log storage has storeWithException() to store reports.

@@ -18,18 +18,7 @@
import java.beans.Transient;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are new transient fields of Report and Checkpoint. These are not persisted when you download and upload reports. Are all use cases covered about download and upload for OpenTelementry and non-OpenTelemetry reports?

@@ -2,7 +2,6 @@
<%@ page import="org.wearefrank.ladybug.TestTool"%>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add links here to create OpenTelemetry stuff (spans? traces?)?

…rage

# Conflicts:
#	ladybug-backend-jaxrs/src/main/java/org/wearefrank/ladybug/web/jaxrs/api/TracingApi.java
#	ladybug-backend-springmvc/src/main/java/org/wearefrank/ladybug/web/springmvc/api/TracingApi.java
#	ladybug-common/pom.xml
#	ladybug-common/src/main/java/org/wearefrank/ladybug/TestTool.java
#	ladybug-common/src/main/java/org/wearefrank/ladybug/web/common/TracingApiImpl.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants