# Java Observability uses deprecated functions

**URL:** https://community.temporal.io/t/java-observability-uses-deprecated-functions/11447
**Category:** Documentation Feedback
**Created:** [March 20, 2024, 6:44pm UTC](https://community.temporal.io/t/java-observability-uses-deprecated-functions/11447 "2024-03-20T18:44:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rocketraman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/rocketraman/32/3687_2.png) [@rocketraman](https://community.temporal.io/u/rocketraman)
#### Post date: [March 20, 2024, 6:44pm UTC](https://community.temporal.io/t/java-observability-uses-deprecated-functions/11447/1 "2024-03-20T18:44:49Z")

</div>

The Java observability docs at [Observability - Java SDK feature guide | Temporal Documentation](https://docs.temporal.io/dev-guide/java/observability) reference using `setSearchAttributes` but this function is deprecated in favor of `setTypedSearchAttributes`. The latter is not dcoumented at all.

In addition, the docs reference some type `ListWorkflowExecutions` which I think should be `WorkflowClient.listExecutions(query)`.

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [March 25, 2024, 8:05pm UTC](https://community.temporal.io/t/java-observability-uses-deprecated-functions/11447/2 "2024-03-25T20:05:51Z")

</div>

For the search attributes, yes, that is true, we have sample you could use: [samples-java/core/src/main/java/io/temporal/samples/hello/HelloTypedSearchAttributes.java at main · temporalio/samples-java · GitHub](https://github.com/temporalio/samples-java/blob/main/core/src/main/java/io/temporal/samples/hello/HelloTypedSearchAttributes.java)

For list executions, yes this is a new convenience method that does pagination under the hood for you, you can still use ListWorkflowExecutions if you wish, actually could be useful if you are looking for just the first page of results for longer event histories in some cases.
