@@ -722,6 +722,10 @@ def test_semconv_default_mode(self):
722722 spans = self .memory_exporter .get_finished_spans ()
723723
724724 connect_span = spans [0 ]
725+ self .assertEqual (
726+ connect_span .instrumentation_scope .schema_url ,
727+ "https://opentelemetry.io/schemas/1.11.0" ,
728+ )
725729 self .assertIn (DB_SYSTEM , connect_span .attributes )
726730 self .assertEqual (connect_span .attributes [DB_SYSTEM ], "sqlite" )
727731 self .assertIn (DB_NAME , connect_span .attributes )
@@ -757,6 +761,10 @@ def test_semconv_http_mode(self):
757761 spans = self .memory_exporter .get_finished_spans ()
758762
759763 connect_span = spans [0 ]
764+ self .assertEqual (
765+ connect_span .instrumentation_scope .schema_url ,
766+ "https://opentelemetry.io/schemas/1.21.0" ,
767+ )
760768 # HTTP attributes should use new semconv
761769 self .assertNotIn (NET_PEER_NAME , connect_span .attributes )
762770 # DB attributes should still use old semconv
@@ -792,6 +800,10 @@ def test_semconv_database_mode(self):
792800 spans = self .memory_exporter .get_finished_spans ()
793801
794802 connect_span = spans [0 ]
803+ self .assertEqual (
804+ connect_span .instrumentation_scope .schema_url ,
805+ "https://opentelemetry.io/schemas/1.25.0" ,
806+ )
795807 self .assertIn (DB_SYSTEM_NAME , connect_span .attributes )
796808 self .assertEqual (connect_span .attributes [DB_SYSTEM_NAME ], "sqlite" )
797809 self .assertIn (DB_NAMESPACE , connect_span .attributes )
@@ -829,6 +841,10 @@ def test_semconv_http_and_database_mode(self):
829841 spans = self .memory_exporter .get_finished_spans ()
830842
831843 connect_span = spans [0 ]
844+ self .assertEqual (
845+ connect_span .instrumentation_scope .schema_url ,
846+ "https://opentelemetry.io/schemas/1.25.0" ,
847+ )
832848 # New DB conventions should be present
833849 self .assertIn (DB_SYSTEM_NAME , connect_span .attributes )
834850 self .assertEqual (connect_span .attributes [DB_SYSTEM_NAME ], "sqlite" )
@@ -862,6 +878,10 @@ def test_semconv_http_dup_mode(self):
862878 spans = self .memory_exporter .get_finished_spans ()
863879
864880 connect_span = spans [0 ]
881+ self .assertEqual (
882+ connect_span .instrumentation_scope .schema_url ,
883+ "https://opentelemetry.io/schemas/1.21.0" ,
884+ )
865885 # DB attributes should use old semconv only
866886 self .assertIn (DB_SYSTEM , connect_span .attributes )
867887 self .assertEqual (connect_span .attributes [DB_SYSTEM ], "sqlite" )
@@ -895,6 +915,10 @@ def test_semconv_database_dup_mode(self):
895915 spans = self .memory_exporter .get_finished_spans ()
896916
897917 connect_span = spans [0 ]
918+ self .assertEqual (
919+ connect_span .instrumentation_scope .schema_url ,
920+ "https://opentelemetry.io/schemas/1.25.0" ,
921+ )
898922 # Old conventions
899923 self .assertIn (DB_SYSTEM , connect_span .attributes )
900924 self .assertEqual (connect_span .attributes [DB_SYSTEM ], "sqlite" )
@@ -933,6 +957,10 @@ def test_semconv_http_and_database_dup_mode(self):
933957 spans = self .memory_exporter .get_finished_spans ()
934958
935959 connect_span = spans [0 ]
960+ self .assertEqual (
961+ connect_span .instrumentation_scope .schema_url ,
962+ "https://opentelemetry.io/schemas/1.25.0" ,
963+ )
936964 # Both old and new DB conventions
937965 self .assertIn (DB_SYSTEM , connect_span .attributes )
938966 self .assertEqual (connect_span .attributes [DB_SYSTEM ], "sqlite" )
0 commit comments