-
Notifications
You must be signed in to change notification settings - Fork 893
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
Adding environment variables for event and link attribute limits #1751
Adding environment variables for event and link attribute limits #1751
Conversation
Co-authored-by: Nikita Salnikov-Tarnovski <[email protected]>
@open-telemetry/specs-approvers please review/approve ;) |
Somewhat meta, but I am a bit worried about the proliferation of the env variables. I wonder if this is desirable or we should only have basic capabilities controlled by env variables and the rest requires writing actual code? Taken to the extreme we can start coding the entire SDK behavior in the env variables. Is there a good way to think about what should be an env variable and what shouldn't? |
I agree, it would be great to have guidelines on this. Specifically around this PR, I think there should be equivalent variables for all available limits configuration, otherwise i could imagine this being confusing as a user. Why would some limits be configurable via env variables vs others not. I suspect these will become less important once there's a configuration format available for otel components. |
We cannot forbid language SIGs to provide configuration via environment variables. And as soon as one SDK has them, it is a good idea to standardise them across languages. But then, as @codeboten mentioned, it will be confusing to do that only for a subset of configuration options. |
I agree with @tigrannajaryan's point (hence my initial idea of having a single env var to handle all the attribute limits), but for this case I think it does make sense to add them right now. Hopefully the new Instrumentation group will be able to work out further details like this (as they are part of the configuration area). cc @tedsuo |
Also, unless we have some opposition, let's merge this by early Monday, so allow more time for people to review/approve this. |
| OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT | Maximum allowed span attribute count | 128 | | | ||
| OTEL_SPAN_EVENT_COUNT_LIMIT | Maximum allowed span event count | 128 | | | ||
| OTEL_SPAN_LINK_COUNT_LIMIT | Maximum allowed span link count | 128 | | | ||
| OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT | Maximum allowed attribute per span event count | 128 | | |
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.
Prefix with OTEL_SPAN_
for consistency? Otherwise the name makes it seem like it applies to all events.
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.
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.
Surprising, but okay if it's decided already.
#1130 seems to be a very similar PR for different things to limit. My initial worry stands: there seems to be a proliferation of env variables. Is there a point where this becomes unmanageable? Are we aiming at having full behavior configuration via env variables? Taken to the extreme we need a Turing-complete language and supply programs in env variables that modify the default behavior of SDK. I am not convinced this is the right direction. Perhaps we need to support a config file and have one env variable that points to the config file to use? |
@open-telemetry/technical-committee and @open-telemetry/specs-approvers: I would like your opinion before this PR gets merged. I am not against this particular PR, but would like to understand if we need some best practices around no-code configuration and whether what we do with env variables is acceptable long term. |
@tigrannajaryan we decided during the last SIG call to go ahead with these two aforementioned PRs, while creating #1773 to track the configuration dilemma. Let me know if that works for you ;) |
SGTM. |
Fixes #1750
Changes
Adding environment variable definitions for span event and link attributes.