-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kafka-python instrumentation #814
Conversation
310d8bb
to
79d4b77
Compare
span.set_attribute(SpanAttributes.MESSAGING_DESTINATION, topic) | ||
span.set_attribute(SpanAttributes.MESSAGING_KAFKA_PARTITION, partition) | ||
span.set_attribute( | ||
SpanAttributes.MESSAGING_URL, json.dumps(bootstrap_servers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a plain URL, why json.dumps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boostrap_servers is a list of URLs
.../opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py
Outdated
Show resolved
Hide resolved
.../opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py
Outdated
Show resolved
Hide resolved
...entelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py
Outdated
Show resolved
Hide resolved
...entelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py
Outdated
Show resolved
Hide resolved
.../opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py
Outdated
Show resolved
Hide resolved
.../opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py
Show resolved
Hide resolved
c40fceb
to
0d1d010
Compare
@ItayGibel-helios |
instrumentation/opentelemetry-instrumentation-kafka-python/README.rst
Outdated
Show resolved
Hide resolved
# limitations under the License. | ||
|
||
|
||
_instruments = ("kafka-python >= 2.0",) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, what is the difference between kafka and kafka-python? Will this only instrument kafka-python
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are the same project, but newer versions are released as kafka-python (latest 'kafka' release was in 2017)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious should we rename all instances of kafka
to kafka-python
then? e.g. import path, tox environments, entrypoint, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to keep with the kafka library conventions, where the package name is kafka-python
but you actually use kafka
in the import paths
...entelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py
Show resolved
Hide resolved
.../opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/utils.py
Outdated
Show resolved
Hide resolved
Hi @lzchen |
…DME.rst Co-authored-by: Leighton Chen <[email protected]>
* Making span as internal in presence of a span in current context * Updating changelog * Removing extra print statements * Resolving comments: Setting current context as parent in its presence * Ignoring pylint check as django.conf.urls.url is removed in django 4.0 Django release notes: https://docs.djangoproject.com/en/4.0/releases/4.0/ * Removing changes in django files
4059c59
to
63acbdb
Compare
0486a98
to
6d551ae
Compare
Co-authored-by: Leighton Chen <[email protected]>
@lzchen @nikosokolik This PR can be merged now, is there any pending comment yet? |
@oxeye-nikolay @ItayGibel-helios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is @oxeye-nikolay. Using this account to approve instead.
From this comment #814 (comment)
Description
added kafka-python module instrumentation
Type of change
How Has This Been Tested?
Added the following unit-tests:
Does This PR Require a Core Repo Change?
Checklist: