Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evolve observability documentation #797

Merged
merged 6 commits into from
Mar 26, 2025

Conversation

dandavison
Copy link
Contributor

@dandavison dandavison commented Mar 25, 2025

WISOTT

@dandavison dandavison requested a review from a team as a code owner March 25, 2025 16:23
README.md Outdated
Comment on lines 1354 to 1356
The SDK emits various metrics by default: see https://docs.temporal.io/references/sdk-metrics. By default, these are
emitted with attributes `namespace`, `task_queue`, `workflow_type` / `activity_type`, and
`service_name=temporal-core-sdk`. To emit additional attributes with all metrics, pass
Copy link
Member

Choose a reason for hiding this comment

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

This is not accurate. We emit lots of client side metrics, worker metrics, etc that don't have some (or all) of these attributes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, deleted

README.md Outdated
The attributes emitted by these default to `namespace`, `task_queue`, and `workflow_type`/`activity_type`; use
`with_additional_attributes` to create a meter emitting additional attributes.

#### Tracing
Copy link
Member

Choose a reason for hiding this comment

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

Can we call this "OpenTelemetry Tracing" both for discoverability and so users don't get confused and think we have general purpose or multi-vendor tracing (like some SDKs do)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@dandavison dandavison requested a review from cretz March 25, 2025 16:35
- [OpenTelemetry Support](#opentelemetry-support)
- [Observability](#observability)
Copy link
Member

Choose a reason for hiding this comment

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

May need to run npx doctoc README.md, unsure

@dandavison dandavison enabled auto-merge (squash) March 25, 2025 18:57
For emitting custom metrics, the SDK makes a metric meter available:
- In Workflow code, use https://python.temporal.io/temporalio.workflow.html#metric_meter
- In Activity code, use https://python.temporal.io/temporalio.activity.html#metric_meter
- In normal application code, use https://python.temporal.io/temporalio.runtime.Runtime.html#metric_meter
Copy link
Contributor

Choose a reason for hiding this comment

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

a bit confused, where does normal application code exist if not in a workflow or activity?

Copy link
Member

@cretz cretz Mar 26, 2025

Choose a reason for hiding this comment

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

Where they use the client in non-activity situations, e.g. a client interceptor or anywhere they use the client (but really they probably should use their favorite metrics client/system instead of using Temporal's, but meh)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The way I describe it to people is that a codebase using Temporal has 3 distinct categories of code that involve Temporal: workflow code, activity code, and "normal application code" that is using a Temporal client to start and interact with workflows, issue other queries, create schedules etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks both, helpful :)

@dandavison dandavison merged commit b0dfaef into temporalio:main Mar 26, 2025
13 checks passed
@dandavison dandavison deleted the readme-metrics branch March 26, 2025 22:20
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.

3 participants