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

Allow to configure maximum attribute value size #1478

Closed
iNikem opened this issue Jul 29, 2020 · 3 comments · Fixed by #1484
Closed

Allow to configure maximum attribute value size #1478

iNikem opened this issue Jul 29, 2020 · 3 comments · Fixed by #1484
Labels
Feature Request Suggest an idea for this project release:after-ga

Comments

@iNikem
Copy link
Contributor

iNikem commented Jul 29, 2020

Is your feature request related to a problem? Please describe.
Operators who deploy an application together with SDK can now configure e.g. the maximum number of attributes or events per span. This is done, among other things, to protect the application from excessive memory usage by monitoring SDK. But attribute values can still be arbitrary large.

Describe the solution you'd like
Add one more parameter to TraceConfig to allow for configuration of maximum size of attribute value. Values longer than this given threshold will be truncated.

Describe alternatives you've considered
This may be delegated to Collector, but that is too late to protect application from OOM.

Additional context
Although truncating AttributeValueString is simple (if we put aside the question of byte/chars/codepoint/grapheme), it is unclear how to truncate AttributeValueStringArray.

@anuraaga
Copy link
Contributor

anuraaga commented Jul 30, 2020

Should this be defined in the spec first? For reference, I avoided adding a limit to stack traces since there wasn't a limit in the spec :)

@iNikem
Copy link
Contributor Author

iNikem commented Jul 30, 2020

TraceConfig already allows for configuring max number of events/links on spans and number of attributes. But this is not in spec yet: open-telemetry/opentelemetry-specification#182. So I want to continue this and allow to configure one more thing :) Who say that language cannot provide more configuration that spec dictates? ;)

@anuraaga
Copy link
Contributor

Not me - adding the knob now makes sense too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project release:after-ga
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants