Skip to content

Implement planned topic: 0022-opentelemetry-plugins#243

Merged
donald-pinckney merged 17 commits into
mainfrom
draft/0022-opentelemetry-plugins
Jun 5, 2026
Merged

Implement planned topic: 0022-opentelemetry-plugins#243
donald-pinckney merged 17 commits into
mainfrom
draft/0022-opentelemetry-plugins

Conversation

@skill-temporal-developer-updater
Copy link
Copy Markdown
Contributor

@skill-temporal-developer-updater skill-temporal-developer-updater Bot commented Jun 2, 2026

Adds support for Python's OpenTelemetryPlugin. Only does Python for now, because designs are kinda all different between languages. Need to think more about what the approach should be for those.

@skill-temporal-developer-updater skill-temporal-developer-updater Bot requested a review from a team as a code owner June 2, 2026 20:59
donald-pinckney and others added 12 commits June 3, 2026 17:15
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Both observability.md files advertised "tracing" but had no tracing
section and never linked to the OTel integration docs. Add a concise
Distributed Tracing (OpenTelemetry) section to each, surface the
trace/log/metric correlation, and cross-link so the OTel <-> observability
relationship is bidirectional. Deep API stays canonical in
integrations/opentelemetry.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mirror the lean, example-driven style now used in the Python OTel doc:
fold the Public API / Constructor options / Span names tables into inline
comments and prose, compress propagator customization to a one-liner, and
keep the log/metric correlation tie-in. Update the observability.md pointer
so it no longer promises tables that were removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reduce both OTel rows to a purpose-only description, dropping mechanism
detail (plugin names, interceptors, sinks, propagation specifics).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The TypeScript material needs more work, so split it out (now on branch
feat/ts-otel). This leaves PR #243 scoped to the Python OpenTelemetry
integration only: removes the TS integration reference, reverts the TS
observability tracing section, and drops the TS row from the catalog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread references/python/observability.md Outdated
Comment thread references/python/observability.md Outdated
Comment thread references/python/observability.md Outdated
Co-authored-by: Donald Pinckney <donald_pinckney@icloud.com>
@@ -0,0 +1,76 @@
# Temporal OpenTelemetry Integration (Python)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file provides very little value over what is added to observability.md. Consider just deleting it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Decided to cut this file and move it just into observability.md

## Common mistakes

- **Registering the same plugin on both Client and Worker.** Register on the Client only; Workers inherit.
- **Calling `Client.connect` before `opentelemetry.trace.set_tracer_provider(provider)`.** With `OpenTelemetryPlugin`, the workflow interceptor factory raises `ValueError("When using OpenTelemetryPlugin, the global trace provider must be a ReplaySafeTracerProvider. Use init_tracer_provider to create one.")`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"init_tracer_provider" is actually a bug in the error message. It got renamed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

- **Registering the same plugin on both Client and Worker.** Register on the Client only; Workers inherit.
- **Calling `Client.connect` before `opentelemetry.trace.set_tracer_provider(provider)`.** With `OpenTelemetryPlugin`, the workflow interceptor factory raises `ValueError("When using OpenTelemetryPlugin, the global trace provider must be a ReplaySafeTracerProvider. Use init_tracer_provider to create one.")`.
- **Building a plain `opentelemetry.sdk.trace.TracerProvider` and passing it to `set_tracer_provider`.** `OpenTelemetryPlugin` requires `ReplaySafeTracerProvider` — build it via `create_tracer_provider(...)`.
- **Adding `with_passthrough_modules("opentelemetry")` to a `SandboxedWorkflowRunner` manually.** The plugin already does this.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Doesn't hurt though, so not sure it qualifies as a common mistake.

Comment thread references/python/integrations/opentelemetry.md Outdated
Comment thread references/python/integrations/opentelemetry.md Outdated
donald-pinckney and others added 2 commits June 5, 2026 16:31
Remove the standalone references/python/integrations/opentelemetry.md file
and fold its unique content (Common mistakes, workflow custom-span example)
into the Distributed Tracing section of observability.md. Repoint the
integrations catalog row at the observability section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@donald-pinckney donald-pinckney merged commit 3973e73 into main Jun 5, 2026
3 checks passed
@donald-pinckney donald-pinckney deleted the draft/0022-opentelemetry-plugins branch June 5, 2026 20:41
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.

2 participants