Skip to content

Feat/add instrumentation to scripts (Soap, Rest) - #1753

Merged
lbroudoux merged 12 commits into
microcks:1.13.xfrom
StartUpNationLabs:feat/add-instrumentation-to-scripts
Sep 29, 2025
Merged

lbroudoux merged 12 commits into
microcks:1.13.xfrom
StartUpNationLabs:feat/add-instrumentation-to-scripts

Conversation

@Apoorva64

Copy link
Copy Markdown
Contributor

Description

This PR adds instrumentation to JS and Groovy Script in Soap And Rest Flows.

The JS and Grovy scripts are not handled in the same way. The Groovy script engine throws when an error happens but the JS engine encapsulates the error, This is why the JS script instrumentation is added to the engine and the groovy script instrumentation is added to the Processor. I think we need a refactor to cleaunp this difference.

Related issue(s)

#1728

@Apoorva64
Apoorva64 changed the base branch from master to 1.13.x September 24, 2025 10:59

@lbroudoux lbroudoux left a comment

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.

Thanks for the good work. These are mainly general comments and minor things that could be refactor later, but I'd like to get your point on those before merging. Thanks!

@lbroudoux

Copy link
Copy Markdown
Member

@Apoorva64, don't forget to sign your commits! The DCO check is failing at the moment.

@Apoorva64
Apoorva64 force-pushed the feat/add-instrumentation-to-scripts branch from 34257ec to aa85b26 Compare September 26, 2025 14:11
@Apoorva64
Apoorva64 requested a review from lbroudoux September 26, 2025 15:01

@lbroudoux lbroudoux left a comment

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.

Looks good to me! Thanks a lot @Apoorva64!

lbroudoux
lbroudoux previously approved these changes Sep 26, 2025

@lbroudoux lbroudoux left a comment •

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.

Forgot to approve ;-) but the build is failing... It looks like the tests are broken

@lbroudoux
lbroudoux dismissed their stale review September 26, 2025 15:15

Build is failing

@lbroudoux

Copy link
Copy Markdown
Member

There's an issue in tests:

Error creating bean with name 'restInvocationProcessor' defined in file [/home/runner/work/microcks/microcks/webapp/target/classes/io/github/microcks/web/RestInvocationProcessor.class]: Unsatisfied dependency expressed through constructor parameter 4: No qualifying bean of type 'io.opentelemetry.api.OpenTelemetry' available: expected at least 1 bean which qualifies as autowire candidate.

It looks like there's no OpenTelemetry bean loaded in the test context. I wonder if this is mandatory as we should be able to totally disable live traces (when running in uber native within testcontainers for example).

Maybe we should put the RestInvocationProcess constructor argument as @Nullable and add some extra guards to avoid this kind of error?

Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
@Apoorva64

Apoorva64 commented Sep 26, 2025 •

Copy link
Copy Markdown
Contributor Author

There's an issue in tests:

Error creating bean with name 'restInvocationProcessor' defined in file [/home/runner/work/microcks/microcks/webapp/target/classes/io/github/microcks/web/RestInvocationProcessor.class]: Unsatisfied dependency expressed through constructor parameter 4: No qualifying bean of type 'io.opentelemetry.api.OpenTelemetry' available: expected at least 1 bean which qualifies as autowire candidate.

It looks like there's no OpenTelemetry bean loaded in the test context. I wonder if this is mandatory as we should be able to totally disable live traces (when running in uber native within testcontainers for example).

Maybe we should put the RestInvocationProcess constructor argument as @Nullable and add some extra guards to avoid this kind of error?

i've fixed the build by creating a resolver which resolves the Opentelemetry bean depending of where it is. When disabling the traces with otel.sdk.disabled it still works, it ignores the traces as expected

@Apoorva64
Apoorva64 requested a review from lbroudoux September 26, 2025 16:08
@lbroudoux

Copy link
Copy Markdown
Member

i've fixed the build by creating a resolver which resolves the Opentelemetry bean depending of where it is. When disabling the traces with otel.sdk.disabled it still works, it ignores the traces as expected

It works, but it creates yet another bean. Wouldn't it be possible to just use @Nullable? If there is no other comment, I'll merge it like this, but add this point as a refactoring before the release.

@lbroudoux lbroudoux left a comment

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.

That's good. Thnaks. We will have to deep dive if we can finally get rid of the additional resolver.

@lbroudoux
lbroudoux merged commit 560d5b5 into microcks:1.13.x Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants