javaApiInterceptEnvironmentCreated

Intercepts environment creation to allow features to modify or enhance the agent environment.

This overload is JVM-friendly and accepts an async transformer.

Parameters

feature

The feature associated with this transformer.

transform

An async transformer that takes the transforming context and the current environment, and returns a possibly modified environment.

Example (Java): pipeline.interceptEnvironmentCreated(feature, (ctx, environment) -> { // Modify the environment and return a CompletionStage return java.util.concurrent.CompletableFuture.completedFuture(environment); });