opentelemetry-instrumentation 0.42b0__tar.gz → 0.43b0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/PKG-INFO +1 -1
  2. opentelemetry_instrumentation-0.43b0/src/opentelemetry/instrumentation/_semconv.py +217 -0
  3. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/bootstrap.py +7 -10
  4. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/bootstrap_gen.py +93 -93
  5. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/instrumentor.py +6 -0
  6. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/version.py +1 -1
  7. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/test_bootstrap.py +1 -1
  8. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/.gitignore +0 -0
  9. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/LICENSE +0 -0
  10. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/README.rst +0 -0
  11. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/pyproject.toml +0 -0
  12. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/auto_instrumentation/__init__.py +0 -0
  13. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/auto_instrumentation/_load.py +0 -0
  14. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py +0 -0
  15. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/dependencies.py +0 -0
  16. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/distro.py +0 -0
  17. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/environment_variables.py +0 -0
  18. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/propagators.py +0 -0
  19. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/py.typed +0 -0
  20. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/sqlcommenter_utils.py +0 -0
  21. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/src/opentelemetry/instrumentation/utils.py +0 -0
  22. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/__init__.py +0 -0
  23. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/auto_instrumentation/test_load.py +0 -0
  24. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/auto_instrumentation/test_run.py +0 -0
  25. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/test_dependencies.py +0 -0
  26. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/test_distro.py +0 -0
  27. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/test_instrumentor.py +0 -0
  28. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/test_propagators.py +0 -0
  29. {opentelemetry_instrumentation-0.42b0 → opentelemetry_instrumentation-0.43b0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: opentelemetry-instrumentation
3
- Version: 0.42b0
3
+ Version: 0.43b0
4
4
  Summary: Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python
5
5
  Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation
6
6
  Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
@@ -0,0 +1,217 @@
1
+ # Copyright The OpenTelemetry Authors
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import os
16
+ import threading
17
+ from enum import Enum
18
+
19
+ from opentelemetry.semconv.trace import SpanAttributes
20
+
21
+ # TODO: will come through semconv package once updated
22
+ _SPAN_ATTRIBUTES_ERROR_TYPE = "error.type"
23
+ _SPAN_ATTRIBUTES_NETWORK_PEER_ADDRESS = "network.peer.address"
24
+ _SPAN_ATTRIBUTES_NETWORK_PEER_PORT = "network.peer.port"
25
+ _METRIC_ATTRIBUTES_CLIENT_DURATION_NAME = "http.client.request.duration"
26
+
27
+ _client_duration_attrs_old = [
28
+ SpanAttributes.HTTP_STATUS_CODE,
29
+ SpanAttributes.HTTP_HOST,
30
+ SpanAttributes.NET_PEER_PORT,
31
+ SpanAttributes.NET_PEER_NAME,
32
+ SpanAttributes.HTTP_METHOD,
33
+ SpanAttributes.HTTP_FLAVOR,
34
+ SpanAttributes.HTTP_SCHEME,
35
+ ]
36
+
37
+ _client_duration_attrs_new = [
38
+ _SPAN_ATTRIBUTES_ERROR_TYPE,
39
+ SpanAttributes.HTTP_REQUEST_METHOD,
40
+ SpanAttributes.HTTP_RESPONSE_STATUS_CODE,
41
+ SpanAttributes.NETWORK_PROTOCOL_VERSION,
42
+ SpanAttributes.SERVER_ADDRESS,
43
+ SpanAttributes.SERVER_PORT,
44
+ # TODO: Support opt-in for scheme in new semconv
45
+ # SpanAttributes.URL_SCHEME,
46
+ ]
47
+
48
+
49
+ def _filter_duration_attrs(attrs, sem_conv_opt_in_mode):
50
+ filtered_attrs = {}
51
+ allowed_attributes = (
52
+ _client_duration_attrs_new
53
+ if sem_conv_opt_in_mode == _OpenTelemetryStabilityMode.HTTP
54
+ else _client_duration_attrs_old
55
+ )
56
+ for key, val in attrs.items():
57
+ if key in allowed_attributes:
58
+ filtered_attrs[key] = val
59
+ return filtered_attrs
60
+
61
+
62
+ def set_string_attribute(result, key, value):
63
+ if value:
64
+ result[key] = value
65
+
66
+
67
+ def set_int_attribute(result, key, value):
68
+ if value:
69
+ try:
70
+ result[key] = int(value)
71
+ except ValueError:
72
+ return
73
+
74
+
75
+ def _set_http_method(result, original, normalized, sem_conv_opt_in_mode):
76
+ original = original.strip()
77
+ normalized = normalized.strip()
78
+ # See https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md#common-attributes
79
+ # Method is case sensitive. "http.request.method_original" should not be sanitized or automatically capitalized.
80
+ if original != normalized and _report_new(sem_conv_opt_in_mode):
81
+ set_string_attribute(
82
+ result, SpanAttributes.HTTP_REQUEST_METHOD_ORIGINAL, original
83
+ )
84
+
85
+ if _report_old(sem_conv_opt_in_mode):
86
+ set_string_attribute(result, SpanAttributes.HTTP_METHOD, normalized)
87
+ if _report_new(sem_conv_opt_in_mode):
88
+ set_string_attribute(
89
+ result, SpanAttributes.HTTP_REQUEST_METHOD, normalized
90
+ )
91
+
92
+
93
+ def _set_http_url(result, url, sem_conv_opt_in_mode):
94
+ if _report_old(sem_conv_opt_in_mode):
95
+ set_string_attribute(result, SpanAttributes.HTTP_URL, url)
96
+ if _report_new(sem_conv_opt_in_mode):
97
+ set_string_attribute(result, SpanAttributes.URL_FULL, url)
98
+
99
+
100
+ def _set_http_scheme(result, scheme, sem_conv_opt_in_mode):
101
+ if _report_old(sem_conv_opt_in_mode):
102
+ set_string_attribute(result, SpanAttributes.HTTP_SCHEME, scheme)
103
+ # TODO: Support opt-in for scheme in new semconv
104
+ # if _report_new(sem_conv_opt_in_mode):
105
+ # set_string_attribute(result, SpanAttributes.URL_SCHEME, scheme)
106
+
107
+
108
+ def _set_http_hostname(result, hostname, sem_conv_opt_in_mode):
109
+ if _report_old(sem_conv_opt_in_mode):
110
+ set_string_attribute(result, SpanAttributes.HTTP_HOST, hostname)
111
+ if _report_new(sem_conv_opt_in_mode):
112
+ set_string_attribute(result, SpanAttributes.SERVER_ADDRESS, hostname)
113
+
114
+
115
+ def _set_http_net_peer_name(result, peer_name, sem_conv_opt_in_mode):
116
+ if _report_old(sem_conv_opt_in_mode):
117
+ set_string_attribute(result, SpanAttributes.NET_PEER_NAME, peer_name)
118
+ if _report_new(sem_conv_opt_in_mode):
119
+ set_string_attribute(result, SpanAttributes.SERVER_ADDRESS, peer_name)
120
+
121
+
122
+ def _set_http_port(result, port, sem_conv_opt_in_mode):
123
+ if _report_old(sem_conv_opt_in_mode):
124
+ set_int_attribute(result, SpanAttributes.NET_PEER_PORT, port)
125
+ if _report_new(sem_conv_opt_in_mode):
126
+ set_int_attribute(result, SpanAttributes.SERVER_PORT, port)
127
+
128
+
129
+ def _set_http_status_code(result, code, sem_conv_opt_in_mode):
130
+ if _report_old(sem_conv_opt_in_mode):
131
+ set_int_attribute(result, SpanAttributes.HTTP_STATUS_CODE, code)
132
+ if _report_new(sem_conv_opt_in_mode):
133
+ set_int_attribute(
134
+ result, SpanAttributes.HTTP_RESPONSE_STATUS_CODE, code
135
+ )
136
+
137
+
138
+ def _set_http_network_protocol_version(result, version, sem_conv_opt_in_mode):
139
+ if _report_old(sem_conv_opt_in_mode):
140
+ set_string_attribute(result, SpanAttributes.HTTP_FLAVOR, version)
141
+ if _report_new(sem_conv_opt_in_mode):
142
+ set_string_attribute(
143
+ result, SpanAttributes.NETWORK_PROTOCOL_VERSION, version
144
+ )
145
+
146
+
147
+ _OTEL_SEMCONV_STABILITY_OPT_IN_KEY = "OTEL_SEMCONV_STABILITY_OPT_IN"
148
+
149
+
150
+ class _OpenTelemetryStabilitySignalType:
151
+ HTTP = "http"
152
+
153
+
154
+ class _OpenTelemetryStabilityMode(Enum):
155
+ # http - emit the new, stable HTTP and networking conventions ONLY
156
+ HTTP = "http"
157
+ # http/dup - emit both the old and the stable HTTP and networking conventions
158
+ HTTP_DUP = "http/dup"
159
+ # default - continue emitting old experimental HTTP and networking conventions
160
+ DEFAULT = "default"
161
+
162
+
163
+ def _report_new(mode):
164
+ return mode.name != _OpenTelemetryStabilityMode.DEFAULT.name
165
+
166
+
167
+ def _report_old(mode):
168
+ return mode.name != _OpenTelemetryStabilityMode.HTTP.name
169
+
170
+
171
+ class _OpenTelemetrySemanticConventionStability:
172
+ _initialized = False
173
+ _lock = threading.Lock()
174
+ _OTEL_SEMCONV_STABILITY_SIGNAL_MAPPING = {}
175
+
176
+ @classmethod
177
+ def _initialize(cls):
178
+ with _OpenTelemetrySemanticConventionStability._lock:
179
+ if not _OpenTelemetrySemanticConventionStability._initialized:
180
+ # Users can pass in comma delimited string for opt-in options
181
+ # Only values for http stability are supported for now
182
+ opt_in = os.environ.get(_OTEL_SEMCONV_STABILITY_OPT_IN_KEY, "")
183
+ opt_in_list = []
184
+ if opt_in:
185
+ opt_in_list = [s.strip() for s in opt_in.split(",")]
186
+ http_opt_in = _OpenTelemetryStabilityMode.DEFAULT
187
+ if opt_in_list:
188
+ # Process http opt-in
189
+ # http/dup takes priority over http
190
+ if (
191
+ _OpenTelemetryStabilityMode.HTTP_DUP.value
192
+ in opt_in_list
193
+ ):
194
+ http_opt_in = _OpenTelemetryStabilityMode.HTTP_DUP
195
+ elif _OpenTelemetryStabilityMode.HTTP.value in opt_in_list:
196
+ http_opt_in = _OpenTelemetryStabilityMode.HTTP
197
+ _OpenTelemetrySemanticConventionStability._OTEL_SEMCONV_STABILITY_SIGNAL_MAPPING[
198
+ _OpenTelemetryStabilitySignalType.HTTP
199
+ ] = http_opt_in
200
+ _OpenTelemetrySemanticConventionStability._initialized = True
201
+
202
+ @classmethod
203
+ # Get OpenTelemetry opt-in mode based off of signal type (http, messaging, etc.)
204
+ def _get_opentelemetry_stability_opt_in_mode(
205
+ cls,
206
+ signal_type: _OpenTelemetryStabilitySignalType,
207
+ ) -> _OpenTelemetryStabilityMode:
208
+ return _OpenTelemetrySemanticConventionStability._OTEL_SEMCONV_STABILITY_SIGNAL_MAPPING.get(
209
+ signal_type, _OpenTelemetryStabilityMode.DEFAULT
210
+ )
211
+
212
+
213
+ # Get schema version based off of opt-in mode
214
+ def _get_schema_url(mode: _OpenTelemetryStabilityMode) -> str:
215
+ if mode is _OpenTelemetryStabilityMode.DEFAULT:
216
+ return "https://opentelemetry.io/schemas/1.11.0"
217
+ return SpanAttributes.SCHEMA_URL
@@ -77,7 +77,7 @@ def _pip_check():
77
77
  ) as check_pipe:
78
78
  pip_check = check_pipe.communicate()[0].decode()
79
79
  pip_check_lower = pip_check.lower()
80
- for package_tup in libraries.values():
80
+ for package_tup in libraries:
81
81
  for package in package_tup:
82
82
  if package.lower() in pip_check_lower:
83
83
  raise RuntimeError(f"Dependency conflict found: {pip_check}")
@@ -102,15 +102,12 @@ def _is_installed(req):
102
102
 
103
103
 
104
104
  def _find_installed_libraries():
105
- libs = default_instrumentations[:]
106
- libs.extend(
107
- [
108
- v["instrumentation"]
109
- for _, v in libraries.items()
110
- if _is_installed(v["library"])
111
- ]
112
- )
113
- return libs
105
+ for lib in default_instrumentations:
106
+ yield lib
107
+
108
+ for lib in libraries:
109
+ if _is_installed(lib["library"]):
110
+ yield lib["instrumentation"]
114
111
 
115
112
 
116
113
  def _run_requirements():
@@ -15,181 +15,181 @@
15
15
  # DO NOT EDIT. THIS FILE WAS AUTOGENERATED FROM INSTRUMENTATION PACKAGES.
16
16
  # RUN `python scripts/generate_instrumentation_bootstrap.py` TO REGENERATE.
17
17
 
18
- libraries = {
19
- "aio_pika": {
18
+ libraries = [
19
+ {
20
20
  "library": "aio_pika >= 7.2.0, < 10.0.0",
21
- "instrumentation": "opentelemetry-instrumentation-aio-pika==0.42b0",
21
+ "instrumentation": "opentelemetry-instrumentation-aio-pika==0.43b0",
22
22
  },
23
- "aiohttp": {
23
+ {
24
24
  "library": "aiohttp ~= 3.0",
25
- "instrumentation": "opentelemetry-instrumentation-aiohttp-client==0.42b0",
25
+ "instrumentation": "opentelemetry-instrumentation-aiohttp-client==0.43b0",
26
26
  },
27
- "aiohttp": {
27
+ {
28
28
  "library": "aiohttp ~= 3.0",
29
- "instrumentation": "opentelemetry-instrumentation-aiohttp-server==0.42b0",
29
+ "instrumentation": "opentelemetry-instrumentation-aiohttp-server==0.43b0",
30
30
  },
31
- "aiopg": {
31
+ {
32
32
  "library": "aiopg >= 0.13.0, < 2.0.0",
33
- "instrumentation": "opentelemetry-instrumentation-aiopg==0.42b0",
33
+ "instrumentation": "opentelemetry-instrumentation-aiopg==0.43b0",
34
34
  },
35
- "asgiref": {
35
+ {
36
36
  "library": "asgiref ~= 3.0",
37
- "instrumentation": "opentelemetry-instrumentation-asgi==0.42b0",
37
+ "instrumentation": "opentelemetry-instrumentation-asgi==0.43b0",
38
38
  },
39
- "asyncpg": {
39
+ {
40
40
  "library": "asyncpg >= 0.12.0",
41
- "instrumentation": "opentelemetry-instrumentation-asyncpg==0.42b0",
41
+ "instrumentation": "opentelemetry-instrumentation-asyncpg==0.43b0",
42
42
  },
43
- "boto": {
43
+ {
44
44
  "library": "boto~=2.0",
45
- "instrumentation": "opentelemetry-instrumentation-boto==0.42b0",
45
+ "instrumentation": "opentelemetry-instrumentation-boto==0.43b0",
46
46
  },
47
- "boto3": {
47
+ {
48
48
  "library": "boto3 ~= 1.0",
49
- "instrumentation": "opentelemetry-instrumentation-boto3sqs==0.42b0",
49
+ "instrumentation": "opentelemetry-instrumentation-boto3sqs==0.43b0",
50
50
  },
51
- "botocore": {
51
+ {
52
52
  "library": "botocore ~= 1.0",
53
- "instrumentation": "opentelemetry-instrumentation-botocore==0.42b0",
53
+ "instrumentation": "opentelemetry-instrumentation-botocore==0.43b0",
54
54
  },
55
- "cassandra-driver": {
55
+ {
56
56
  "library": "cassandra-driver ~= 3.25",
57
- "instrumentation": "opentelemetry-instrumentation-cassandra==0.42b0",
57
+ "instrumentation": "opentelemetry-instrumentation-cassandra==0.43b0",
58
58
  },
59
- "scylla-driver": {
59
+ {
60
60
  "library": "scylla-driver ~= 3.25",
61
- "instrumentation": "opentelemetry-instrumentation-cassandra==0.42b0",
61
+ "instrumentation": "opentelemetry-instrumentation-cassandra==0.43b0",
62
62
  },
63
- "celery": {
63
+ {
64
64
  "library": "celery >= 4.0, < 6.0",
65
- "instrumentation": "opentelemetry-instrumentation-celery==0.42b0",
65
+ "instrumentation": "opentelemetry-instrumentation-celery==0.43b0",
66
66
  },
67
- "confluent-kafka": {
67
+ {
68
68
  "library": "confluent-kafka >= 1.8.2, <= 2.2.0",
69
- "instrumentation": "opentelemetry-instrumentation-confluent-kafka==0.42b0",
69
+ "instrumentation": "opentelemetry-instrumentation-confluent-kafka==0.43b0",
70
70
  },
71
- "django": {
71
+ {
72
72
  "library": "django >= 1.10",
73
- "instrumentation": "opentelemetry-instrumentation-django==0.42b0",
73
+ "instrumentation": "opentelemetry-instrumentation-django==0.43b0",
74
74
  },
75
- "elasticsearch": {
75
+ {
76
76
  "library": "elasticsearch >= 2.0",
77
- "instrumentation": "opentelemetry-instrumentation-elasticsearch==0.42b0",
77
+ "instrumentation": "opentelemetry-instrumentation-elasticsearch==0.43b0",
78
78
  },
79
- "falcon": {
80
- "library": "falcon >= 1.4.1, < 4.0.0",
81
- "instrumentation": "opentelemetry-instrumentation-falcon==0.42b0",
79
+ {
80
+ "library": "falcon >= 1.4.1, < 3.1.2",
81
+ "instrumentation": "opentelemetry-instrumentation-falcon==0.43b0",
82
82
  },
83
- "fastapi": {
83
+ {
84
84
  "library": "fastapi ~= 0.58",
85
- "instrumentation": "opentelemetry-instrumentation-fastapi==0.42b0",
85
+ "instrumentation": "opentelemetry-instrumentation-fastapi==0.43b0",
86
86
  },
87
- "flask": {
87
+ {
88
88
  "library": "flask >= 1.0, < 3.0",
89
- "instrumentation": "opentelemetry-instrumentation-flask==0.42b0",
89
+ "instrumentation": "opentelemetry-instrumentation-flask==0.43b0",
90
90
  },
91
- "werkzeug": {
91
+ {
92
92
  "library": "werkzeug < 3.0.0",
93
- "instrumentation": "opentelemetry-instrumentation-flask==0.42b0",
93
+ "instrumentation": "opentelemetry-instrumentation-flask==0.43b0",
94
94
  },
95
- "grpcio": {
95
+ {
96
96
  "library": "grpcio ~= 1.27",
97
- "instrumentation": "opentelemetry-instrumentation-grpc==0.42b0",
97
+ "instrumentation": "opentelemetry-instrumentation-grpc==0.43b0",
98
98
  },
99
- "httpx": {
99
+ {
100
100
  "library": "httpx >= 0.18.0",
101
- "instrumentation": "opentelemetry-instrumentation-httpx==0.42b0",
101
+ "instrumentation": "opentelemetry-instrumentation-httpx==0.43b0",
102
102
  },
103
- "jinja2": {
103
+ {
104
104
  "library": "jinja2 >= 2.7, < 4.0",
105
- "instrumentation": "opentelemetry-instrumentation-jinja2==0.42b0",
105
+ "instrumentation": "opentelemetry-instrumentation-jinja2==0.43b0",
106
106
  },
107
- "kafka-python": {
107
+ {
108
108
  "library": "kafka-python >= 2.0",
109
- "instrumentation": "opentelemetry-instrumentation-kafka-python==0.42b0",
109
+ "instrumentation": "opentelemetry-instrumentation-kafka-python==0.43b0",
110
110
  },
111
- "mysql-connector-python": {
111
+ {
112
112
  "library": "mysql-connector-python ~= 8.0",
113
- "instrumentation": "opentelemetry-instrumentation-mysql==0.42b0",
113
+ "instrumentation": "opentelemetry-instrumentation-mysql==0.43b0",
114
114
  },
115
- "mysqlclient": {
115
+ {
116
116
  "library": "mysqlclient < 3",
117
- "instrumentation": "opentelemetry-instrumentation-mysqlclient==0.42b0",
117
+ "instrumentation": "opentelemetry-instrumentation-mysqlclient==0.43b0",
118
118
  },
119
- "pika": {
119
+ {
120
120
  "library": "pika >= 0.12.0",
121
- "instrumentation": "opentelemetry-instrumentation-pika==0.42b0",
121
+ "instrumentation": "opentelemetry-instrumentation-pika==0.43b0",
122
122
  },
123
- "psycopg2": {
123
+ {
124
124
  "library": "psycopg2 >= 2.7.3.1",
125
- "instrumentation": "opentelemetry-instrumentation-psycopg2==0.42b0",
125
+ "instrumentation": "opentelemetry-instrumentation-psycopg2==0.43b0",
126
126
  },
127
- "pymemcache": {
127
+ {
128
128
  "library": "pymemcache >= 1.3.5, < 5",
129
- "instrumentation": "opentelemetry-instrumentation-pymemcache==0.42b0",
129
+ "instrumentation": "opentelemetry-instrumentation-pymemcache==0.43b0",
130
130
  },
131
- "pymongo": {
131
+ {
132
132
  "library": "pymongo >= 3.1, < 5.0",
133
- "instrumentation": "opentelemetry-instrumentation-pymongo==0.42b0",
133
+ "instrumentation": "opentelemetry-instrumentation-pymongo==0.43b0",
134
134
  },
135
- "PyMySQL": {
135
+ {
136
136
  "library": "PyMySQL < 2",
137
- "instrumentation": "opentelemetry-instrumentation-pymysql==0.42b0",
137
+ "instrumentation": "opentelemetry-instrumentation-pymysql==0.43b0",
138
138
  },
139
- "pyramid": {
139
+ {
140
140
  "library": "pyramid >= 1.7",
141
- "instrumentation": "opentelemetry-instrumentation-pyramid==0.42b0",
141
+ "instrumentation": "opentelemetry-instrumentation-pyramid==0.43b0",
142
142
  },
143
- "redis": {
143
+ {
144
144
  "library": "redis >= 2.6",
145
- "instrumentation": "opentelemetry-instrumentation-redis==0.42b0",
145
+ "instrumentation": "opentelemetry-instrumentation-redis==0.43b0",
146
146
  },
147
- "remoulade": {
147
+ {
148
148
  "library": "remoulade >= 0.50",
149
- "instrumentation": "opentelemetry-instrumentation-remoulade==0.42b0",
149
+ "instrumentation": "opentelemetry-instrumentation-remoulade==0.43b0",
150
150
  },
151
- "requests": {
151
+ {
152
152
  "library": "requests ~= 2.0",
153
- "instrumentation": "opentelemetry-instrumentation-requests==0.42b0",
153
+ "instrumentation": "opentelemetry-instrumentation-requests==0.43b0",
154
154
  },
155
- "scikit-learn": {
155
+ {
156
156
  "library": "scikit-learn ~= 0.24.0",
157
- "instrumentation": "opentelemetry-instrumentation-sklearn==0.42b0",
157
+ "instrumentation": "opentelemetry-instrumentation-sklearn==0.43b0",
158
158
  },
159
- "sqlalchemy": {
159
+ {
160
160
  "library": "sqlalchemy",
161
- "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.42b0",
161
+ "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.43b0",
162
162
  },
163
- "starlette": {
163
+ {
164
164
  "library": "starlette ~= 0.13.0",
165
- "instrumentation": "opentelemetry-instrumentation-starlette==0.42b0",
165
+ "instrumentation": "opentelemetry-instrumentation-starlette==0.43b0",
166
166
  },
167
- "psutil": {
167
+ {
168
168
  "library": "psutil >= 5",
169
- "instrumentation": "opentelemetry-instrumentation-system-metrics==0.42b0",
169
+ "instrumentation": "opentelemetry-instrumentation-system-metrics==0.43b0",
170
170
  },
171
- "tornado": {
171
+ {
172
172
  "library": "tornado >= 5.1.1",
173
- "instrumentation": "opentelemetry-instrumentation-tornado==0.42b0",
173
+ "instrumentation": "opentelemetry-instrumentation-tornado==0.43b0",
174
174
  },
175
- "tortoise-orm": {
175
+ {
176
176
  "library": "tortoise-orm >= 0.17.0",
177
- "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.42b0",
177
+ "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.43b0",
178
178
  },
179
- "pydantic": {
179
+ {
180
180
  "library": "pydantic >= 1.10.2",
181
- "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.42b0",
181
+ "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.43b0",
182
182
  },
183
- "urllib3": {
183
+ {
184
184
  "library": "urllib3 >= 1.0.0, < 3.0.0",
185
- "instrumentation": "opentelemetry-instrumentation-urllib3==0.42b0",
185
+ "instrumentation": "opentelemetry-instrumentation-urllib3==0.43b0",
186
186
  },
187
- }
187
+ ]
188
188
  default_instrumentations = [
189
- "opentelemetry-instrumentation-aws-lambda==0.42b0",
190
- "opentelemetry-instrumentation-dbapi==0.42b0",
191
- "opentelemetry-instrumentation-logging==0.42b0",
192
- "opentelemetry-instrumentation-sqlite3==0.42b0",
193
- "opentelemetry-instrumentation-urllib==0.42b0",
194
- "opentelemetry-instrumentation-wsgi==0.42b0",
189
+ "opentelemetry-instrumentation-aws-lambda==0.43b0",
190
+ "opentelemetry-instrumentation-dbapi==0.43b0",
191
+ "opentelemetry-instrumentation-logging==0.43b0",
192
+ "opentelemetry-instrumentation-sqlite3==0.43b0",
193
+ "opentelemetry-instrumentation-urllib==0.43b0",
194
+ "opentelemetry-instrumentation-wsgi==0.43b0",
195
195
  ]
@@ -21,6 +21,9 @@ from abc import ABC, abstractmethod
21
21
  from logging import getLogger
22
22
  from typing import Collection, Optional
23
23
 
24
+ from opentelemetry.instrumentation._semconv import (
25
+ _OpenTelemetrySemanticConventionStability,
26
+ )
24
27
  from opentelemetry.instrumentation.dependencies import (
25
28
  DependencyConflict,
26
29
  get_dependency_conflicts,
@@ -105,6 +108,9 @@ class BaseInstrumentor(ABC):
105
108
  _LOG.error(conflict)
106
109
  return None
107
110
 
111
+ # initialize semantic conventions opt-in if needed
112
+ _OpenTelemetrySemanticConventionStability._initialize()
113
+
108
114
  result = self._instrument( # pylint: disable=assignment-from-no-return
109
115
  **kwargs
110
116
  )
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "0.42b0"
15
+ __version__ = "0.43b0"
@@ -36,7 +36,7 @@ class TestBootstrap(TestCase):
36
36
  @classmethod
37
37
  def setUpClass(cls):
38
38
  cls.installed_libraries = sample_packages(
39
- [lib["instrumentation"] for lib in libraries.values()], 0.6
39
+ [lib["instrumentation"] for lib in libraries], 0.6
40
40
  )
41
41
 
42
42
  # treat 50% of sampled packages as pre-installed