Skip to content

Commit 5edaa76

Browse files
committed
Improve SQLite3 example
1 parent ecf5529 commit 5edaa76

File tree

1 file changed

+2
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3

1 file changed

+2
-1
lines changed

instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
3030
SQLite3Instrumentor().instrument()
3131
32-
cnx = sqlite3.connect('example.db')
32+
cnx = sqlite3.connect(':memory:')
3333
cursor = cnx.cursor()
34+
cursor.execute("CREATE TABLE test (testField INTEGER)")
3435
cursor.execute("INSERT INTO test (testField) VALUES (123)")
3536
cursor.close()
3637
cnx.close()

0 commit comments

Comments
 (0)