-
Notifications
You must be signed in to change notification settings - Fork 897
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
OTLP Exporter: Make gzip compression the default #1895
Conversation
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@arminru @bogdandrutu can you unmark this as stale? AFAIK this is pending review from OTEL core team. |
gzip compression is possibly pointless in localhost communication (e.g. between Otel SDK and Otel Collector running on localhost) and likely is just a CPU overhead. I did not test for this but this may be a practical use case which disproves the above statement. |
probably, but is the localhost-only setup a prevalent configuration or an edge case that can get by with proactively disabling gzip? |
It is most certainly an edge case; the standard usage is to send OTEL data directly to a third-party service such as DataDog or Lightstep. Even in the case of local collectors, presumably these collectors forward requests to an external host, in which case it would probably still make sense to gzip your requests before they are forwarded. For example, Nginx/Apache will forward gzipped requests "as-is" without decompressing the payload. (Note that gzip applies only to the request body and not to the HTTP headers.) |
AFAIK AWS Lambda is one setup where you typically send to a local collector. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
This is not true for the OpenTelemetry Collector when used as an "agent" (e.g. as a sidecar or daemonset). The collector will decompress, deserialize, process (perhaps including batching), re-serialize, and re-compress before forwarding. In this scenario, compression in the app and decompression in the Collector are almost certainly needless overhead. That said, at Shopify we ended up forwarding "as-is" before abandoning the Collector daemonset altogether. |
@fbogsany there are two questions we should think about here:
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
FWIW AWS encourages the sidecar collector to allow rich resource detection and attributes processing. My impression had been this is the common recommendation among vendors but could be wrong. But up until now when thinking of tradeoffs, my mental model has always considered sidecar to be a large majority. Just an aside that it's always pretty annoying working with OTLP - the tree structure is harder to serialize by needing more state, and parsing with several loops every single time just to get some spans is tedious. It is some builtin in compression in the structs but if gziping anyways, which indeed will probably shrink it even more, then the tedium of the tree structure becomes quite disappointing. |
@tigrannajaryan There are three approvals on this MR and it seems like we’ve gathered all possible information to make a decision. Let’s not lose this to the stale bot. 🙇 |
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's been a spec change since the three approvals to make the variable defaults align with localhost usage
I propose not changing this compression default in light of this, but either way we need to reset the reviews I think.
@anuraaga #2014 was merged without anyone taking a holistic view on whether or not “sidecar” should be the basis for default parameters. We need the OTEL team to make a decision on that and then set appropriate values for default host, scheme, and compression at once. So we should leave this PR open until that decision is made. |
@johnnyshields changes to the specification require a significant level of consensus which I do not see in this thread. Unless the objecting people change their opinion I do not think this PR can be merged. |
@tigrannajaryan well this is considerably frustrating that #2014 was merged with zero concensus, yet this PR is for some reason held up despite having 3 approvals. I was under the impression that OpenTelemetry had governance structures to resolve such design questions. Is there a way we could escalate this issue to the appropriate committee? |
@johnnyshields if you believe the code of conduct was violated please contact the governance committee. If you disagree on the technical merit of the changes and would like a technical design review you can contact the technical committee. See the community repo for more details and Github handles of GC and TC members to contact: https://github.com/open-telemetry/community |
@johnnyshields Usually if there's at least a changes request we don't merge things. And definitely this can be escalated to the TC so we take a second look ;) I'd strongly encourage you to do so. On a more technical note: what's reason to have a If you really want them to use |
@carlosalberto thank you for the reply. The core issue at stake here, which needs to be escalated to the TC, is whether we assume that default mode of trace transmission is a) direct to a third-party server (e.g. how NewRelic, Lightstep, etc. operate) OR b) via a "sidecar", e.g. a collector daemon process presumably running on localhost which then forwards the traces. This has implications for how we set the default values of several parameters mentioned here in the thread The use of SHOULD as opposed to MUST is for the reasons that even if we agree (a) to be the default, certain SIGs may still have a strong reason to go with (b) for platform-specific reasons (or vice-versa) |
I think you are looking for one "true" way to use all SDKs, and I think that simply does not exist. There are different valid ways to use SDKs. I do not see how we can decide on a single blessed approach in this situation. Because of that we delegated the decision to SDK maintainers to make the best decision based on what's more appropriate for the most common scenario for that particular SDK. For example the JS SDK may decide to enable gzip by default (since sending from browser), also mobile builds of SDKs may enable gzip by default, while the rest keep the compression off by default (and assume sending to local Collector) and let the user enable gzip if needed. I understand that this may not be the ideal outcome your are looking for, but it is probably the best we can do at the moment. If you want further opinion from TC on this I can add it to the next TC meeting agenda. |
@tigrannajaryan, yes, I as noted I am looking for a "SHOULD", not a "MUST". |
@tigrannajaryan The current wording still allows SIG-initiated overrides. I see the value in this PR going in because it centrally resolves the question that otherwise every SIG needs to address while having no more data than we have now. Yes, when we talk about special cases like browser or mobile SDK, the choice might be more obvious. But for any server-side SDK there's always going to be a choice between local and remote collector. So why do we think that say Python or Java SIG would be able to choose the default any better than we can do centrally? I think by making the choice centrally we make the SIG maintainers' jobs easier. |
would it be horrible for the default to depend on whether the endpoint is |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Keep alive |
The TC has discussed this. I am posting on behalf of the TC:
Therefore the TC believes that:
|
OK. Scratching my head because none of the major commercial platforms (New Relic, Datadog, Lightstep) use a sidecar. I guess Splunk does? Who were the representatives on the TC? |
@johnnyshields just for my curiosity by what measurement did use to determine "major commercial platforms"? https://github.com/open-telemetry/community/blob/main/community-members.md#technical-committee |
My comment was not meant to be an exhaustive list--the 3 I listed are indeed major platforms, among others. Should have written "e.g." |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
I'm going to close this for now because the current language is adequate. I still don't understand the TC's logic given the reality of most commercial platforms 🤷♂️ |
specification/protocol/exporter.md
, makegzip
compression the default.null
as a supported value (currently the only way is to leave the env var blank)AFAIK there is no practical use case where a user would not want to use gzip compression when exporting traces. It greatly reduces network load and data costs.
After approval, this change should be done in all the client libraries.