Stacksaga Trace-Window Connector
Overview
Stacksaga Trace-Window Connector is the tool that allows you to connect your orchestrator service with Trace-Window by exposing the necessary APIs and data formats as endpoints.
Features
-
Exposes APIs for Trace-Window to fetch trace data from the orchestrator service from any supported databases implementations.
-
It supports both
Spring MVCandSpring WebFluxbased orchestrator services, allowing for flexibility in the choice of web framework. -
Provide the authentication and authorization mechanisms to ensure secure access to the trace data for the production environment and authentication free access for the development environment.
Adding the Connector Dependency
To use the Trace-Window feature, first add the matching connector dependency to your project’s pom.xml. Stacksaga ships one such dependency per web stack; add the one that matches your orchestrator service’s technology:
-
stacksaga-trace-window-connector-servlet— for orchestrator services built withSpring MVC(Servlet stack). -
stacksaga-trace-window-connector-webflux— for orchestrator services built withSpring WebFlux(reactive stack).
Both dependencies pull in stacksaga-trace-window-connector-api transitively, so that shared module never needs to be declared or configured directly — declaring the servlet or webflux dependency is all that’s required on the dependency side. The dependency alone doesn’t switch the feature on, though: it must also be enabled via the stacksaga.trace-window.enable-api property, described in Configuration Properties.
stacksaga-trace-window-connector-servlet for Spring MVC Orchestrator Services
To enable Trace-Window for a Spring MVC based orchestrator service, add the stacksaga-trace-window-connector-servlet dependency to your project. This is what exposes the required APIs and data formats for Trace-Window to fetch trace data from your orchestrator service.
Here is an example of how to add the stacksaga-trace-window-connector-servlet dependency to your project
<dependencyManagement>
<dependencies>
<dependency> <!--Only for stacksaga dependencies version management-->
<groupId>org.stacksaga</groupId>
<artifactId>stacksaga-bom</artifactId>
<version1.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency> (1)
<groupId>org.stacksaga</groupId>
<artifactId>stacksaga-trace-window-connector-servlet</artifactId>
</dependency>
</dependencies>
| 1 | Add the stacksaga-trace-window-connector-servlet dependency to enable Trace-Window for Spring MVC. This is the only Trace-Window connector dependency you need to declare — stacksaga-trace-window-connector-api comes along transitively. |
stacksaga-trace-window-connector-webflux for Spring WebFlux Orchestrator Services
To enable Trace-Window for a Spring WebFlux based orchestrator service, add the stacksaga-trace-window-connector-webflux dependency to your project. This is what exposes the required APIs and data formats for Trace-Window to fetch trace data from your orchestrator service.
Here is an example of how to add the stacksaga-trace-window-connector-webflux dependency to your project.
<dependencyManagement>
<dependencies>
<dependency> <!--Only for stacksaga dependencies version management-->
<groupId>org.stacksaga</groupId>
<artifactId>stacksaga-bom</artifactId>
<version1.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency> (1)
<groupId>org.stacksaga</groupId>
<artifactId>stacksaga-trace-window-connector-webflux</artifactId>
</dependency>
</dependencies>
| 1 | Add the stacksaga-trace-window-connector-webflux dependency to enable Trace-Window for Spring WebFlux. This is the only Trace-Window connector dependency you need to declare — stacksaga-trace-window-connector-api comes along transitively. |
Configuration Properties
All properties are prefixed with stacksaga.trace-window.
| Property | Data Type | Default Value | Description |
|---|---|---|---|
|
|
|
Enables the local |
|
|
|
Protects every |
|
|
(none) |
The access token used to validate incoming |
|
|
|
The port on which the Servlet: adds an extra Tomcat connector sharing the same thread pool — no extra threads are pre-allocated. |
|
|
|
(WebFlux only) Number of Netty event-loop threads allocated to the secondary admin server started on |
|
|
(none) |
The name of a Spring Boot SSL bundle (declared under |
When enable-api=true and secure-api=true, startup validation enforces that access-token is present.
The application will fail to start if the token is missing.
|
Configuration Examples
Minimal — API enabled with No authentication (Development / testing only)
stacksaga:
trace-window:
enable-api: true
secure-api: false
Dedicated connector port (HTTP) and token authentication
-
The
/stacksagaendpoints are only reachable on port8787. Requests to/stacksagaon the main port receive403 Forbidden. -
Create access token. read more User management
stacksaga:
trace-window:
enable-api: true
connector-port: 8787
access-token: "your-token-generated-from-trace-window-ui"
Dedicated connector port with HTTPS (SSL bundle)
Define the SSL bundle under spring.ssl.bundle.* and reference it by name.
spring:
ssl:
bundle:
jks:
my-admin-cert:
keystore:
location: classpath:admin-keystore.p12
password: changeit
type: PKCS12
stacksaga:
trace-window:
enable-api: true
access-token: "your-token-generated-from-trace-window-ui"
connector-port: 8787
connector-ssl-bundle: my-admin-cert
The main application port (e.g. server.port=8443) and the connector port can use different certificates.
Each connector/server owns its SSL settings independently.
|
Dedicated connector port with custom thread count (WebFlux only)
Increase the event-loop thread count when the connector port is expected to handle sustained concurrent traffic.
stacksaga:
trace-window:
enable-api: true
access-token: "your-token-generated-from-trace-window-ui"
connector-port: 8787
connector-event-loop-threads: 2
The connector-event-loop-threads property is only meaningful for the WebFlux variant.
It has no effect in the Servlet variant.
|