Give feedback on the docs: docs.temporal.io and learn.temporal.io
The code sample of the section:
@Override
public void sayHello(String name) {
int count = 0;
while (!"Bye".equals(greeting)) {
String oldGreeting = greeting;
Workflow.await(() -> !Objects.equals(greeting, oldGreeting));
}
workflowLogger.info(++count + ": " + greeting + " " + name + "!");
}
should probably look like
@Override
public void sayHello(String name) {
int count = 0;
while (!"Bye".equals(greeting)) {
String oldGreeting = greeting;
Workflow.await(() -> !Objects.equals(greeting, oldGreeting));
workflowLogger.info(++count + ": " + greeting + " " + name + "!");
}
}
The workflow stub variable name is inconsistent between the two lines here:
WorkflowStub workflowStub = client.newUntypedWorkflowStub(workflowType, workflowOptions);
// Returns the result after waiting for the Workflow to complete.
String result = untyped.getResult(String.class);
The code sample of this section:
client.Options{
MetricsHandler: sdktally.NewMetricsHandler(newPrometheusScope(prometheus.Configuration{
ListenAddress: "0.0.0.0:9090",
TimerType: "histogram",
}
would better to be like:
client.Options{
MetricsHandler: sdktally.NewMetricsHandler(newPrometheusScope(prometheus.Configuration{
ListenAddress: "0.0.0.0:9090",
TimerType: "histogram",
})),
// Other options ...
}
the code sample of this section would de be better like:
import (
"context"
"time"
"go.temporal.io/sdk/activity"
"go.temporal.io/sdk/workflow"
)
// Workflow is a standard workflow definition.
// Note that the Workflow and Activity don't need to care that
// their inputs/results are being compressed.
func Workflow(ctx workflow.Context, name string) (string, error) {
// ...
workflow.WithActivityOptions(ctx, ao)
// Getting the logger from the context.
logger := workflow.GetLogger(ctx)
// Logging a message with the key value pair `name` and `name`
logger.Info("Compressed Payloads workflow started", "name", name)
result := map[string]string{
"name": name,
}
logger.Info("Compressed Payloads workflow completed.", "result", result)
return result, nil
}
into smaller smaller chunks
Hello Temporal team! I wanted to share some feedback on the onboarding documentation for setting up a local Temporal cluster and running a first workflow in Go. I performed a cognitive walkthrough from a novice developer’s perspective and noticed a few areas for improvement.
The instructions for installing Go were clear and straightforward. However, creating a new Go project with the Temporal SDK could benefit from explanations for each CLI command to provide better context for beginners. While running a HelloWorld workflow was intuitive, the detailed code explanations might overwhelm beginners with information that may be beyond their scope.
Could you let me know how I might contribute specific documentation changes? Thanks in advance!