Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 16 additions & 22 deletions docs/best-practices/worker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ production-ready Worker image:

{/* SNIPSTART oms-dockerfile-worker */}
[Dockerfile](https://github.com/temporalio/reference-app-orders-go/blob/main/Dockerfile)

```Dockerfile
FROM golang:1.24.1 AS oms-builder

Expand All @@ -79,7 +78,6 @@ RUN --mount=type=cache,target=/go/pkg/mod \

FROM busybox AS oms-worker
```

{/* SNIPEND oms-dockerfile-worker */}

This Dockerfile uses a multi-stage build pattern with two stages:
Expand All @@ -102,27 +100,25 @@ uses environment variables to configure the Worker:

{/* SNIPSTART oms-billing-worker-deployment {"selectedLines": ["20-35"]} */}
[deployments/k8s/billing-worker-deployment.yaml](https://github.com/temporalio/reference-app-orders-go/blob/main/deployments/k8s/billing-worker-deployment.yaml)

```yaml
# ...
spec:
containers:
- args:
- -k
- supersecretkey
- -s
- billing
env:
- name: FRAUD_API_URL
value: http://billing-api:8084
- name: TEMPORAL_ADDRESS
value: temporal-frontend.temporal:7233
image: ghcr.io/temporalio/reference-app-orders-go-worker:latest
name: billing-worker
imagePullPolicy: Always
enableServiceLinks: false
spec:
containers:
- args:
- -k
- supersecretkey
- -s
- billing
env:
- name: FRAUD_API_URL
value: http://billing-api:8084
- name: TEMPORAL_ADDRESS
value: temporal-frontend.temporal:7233
image: ghcr.io/temporalio/reference-app-orders-go-worker:latest
name: billing-worker
imagePullPolicy: Always
enableServiceLinks: false
```

{/* SNIPEND */}

### Separate Task Queues logically
Expand Down Expand Up @@ -150,7 +146,6 @@ Worker reference to avoid this issue.

{/* SNIPSTART oms-billing-worker-go {"selectedLines": ["12-23"]} */}
[app/billing/worker.go](https://github.com/temporalio/reference-app-orders-go/blob/main/app/billing/worker.go)

```go
// ...
// RunWorker runs a Workflow and Activity worker for the Billing system.
Expand All @@ -166,7 +161,6 @@ func RunWorker(ctx context.Context, config config.AppConfig, client client.Clien
return w.Run(temporalutil.WorkerInterruptFromContext(ctx))
}
```

{/* SNIPEND */}

### Use Worker Versioning to safely deploy new Workflow code
Expand Down
3 changes: 1 addition & 2 deletions docs/develop/dotnet/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ However, sometimes you'll want to retrieve one or more Workflow Executions based
You can do this with [Search Attributes](/search-attribute).

- [Default Search Attributes](/search-attribute#default-search-attribute) like `WorkflowType`, `StartTime` and `ExecutionStatus` are automatically added to Workflow Executions.
- _Custom Search Attributes_ can contain their own domain-specific data (like `customerId` or `numItems`).
- A few [generic Custom Search Attributes](/search-attribute#custom-search-attribute) like `CustomKeywordField` and `CustomIntField` are created by default in Temporal's [Docker Compose](https://github.com/temporalio/docker-compose).
- [Custom Search Attributes](/search-attribute#custom-search-attribute) can contain their own domain-specific data (like `customerId` or `numItems`).

The steps to using custom Search Attributes are:

Expand Down
4 changes: 0 additions & 4 deletions docs/develop/environment-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ To load the `default` profile along with any environment variables in TypeScript

{/* SNIPSTART typescript-env-config-load-default-profile {"highlightedLines": "17-19,28-29"} */}
[env-config/src/load-from-file.ts](https://github.com/temporalio/samples-typescript/blob/main/env-config/src/load-from-file.ts)

```ts {17-19,28-29}
import { Connection, Client } from '@temporalio/client';
import { loadClientConnectConfig } from '@temporalio/envconfig';
Expand Down Expand Up @@ -378,7 +377,6 @@ main().catch((err) => {
process.exit(1);
});
```

{/* SNIPEND */}

</SdkTabs.TypeScript>
Expand Down Expand Up @@ -693,7 +691,6 @@ To load a specific profile from a custom path in TypeScript, use the `loadClient

{/* SNIPSTART typescript-env-config-load-default-profile {"highlightedLines": "17-19,28-29"} */}
[env-config/src/load-from-file.ts](https://github.com/temporalio/samples-typescript/blob/main/env-config/src/load-from-file.ts)

```ts {17-19,28-29}
import { Connection, Client } from '@temporalio/client';
import { loadClientConnectConfig } from '@temporalio/envconfig';
Expand Down Expand Up @@ -736,7 +733,6 @@ main().catch((err) => {
process.exit(1);
});
```

{/* SNIPEND */}

</SdkTabs.TypeScript>
Expand Down
3 changes: 1 addition & 2 deletions docs/develop/go/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ However, sometimes you'll want to retrieve one or more Workflow Executions based
You can do this with [Search Attributes](/search-attribute).

- [Default Search Attributes](/search-attribute#default-search-attribute) like `WorkflowType`, `StartTime` and `ExecutionStatus` are automatically added to Workflow Executions.
- _Custom Search Attributes_ can contain their own domain-specific data (like `customerId` or `numItems`).
- A few [generic Custom Search Attributes](/search-attribute#custom-search-attribute) like `CustomKeywordField` and `CustomIntField` are created by default in Temporal's [Docker Compose](https://github.com/temporalio/docker-compose).
- [Custom Search Attributes](/search-attribute#custom-search-attribute) can contain their own domain-specific data (like `customerId` or `numItems`).

The steps to using custom Search Attributes are:

Expand Down
2 changes: 0 additions & 2 deletions docs/develop/go/temporal-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ variables or a configuration file, and then override specific options in code.

{/* SNIPSTART samples-apps-go-yourapp-gateway {"selectedLines": ["1-23", "32"]} */}
[sample-apps/go/yourapp/gateway/main.go](https://github.com/temporalio/documentation/blob/main/sample-apps/go/yourapp/gateway/main.go)

```go
package main

Expand Down Expand Up @@ -235,7 +234,6 @@ func main() {
// ...
}
```

{/* SNIPEND */}

</TabItem>
Expand Down
3 changes: 1 addition & 2 deletions docs/develop/java/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ However, sometimes you'll want to retrieve one or more Workflow Executions based
You can do this with [Search Attributes](/search-attribute).

- [Default Search Attributes](/search-attribute#default-search-attribute) like `WorkflowType`, `StartTime` and `ExecutionStatus` are automatically added to Workflow Executions.
- _Custom Search Attributes_ can contain their own domain-specific data (like `customerId` or `numItems`).
- A few [generic Custom Search Attributes](/search-attribute#custom-search-attribute) like `CustomKeywordField` and `CustomIntField` are created by default in Temporal's [Docker Compose](https://github.com/temporalio/docker-compose).
- [Custom Search Attributes](/search-attribute#custom-search-attribute) can contain their own domain-specific data (like `customerId` or `numItems`).

The steps to using custom Search Attributes are:

Expand Down
12 changes: 0 additions & 12 deletions docs/develop/java/temporal-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ Use the `newLocalServiceStubs` method to create a stub that points to the Tempor
to create a Temporal Client.

<!--SNIPSTART javasdk-build-caller-app-using-local-client {"selectedLines": ["11-17"], "highlightedLines": ["3","7"]}-->

[sample-apps/java/client/devserver-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/devserver-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java {3,7}
// ...
// Create an instance that connects to a Temporal Service running on the local
Expand All @@ -71,7 +69,6 @@ to create a Temporal Client.
// This application uses the Client to communicate with the local Temporal Service
WorkflowClient client = WorkflowClient.newInstance(serviceStub);
```

<!--SNIPEND-->

When you create a new Client with an instance of `newLocalServiceStubs`, the Client connects to the default local port
Expand Down Expand Up @@ -273,9 +270,7 @@ code. This is convenient for local development and testing. You can also load a
variables or a configuration file, and then override specific options in code.

<!--SNIPSTART javasdk-build-caller-app-using-local-client-custom-namespace {"selectedLines": ["23-31"]}-->

[sample-apps/java/client/devserver-namespace-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/devserver-namespace-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java
// ...
// Add the Namespace as a Client Option
Expand All @@ -288,7 +283,6 @@ variables or a configuration file, and then override specific options in code.
// This application uses the Client to communicate with the Temporal Service
WorkflowClient client = WorkflowClient.newInstance(service, clientOptions);
```

<!--SNIPEND-->

</TabItem>
Expand Down Expand Up @@ -552,9 +546,7 @@ When you use a remote service, you don't use the `newLocalServicesStubs` conveni
connection details as stub configuration options:

<!--SNIPSTART javasdk-build-caller-app-using-temporal-cloud {"selectedLines": ["46-54"]}-->

[sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java
// ...
// Set the Service Stub options (SSL context and gRPC endpoint)
Expand All @@ -567,7 +559,6 @@ connection details as stub configuration options:
// Create a stub that accesses a Temporal Service
WorkflowServiceStubs serviceStub = WorkflowServiceStubs.newServiceStubs(stubsOptions);
```

<!--SNIPEND-->

Each Temporal Cloud service Client has four prerequisites.
Expand All @@ -584,9 +575,7 @@ information configures a service stub for Temporal Cloud. Add the Namespace to y
the new Client:

<!--SNIPSTART javasdk-build-caller-app-using-temporal-cloud {"selectedLines": ["41-64"]}-->

[sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java
// ...
// Generate an SSL context
Expand Down Expand Up @@ -614,7 +603,6 @@ the new Client:
// This application uses the Client to communicate with the Temporal Service
WorkflowClient client = WorkflowClient.newInstance(serviceStub, clientOptions);
```

<!--SNIPEND-->

</TabItem>
Expand Down
3 changes: 1 addition & 2 deletions docs/develop/php/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ However, sometimes you'll want to retrieve one or more Workflow Executions based
You can do this with [Search Attributes](/search-attribute).

- [Default Search Attributes](/search-attribute#default-search-attribute) like `WorkflowType`, `StartTime` and `ExecutionStatus` are automatically added to Workflow Executions.
- _Custom Search Attributes_ can contain their own domain-specific data (like `customerId` or `numItems`).
- A few [generic Custom Search Attributes](/search-attribute#custom-search-attribute) like `CustomKeywordField` and `CustomIntField` are created by default in Temporal's [Docker Compose](https://github.com/temporalio/docker-compose).
- [Custom Search Attributes](/search-attribute#custom-search-attribute) can contain their own domain-specific data (like `customerId` or `numItems`).

The steps to using custom Search Attributes are:

Expand Down
2 changes: 1 addition & 1 deletion docs/develop/php/temporal-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ However, it is acceptable and common to use a Temporal Client inside an Activity
:::

When you are running a Temporal Service locally (such as the [Temporal CLI](https://docs.temporal.io/cli/server#start-dev)), the number of connection options you must provide is minimal.
Many SDKs default to the local host or IP address and port that Temporalite and [Docker Compose](https://github.com/temporalio/docker-compose) serve (`127.0.0.1:7233`).
Many SDKs default to `127.0.0.1:7233`.

In the PHP SDK, different client classes are responsible for different functional areas.
The [`ServiceClient`](https://php.temporal.io/classes/Temporal-Client-GRPC-ServiceClient.html) is responsible for the low-level API and connection to the Temporal Service.
Expand Down
3 changes: 1 addition & 2 deletions docs/develop/python/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ However, sometimes you'll want to retrieve one or more Workflow Executions based
You can do this with [Search Attributes](/search-attribute).

- [Default Search Attributes](/search-attribute#default-search-attribute) like `WorkflowType`, `StartTime` and `ExecutionStatus` are automatically added to Workflow Executions.
- _Custom Search Attributes_ can contain their own domain-specific data (like `customerId` or `numItems`).
- A few [generic Custom Search Attributes](/search-attribute#custom-search-attribute) like `CustomKeywordField` and `CustomIntField` are created by default in Temporal's [Docker Compose](https://github.com/temporalio/docker-compose).
- [Custom Search Attributes](/search-attribute#custom-search-attribute) can contain their own domain-specific data (like `customerId` or `numItems`).

The steps to using custom Search Attributes are:

Expand Down
3 changes: 1 addition & 2 deletions docs/develop/ruby/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ However, sometimes you'll want to retrieve one or more Workflow Executions based
You can do this with [Search Attributes](/search-attribute).

- [Default Search Attributes](/search-attribute#default-search-attribute) like `WorkflowType`, `StartTime` and `ExecutionStatus` are automatically added to Workflow Executions.
- _Custom Search Attributes_ can contain their own domain-specific data (like `customerId` or `numItems`).
- A few [generic Custom Search Attributes](/search-attribute#custom-search-attribute) like `CustomKeywordField` and `CustomIntField` are created by default in Temporal's [Docker Compose](https://github.com/temporalio/docker-compose).
- [Custom Search Attributes](/search-attribute#custom-search-attribute) can contain their own domain-specific data (like `customerId` or `numItems`).

The steps to using custom Search Attributes are:

Expand Down
2 changes: 1 addition & 1 deletion docs/develop/typescript/core-application.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ However, it is acceptable and common to use a Temporal Client inside an Activity
:::

When you are running a Temporal Service locally (such as the [Temporal CLI](https://docs.temporal.io/cli/server#start-dev)), the number of connection options you must provide is minimal.
Many SDKs default to the local host or IP address and port that Temporalite and [Docker Compose](https://github.com/temporalio/docker-compose) serve (`127.0.0.1:7233`).
Many SDKs default to `127.0.0.1:7233`.

Creating a [Connection](https://typescript.temporal.io/api/classes/client.Connection) connects to the Temporal Service, and you can pass the `Connection` instance when creating the [Client](https://typescript.temporal.io/api/classes/client.Client#connection).

Expand Down
3 changes: 0 additions & 3 deletions docs/develop/typescript/integrations/ai-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ For example, if you want to call an external API to get the weather, you would i
from the tool function. The following is an example of an Activity that gets the weather for a given location:

<!--SNIPSTART typescript-vercel-ai-sdk-weather-activity -->

[ai-sdk/src/activities.ts](https://github.com/temporalio/samples-typescript/blob/main/ai-sdk/src/activities.ts)

```ts
export async function getWeather(input: {
location: string;
Expand All @@ -174,7 +172,6 @@ export async function getWeather(input: {
};
}
```

<!--SNIPEND-->

Then in your agent implementation, provide the tool to the model using the `tools` option and instruct the model to use
Expand Down
3 changes: 1 addition & 2 deletions docs/develop/typescript/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ However, sometimes you'll want to retrieve one or more Workflow Executions based
You can do this with [Search Attributes](/search-attribute).

- [Default Search Attributes](/search-attribute#default-search-attribute) like `WorkflowType`, `StartTime` and `ExecutionStatus` are automatically added to Workflow Executions.
- _Custom Search Attributes_ can contain their own domain-specific data (like `customerId` or `numItems`).
- A few [generic Custom Search Attributes](/search-attribute#custom-search-attribute) like `CustomKeywordField` and `CustomIntField` are created by default in Temporal's [Docker Compose](https://github.com/temporalio/docker-compose).
- [Custom Search Attributes](/search-attribute#custom-search-attribute) can contain their own domain-specific data (like `customerId` or `numItems`).

The steps to using custom Search Attributes are:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ These limits might apply specifically to each Workflow Execution and do not pert
:::

- **Identifiers:** By default, the maximum length for identifiers (such as Workflow Id, Workflow Type, and Task Queue name) is 1000 characters.
- This is configurable with the `limit.maxIDLength` dynamic config variable, set to 255 in [this SQL example](https://github.com/temporalio/docker-compose/blob/93d382ef9133e4cde8ce311de5153cd0cc9fbd0c/dynamicconfig/development-sql.yaml#L1-L2).
- This is configurable with the `limit.maxIDLength` dynamic config variable, set to 255 in [this SQL example](https://github.com/temporalio/samples-server/blob/main/compose/dynamicconfig/development-sql.yaml).
- The character format is UTF-8.
- **gRPC:** gRPC has a limit of 4 MB for [each message received](https://github.com/grpc/grpc/blob/v1.36.2/include/grpc/impl/codegen/grpc_types.h#L466).
- **Event batch size:** The `DefaultTransactionSizeLimit` limit is [4 MB](https://github.com/temporalio/temporal/pull/1363).
Expand Down
Loading