Skip to content

Commit 25a6535

Browse files
authored
Instrument newer versions (#1468)
1 parent cfd017e commit 25a6535

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
([#1409](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1409))
3131
- Strip leading comments from SQL queries when generating the span name.
3232
([#1434](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1434))
33+
- `opentelemetry-instrumentation-confluent-kafka` Add support for the latest versions of the library.
34+
([#1468](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1468))
3335

3436
### Fixed
3537

instrumentation/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| [opentelemetry-instrumentation-boto3sqs](./opentelemetry-instrumentation-boto3sqs) | boto3 ~= 1.0 | No
1212
| [opentelemetry-instrumentation-botocore](./opentelemetry-instrumentation-botocore) | botocore ~= 1.0 | No
1313
| [opentelemetry-instrumentation-celery](./opentelemetry-instrumentation-celery) | celery >= 4.0, < 6.0 | No
14-
| [opentelemetry-instrumentation-confluent-kafka](./opentelemetry-instrumentation-confluent-kafka) | confluent-kafka ~= 1.8.2 | No
14+
| [opentelemetry-instrumentation-confluent-kafka](./opentelemetry-instrumentation-confluent-kafka) | confluent-kafka >= 1.8.2, < 2.0.0 | No
1515
| [opentelemetry-instrumentation-dbapi](./opentelemetry-instrumentation-dbapi) | dbapi | No
1616
| [opentelemetry-instrumentation-django](./opentelemetry-instrumentation-django) | django >= 1.10 | Yes
1717
| [opentelemetry-instrumentation-elasticsearch](./opentelemetry-instrumentation-elasticsearch) | elasticsearch >= 2.0 | No

instrumentation/opentelemetry-instrumentation-confluent-kafka/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies = [
3131

3232
[project.optional-dependencies]
3333
instruments = [
34-
"confluent-kafka ~= 1.8.2",
34+
"confluent-kafka >= 1.8.2, < 2.0.0",
3535
]
3636
test = [
3737
"opentelemetry-instrumentation-confluent-kafka[instruments]",

instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414

1515

16-
_instruments = ("confluent-kafka ~= 1.8.2",)
16+
_instruments = ("confluent-kafka >= 1.8.2, < 2.0.0",)

opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"instrumentation": "opentelemetry-instrumentation-celery==0.36b0.dev",
5454
},
5555
"confluent-kafka": {
56-
"library": "confluent-kafka ~= 1.8.2",
56+
"library": "confluent-kafka >= 1.8.2, < 2.0.0",
5757
"instrumentation": "opentelemetry-instrumentation-confluent-kafka==0.36b0.dev",
5858
},
5959
"django": {

tox.ini

+9
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ envlist =
207207
py3{7,8,9,10,11}-test-instrumentation-kafka-python
208208
pypy3-test-instrumentation-kafka-python
209209

210+
; opentelemetry-instrumentation-confluent-kafka
211+
// FIXME: Enable support for python 3.11 when https://github.com/confluentinc/confluent-kafka-python/issues/1452 is fixed
212+
py3{7,8,9,10}-test-instrumentation-confluent-kafka
213+
210214
lint
211215
spellcheck
212216
docker-tests
@@ -284,6 +288,7 @@ changedir =
284288
test-instrumentation-grpc: instrumentation/opentelemetry-instrumentation-grpc/tests
285289
test-instrumentation-jinja2: instrumentation/opentelemetry-instrumentation-jinja2/tests
286290
test-instrumentation-kafka-python: instrumentation/opentelemetry-instrumentation-kafka-python/tests
291+
test-instrumentation-confluent-kafka: instrumentation/opentelemetry-instrumentation-confluent-kafka/tests
287292
test-instrumentation-logging: instrumentation/opentelemetry-instrumentation-logging/tests
288293
test-instrumentation-mysql: instrumentation/opentelemetry-instrumentation-mysql/tests
289294
test-instrumentation-pika{0,1}: instrumentation/opentelemetry-instrumentation-pika/tests
@@ -330,6 +335,8 @@ commands_pre =
330335

331336
kafka-python: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python[test]
332337

338+
confluent-kafka: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka[test]
339+
333340
grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
334341

335342
falcon{1,2,3},flask,django{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,asgi,requests,urllib,urllib3,wsgi: pip install {toxinidir}/util/opentelemetry-util-http[test]
@@ -492,6 +499,7 @@ commands_pre =
492499
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test]
493500
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2[test]
494501
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python[test]
502+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka[test]
495503
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-logging[test]
496504
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test]
497505
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test]
@@ -556,6 +564,7 @@ commands_pre =
556564
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery \
557565
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-pika \
558566
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python \
567+
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka \
559568
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi \
560569
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql \
561570
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2 \

0 commit comments

Comments
 (0)