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

Adding environment variables for event and link attribute limits #1751

Merged

Conversation

codeboten
Copy link
Contributor

Fixes #1750

Changes

Adding environment variable definitions for span event and link attributes.

@codeboten codeboten requested review from a team June 9, 2021 16:48
spec-compliance-matrix.md Outdated Show resolved Hide resolved
specification/trace/sdk.md Outdated Show resolved Hide resolved
alrex and others added 2 commits June 14, 2021 17:13
@carlosalberto
Copy link
Contributor

@open-telemetry/specs-approvers please review/approve ;)

@tigrannajaryan
Copy link
Member

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?

@codeboten
Copy link
Contributor Author

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.

@iNikem
Copy link
Contributor

iNikem commented Jun 17, 2021

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.

@carlosalberto
Copy link
Contributor

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

@carlosalberto
Copy link
Contributor

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 | |
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

@tigrannajaryan
Copy link
Member

#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?

@tigrannajaryan
Copy link
Member

#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.

@carlosalberto
Copy link
Contributor

@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 ;)

@tigrannajaryan
Copy link
Member

@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.

@carlosalberto carlosalberto merged commit 7fc2873 into open-telemetry:main Jun 25, 2021
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Span link and event count limits should have corresponding environment variables
7 participants