observability

command
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Observability hooks

This sample uses the SDK's standard-library observability surfaces: tags, immutable context fields, slog logging, and retry/history metric hooks. It does not add a telemetry framework or an OpenTelemetry collector; DTS-owned durable spans are covered elsewhere.

Run

export DTS_CONNECTION_STRING='Endpoint=http://127.0.0.1:8080;TaskHub=default;Authentication=None'
go run ./samples/observability

What it proves

  • Root tags are visible in metadata and history.
  • Immutable root context fields are persisted and visible in orchestration context/history. Activity contexts receive fields carried by the activity work item plus worker-local fields; current DTS emulator activity work items expose the worker-local field used here.
  • ctx.Logger() suppresses replayed orchestrator output while activity logging keeps task identity fields.
  • Retry and history metric hooks receive bounded, thread-safe signals without depending on exact batch-turn counts.

SAMPLE_OK observability is printed only after field values, log records, metrics, orchestration output, and exact-ID cleanup are verified.

Documentation

Overview

Command observability demonstrates tags, immutable context fields, logs, and metric hooks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL