Skip to content
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

SDK should automatically truncate large values #186

Open
NathanielRN opened this issue Nov 16, 2020 · 3 comments
Open

SDK should automatically truncate large values #186

NathanielRN opened this issue Nov 16, 2020 · 3 comments
Labels
feature-request help wanted Extra attention is needed

Comments

@NathanielRN
Copy link
Contributor

There are some cases where instrumentations are individually truncating large byte values such as is used in both the boto and botocore instrumentations.

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.
"""
if isinstance(value, bytes) and len(value) > max_len:
return b"..."
return value

We should have a solution for the OTel SDK to automatically truncate span attribute values which are above some maximum length. This maximum length should be configurable.

This way all instrumentations and exporters can get this truncating behavior for free.

@NathanielRN NathanielRN added the bug Something isn't working label Nov 16, 2020
@github-actions
Copy link

github-actions bot commented Apr 6, 2021

This issue was marked stale due to lack of activity. It will be closed in 30 days.

@owais owais added feature-request help wanted Extra attention is needed and removed bug Something isn't working labels Apr 6, 2021
@owais
Copy link
Contributor

owais commented Apr 6, 2021

Would be nice to have. Splunk distro implements this as well: https://github.com/signalfx/splunk-otel-python#all-configuration-options (SPLUNK_MAX_ATTR_LENGTH)

@github-actions github-actions bot removed the backlog label Apr 7, 2021
@danielgblanco
Copy link

This should be now covered by open-telemetry/opentelemetry-python#2051?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants