# Interceptors - Java SDK

> For the complete documentation index, see [llms.txt](https://docs.temporal.io/llms.txt).
> Any documentation page is available as raw Markdown by appending `.md` to its URL.

Interceptors wrap inbound and outbound Temporal calls so you can apply shared behavior such as tracing, logging, or
authorization. See [Interceptors](/encyclopedia/interceptors) for the inbound vs outbound model.

Register them on the Client (`WorkflowClientOptions.setInterceptors`) or the Worker Factory
(`WorkerFactoryOptions.setWorkerInterceptors`). Extend `WorkflowClientInterceptorBase` / `WorkerInterceptorBase` and
override only the methods you need. Full API:
[`io.temporal.common.interceptors`](https://www.javadoc.io/doc/io.temporal/temporal-sdk/latest/io/temporal/common/interceptors/package-summary.html).

Several interceptor APIs are marked `@Experimental`.

> **⚠️ Warning:**
> Workflow interceptors and replay
>
> Workflow interceptor methods also run during [replay](/develop/java/best-practices/testing-suite#replay). Use replay-safe
> APIs for logging, randomness, and time.
>

## Related

- [Observability - Tracing](/develop/java/platform/observability#tracing)
- [Error handling - Worker Interceptor](/develop/java/best-practices/error-handling#centralize-with-interceptor)
- [Spring Boot - Interceptors](/develop/java/integrations/spring-boot-integration#interceptors)
- [Plugins - Interceptors](/develop/plugins-guide#interceptors)
