From 3883e0a284c14421ba36012e45bd9e9184d88475 Mon Sep 17 00:00:00 2001 From: alrex Date: Mon, 20 Jan 2020 09:09:21 -0800 Subject: [PATCH] Updating examples to use tracer_source (#360) Many examples were not updated to use the new named tracers code. Signed-off-by: Alex Boten --- ext/opentelemetry-ext-dbapi/README.rst | 4 ++-- ext/opentelemetry-ext-http-requests/README.rst | 4 ++-- ext/opentelemetry-ext-mysql/README.rst | 4 ++-- ext/opentelemetry-ext-pymongo/README.rst | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/opentelemetry-ext-dbapi/README.rst b/ext/opentelemetry-ext-dbapi/README.rst index 6dc31216039..f3eb9b241c9 100644 --- a/ext/opentelemetry-ext-dbapi/README.rst +++ b/ext/opentelemetry-ext-dbapi/README.rst @@ -11,12 +11,12 @@ Usage .. code:: python import mysql.connector - from opentelemetry.trace import tracer + from opentelemetry.trace import tracer_source from opentelemetry.ext.dbapi import trace_integration # Ex: mysql.connector - trace_integration(tracer(), mysql.connector, "connect", "mysql") + trace_integration(tracer_source(), mysql.connector, "connect", "mysql") References diff --git a/ext/opentelemetry-ext-http-requests/README.rst b/ext/opentelemetry-ext-http-requests/README.rst index 33759f5cece..7b2d4340238 100644 --- a/ext/opentelemetry-ext-http-requests/README.rst +++ b/ext/opentelemetry-ext-http-requests/README.rst @@ -22,9 +22,9 @@ Usage import requests import opentelemetry.ext.http_requests - from opentelemetry.trace import tracer + from opentelemetry.trace import tracer_source - opentelemetry.ext.http_requests.enable(tracer()) + opentelemetry.ext.http_requests.enable(tracer_source()) response = requests.get(url='https://www.example.org/') Limitations diff --git a/ext/opentelemetry-ext-mysql/README.rst b/ext/opentelemetry-ext-mysql/README.rst index e819a637694..e899a980fc8 100644 --- a/ext/opentelemetry-ext-mysql/README.rst +++ b/ext/opentelemetry-ext-mysql/README.rst @@ -12,10 +12,10 @@ Usage .. code:: python import mysql.connector - from opentelemetry.trace import tracer + from opentelemetry.trace import tracer_source from opentelemetry.ext.mysql import trace_integration - trace_integration(tracer()) + trace_integration(tracer_source()) cnx = mysql.connector.connect(database='MySQL_Database') cursor = cnx.cursor() cursor.execute("INSERT INTO test (testField) VALUES (123)" diff --git a/ext/opentelemetry-ext-pymongo/README.rst b/ext/opentelemetry-ext-pymongo/README.rst index 1e8011f4c22..e8a42084be5 100644 --- a/ext/opentelemetry-ext-pymongo/README.rst +++ b/ext/opentelemetry-ext-pymongo/README.rst @@ -12,10 +12,10 @@ Usage .. code:: python from pymongo import MongoClient - from opentelemetry.trace import tracer + from opentelemetry.trace import tracer_source from opentelemetry.trace.ext.pymongo import trace_integration - trace_integration(tracer()) + trace_integration(tracer_source()) client = MongoClient() db = client["MongoDB_Database"] collection = db["MongoDB_Collection"]