Skip to content

Commit e32aac7

Browse files
Kludexxrmx
andauthored
Improve SQLite3 example (open-telemetry#3083)
Co-authored-by: Riccardo Magliocchetti <[email protected]>
1 parent 7804e0a commit e32aac7

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)