Skip to content

feat: report PHP SDK identity in worker heartbeats via sdk-go SdkName option - #791

Draft
xepozz wants to merge 1 commit into
masterfrom
feature/heartbeat-sdk-name-option
Draft

feat: report PHP SDK identity in worker heartbeats via sdk-go SdkName option#791
xepozz wants to merge 1 commit into
masterfrom
feature/heartbeat-sdk-name-option

Conversation

@xepozz

@xepozz xepozz commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Report the PHP SDK in worker heartbeats by setting the new ClientOptions.SdkName/SdkVersion (added in go-sdk), instead of rewriting the heartbeat body in a gRPC interceptor.

Depends on a go.temporal.io/sdk release that exposes those options:
temporalio/sdk-go@main...xepozz:temporal-sdk-go:feature/worker-heartbeat-sdk-name-override

Until that lands, go.mod is intentionally not bumped, so CI stays red.

Wait temporalio/sdk-go#2511 to be merged

@xepozz
xepozz requested a review from rustatian as a code owner July 31, 2026 13:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5c214d643

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal.go Outdated
Comment on lines +172 to +174
case heartbeatInterval > 0 && heartbeatInterval < time.Second:
p.log.Warn("worker_heartbeat_interval below 1s, using 1s", zap.Duration("configured", heartbeatInterval))
heartbeatInterval = time.Second

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document or clamp negative heartbeat intervals

When worker_heartbeat_interval is negative (for example, a mistyped -1s), the first clamp condition skips it and passes the value directly to sdk-go, where a negative interval disables worker heartbeats. This contradicts the new schema promise that values below 1s are clamped with a warning and can silently remove worker observability; either clamp all negative values too or explicitly document and validate the negative disable sentinel.

Useful? React with 👍 / 👎.

@xepozz
xepozz force-pushed the feature/heartbeat-sdk-name-option branch from d5c214d to 3aadd2b Compare July 31, 2026 14:05
Set ClientOptions.SdkName/SdkVersion (new in go-sdk) so worker heartbeats report
temporal-php. Requires a go.temporal.io/sdk release that adds the option.

Signed-off-by: Dmitriy Derepko <xepozz@list.ru>
@xepozz
xepozz force-pushed the feature/heartbeat-sdk-name-option branch from 3aadd2b to 4b8555d Compare July 31, 2026 14:09
@xepozz xepozz changed the title feat: report PHP SDK identity via sdk-go SdkName option (instead of interceptor) feat: report PHP SDK identity in worker heartbeats via sdk-go SdkName option Jul 31, 2026
@xepozz
xepozz marked this pull request as draft July 31, 2026 14:11
@xepozz
xepozz marked this pull request as ready for review July 31, 2026 15:28
@xepozz
xepozz marked this pull request as draft July 31, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant