-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adding traces to UF components #1763
feat: adding traces to UF components #1763
Conversation
8ffee9e
to
f23a95b
Compare
I still need to fix a couple of things but it's reviewable already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a first pass. Mainly on the codegen part. Left some comments.
...protobuf/src/main/scala/kalix/javasdk/impl/eventsourcedentity/EventSourcedEntityRouter.scala
Outdated
Show resolved
Hide resolved
codegen/java-gen/src/main/scala/kalix/codegen/java/EventSourcedEntitySourceGenerator.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-spring/src/main/scala/kalix/javasdk/impl/Telemetry.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-spring/src/main/scala/kalix/javasdk/impl/Telemetry.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-spring/src/main/scala/kalix/javasdk/impl/Telemetry.scala
Outdated
Show resolved
Hide resolved
...rc/main/scala/kalix/javasdk/impl/eventsourcedentity/ReflectiveEventSourcedEntityRouter.scala
Outdated
Show resolved
Hide resolved
The new integration test won't pass until https://github.com/lightbend/kalix-proxy/pull/2096 is merged |
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/action/ActionsImpl.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/action/ActionsImpl.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/telemetry/Telemetry.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/telemetry/Telemetry.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/telemetry/Telemetry.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-spring/src/it/java/com/example/wiring/tracing/TracingIntegratonTest.java
Outdated
Show resolved
Hide resolved
...rc/main/scala/kalix/javasdk/impl/eventsourcedentity/ReflectiveEventSourcedEntityRouter.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-spring/src/main/scala/kalix/javasdk/impl/action/ReflectiveActionRouter.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you expect to try tackle propagating the context to whatever the UF does separately, and this only adds spans for the SDK side of the components? Are we sure we are interested in the SDK spans or is the propagation possibly the valuable thing?
I think I mentioned this in the other PR but separate SDK spans for calls we already have spans for in the proxy is probably more interesting to us than it is to the users.
Compare the value for a user of:
[-------- proxy --------]
[------- sdk --------]
Vs
[----- service/component A -----------------------------------------]
[ ---- service/component B] [----- service/component C –––]
Where they can see what component talked to what other component and which of them took time etc.
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/action/ActionsImpl.scala
Outdated
Show resolved
Hide resolved
...protobuf/src/main/scala/kalix/javasdk/impl/eventsourcedentity/EventSourcedEntitiesImpl.scala
Outdated
Show resolved
Hide resolved
...protobuf/src/main/scala/kalix/javasdk/impl/eventsourcedentity/EventSourcedEntityRouter.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/telemetry/Telemetry.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/telemetry/Telemetry.scala
Outdated
Show resolved
Hide resolved
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/telemetry/Telemetry.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
sdk/java-sdk-protobuf/src/main/scala/kalix/javasdk/impl/DiscoveryImpl.scala
Outdated
Show resolved
Hide resolved
...spring/src/it/java/com/example/wiring/eventsourcedentities/tracingcounter/TCounterEvent.java
Outdated
Show resolved
Hide resolved
c7a4a94
to
1ca8915
Compare
@@ -1,7 +1,7 @@ | |||
version: "3" | |||
services: | |||
kalix-proxy: | |||
image: gcr.io/kalix-public/kalix-proxy:1.1.19 | |||
image: gcr.io/kalix-workbench/kalix-proxy:1.1.20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these changes should stay, it is probably be the official image?
Also makes me wonder a bit if this shouldn't be a separate test module for tracing so that running other it tests for the SDK doesn't necessarily require running the additional containers etc? Maybe talk to @aludwiko or @octonato a bit about it just to be sure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
darn, I thought I changed that back.
Sure. Looking for your feedback, guys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... I did change it. But didn't push
. Not very useful 'it works in my machine'
with one ESE and one Action subscribed to that entity.
moving telemetry to java-sdk-protobuf where there is more data to add and the span length is (hopefully) now correct
- Closing the span after the future is complete - Creating only one thread to close/flush all the OpenTelemetrySdks - Some cleaning - Creating in a map of OpenTelemetrySdks to reuse by service
508ad85
to
9ffa1de
Compare
@@ -52,18 +50,27 @@ public abstract class DockerIntegrationTest { | |||
|
|||
private KalixSpringApplication kalixSpringApplication; | |||
|
|||
public DockerIntegrationTest(ApplicationContext applicationContext) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes are related to the TracingIntegrationTest
. I needed to pass some extra configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing then I think this is fine to merge
References https://github.com/lightbend/kalix/issues/9380