-
Notifications
You must be signed in to change notification settings - Fork 651
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
Add boto instrumentation #665
Conversation
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 looks pretty good, only change required is the versions in setup.cfg and usage documentation. Looks like an entry in the docs is missing as well.
ext/opentelemetry-ext-boto/src/opentelemetry/ext/boto/__init__.py
Outdated
Show resolved
Hide resolved
span.set_attribute(key, value) | ||
|
||
|
||
def flatten_dict(dict_, sep=".", prefix=""): |
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.
Looks like this code could be pulled out into a utility
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.
Hmm, I don't think this code belongs anywhere outside of this package, but if other related instrumentations use it they could import it from here.
ext/opentelemetry-ext-boto/src/opentelemetry/ext/boto/__init__.py
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-boto/src/opentelemetry/ext/boto/__init__.py
Outdated
Show resolved
Hide resolved
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.
LGTM, thanks for addressing my comments!
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.
LGTM! A couple comments but non-blocking.
ext/opentelemetry-ext-boto/src/opentelemetry/ext/boto/__init__.py
Outdated
Show resolved
Hide resolved
|
||
def truncate_arg_value(value, max_len=1024): | ||
"""Truncate values which are bytes and greater than ``max_len``. | ||
Useful for parameters like "Body" in ``put_object`` operations. |
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.
no need to investigate too deeply on this, but how about strings? is it possible for giant payloads to be sent as strings that should also be truncated?
maybe a json payload? but that's probably binary.
f5237b6
to
61f6847
Compare
This is necessary because moto does not support 3.4 https://pypi.org/project/moto/
Co-authored-by: alrex <[email protected]>
Co-authored-by: alrex <[email protected]>
Co-authored-by: alrex <[email protected]>
Co-authored-by: alrex <[email protected]>
Co-authored-by: alrex <[email protected]>
Co-authored-by: Yusuke Tsutsumi <[email protected]>
* docs: add ioredis example * refactor: simplify example * fix: ioredis example * fix: tracerRegistry not tracer * fix: test only with set command * fix: only use Jaeger as backend Signed-off-by: Naseem <[email protected]> Co-authored-by: Daniel Dyla <[email protected]>
Fixes #628