From e32aac7b1824703bad29ac6f358edacfbff06408 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 11 Dec 2024 12:25:01 +0100 Subject: [PATCH] Improve SQLite3 example (#3083) Co-authored-by: Riccardo Magliocchetti --- .../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()