Skip to content

Commit

Permalink
Update SDK (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz authored Jan 6, 2023
1 parent 614fe66 commit af94df0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 89 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

This is the set of Python samples for the [Python SDK](https://github.com/temporalio/sdk-python).

**UNDER DEVELOPMENT**

The Python SDK is under development. There are no compatibility guarantees nor proper documentation pages at this time.

## Usage

Prerequisites:
Expand Down
15 changes: 2 additions & 13 deletions open_telemetry/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from temporalio import activity, workflow
from temporalio.bridge.runtime import (
MetricsConfig,
OpenTelemetryConfig,
Runtime,
TelemetryConfig,
)
from temporalio.client import Client
from temporalio.contrib.opentelemetry import TracingInterceptor
from temporalio.runtime import OpenTelemetryConfig, Runtime, TelemetryConfig
from temporalio.worker import Worker


Expand Down Expand Up @@ -49,13 +44,7 @@ def init_runtime_with_telemetry() -> Runtime:
# Setup SDK metrics to OTel endpoint
return Runtime(
telemetry=TelemetryConfig(
# TODO(cretz): Remove type ignore when
# https://github.com/temporalio/sdk-python/issues/198 fixed
metrics=MetricsConfig( # type: ignore
opentelemetry=OpenTelemetryConfig(
url="http://localhost:4317", headers={}
)
)
metrics=OpenTelemetryConfig(url="http://localhost:4317")
)
)

Expand Down
81 changes: 10 additions & 71 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ packages = [

[tool.poetry.dependencies]
python = "^3.7"
temporalio = "^0.1b4"
temporalio = "^1.0.0"

[tool.poetry.dev-dependencies]
black = "^22.3.0"
Expand Down

0 comments on commit af94df0

Please sign in to comment.