diff --git a/test-grpc/client-async.py b/test-grpc/client-async.py index 9849c3b..a2802f6 100644 --- a/test-grpc/client-async.py +++ b/test-grpc/client-async.py @@ -6,6 +6,7 @@ import helloworld_pb2_grpc import sentry_sdk +import sentry_sdk.traces from sentry_sdk.integrations.grpc import GRPCIntegration # from sentry_sdk.integrations.grpc.client import ClientInterceptor from sentry_sdk.integrations.grpc.aio.client import ClientInterceptor @@ -28,7 +29,7 @@ async def main(): sentry_sdk.init(**sentry_settings) - with sentry_sdk.start_transaction(op="function", name="grcp_client"): + with sentry_sdk.traces.start_span(name="grcp_client", attributes={"sentry.op": "function"}): print("Will try to greet world ...") async with grpc.aio.insecure_channel(f"localhost:{SERVER_PORT}") as channel: diff --git a/test-grpc/client.py b/test-grpc/client.py index aa6f3f9..f69c7c9 100644 --- a/test-grpc/client.py +++ b/test-grpc/client.py @@ -5,6 +5,7 @@ import helloworld2_pb2_grpc import sentry_sdk +import sentry_sdk.traces from sentry_sdk.integrations.grpc import GRPCIntegration # from sentry_sdk.integrations.grpc.client import ClientInterceptor # from sentry_sdk.integrations.grpc.aio.client import ClientInterceptor @@ -27,7 +28,7 @@ def main(): sentry_sdk.init(**sentry_settings) - with sentry_sdk.start_transaction(op="function", name="grcp_client"): + with sentry_sdk.traces.start_span(name="grcp_client", attributes={"sentry.op": "function"}): print("Will try to greet world ...") with grpc.insecure_channel(f"localhost:{SERVER_PORT}") as channel: diff --git a/test-grpc/main.py b/test-grpc/main.py index e69e8d9..a07f08a 100644 --- a/test-grpc/main.py +++ b/test-grpc/main.py @@ -1,6 +1,7 @@ import os import sentry_sdk +import sentry_sdk.traces from sentry_sdk.integrations.clickhouse_driver import ClickhouseDriverIntegration from clickhouse_driver import Client @@ -19,7 +20,7 @@ def main(): sentry_sdk.init(**sentry_settings) - with sentry_sdk.start_transaction(op="function", name="clickhouse_driver"): + with sentry_sdk.traces.start_span(name="clickhouse_driver", attributes={"sentry.op": "function"}): client = Client(host='localhost', ) client.execute("DROP TABLE IF EXISTS test") client.execute("CREATE TABLE test (x Int32) ENGINE = Memory")