From 5edaa764d2961d7b060abbb3b0d8e0776af1d025 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Tue, 10 Dec 2024 16:18:27 +0100 Subject: [PATCH] Improve SQLite3 example --- .../src/opentelemetry/instrumentation/sqlite3/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/__init__.py b/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/__init__.py index 1ec4794e96..58a6e291cf 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/__init__.py @@ -29,8 +29,9 @@ SQLite3Instrumentor().instrument() - cnx = sqlite3.connect('example.db') + cnx = sqlite3.connect(':memory:') cursor = cnx.cursor() + cursor.execute("CREATE TABLE test (testField INTEGER)") cursor.execute("INSERT INTO test (testField) VALUES (123)") cursor.close() cnx.close()