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

Do not merge -- infinite tracing compression and batching #1266

Closed
wants to merge 13 commits into from

Conversation

jtduffy
Copy link
Contributor

@jtduffy jtduffy commented May 12, 2023

Do not merge
Original PR: #1146

Overview

This PR adds support for Infinite Tracing payloads to be both compressed and batched by default. The following changes are included as part of this work:

  • Implements support for compressing infinite tracing payloads
  • gzip compression is enabled by default for batching and non-batching configurations
  • Implements support for batching spans within infinite tracing payloads
  • Defaults for batching are:
    • Batching enabled by default
    • Up to 100 spans bundled per batch
    • Waiting (linger) for up to 5s to fill up the batch before sending

The span data is still streaming over HTTP/2 using gRPC but utilizing compression and batching will significantly reduce payload sizes and bytes over the wire, resulting in significantly lower network transfer costs for customers.

Testing

All new functionality has been covered with unit tests where possible.

Checks

  • Are your contributions backwards compatible with relevant frameworks and APIs?

    • Yes
  • Does your code contain any breaking changes?

    • No (although infinite tracing defaults are changing)
  • Does your code introduce any new dependencies?

    • Only a testImplementation dependency for parameterized tests

obenkenobi and others added 3 commits May 11, 2023 13:55
…ng. Payloads being sent to trace observers will be compressed with `gzip` compression by default and will attempt to send batches of up to 100 spans by default. This replaces the existing default of no compression and no batching. The data is still streaming over HTTP/2 using gRPC but utilizing compression and batching to significantly reduce payload sizes and bytes over the wire, resulting in lower network transfer costs.
…bility metrics to bring implementation in line with agent spec.
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2023

Codecov Report

Merging #1266 (9306b1c) into main (9510e22) will increase coverage by 0.02%.
The diff coverage is 85.36%.

@@             Coverage Diff              @@
##               main    #1266      +/-   ##
============================================
+ Coverage     57.95%   57.98%   +0.02%     
- Complexity     8525     8544      +19     
============================================
  Files           943      945       +2     
  Lines         42264    42335      +71     
  Branches       6150     6157       +7     
============================================
+ Hits          24496    24547      +51     
- Misses        15357    15373      +16     
- Partials       2411     2415       +4     
Impacted Files Coverage Δ
...ng/src/main/java/com/newrelic/InfiniteTracing.java 66.66% <0.00%> (-2.90%) ⬇️
...ing/src/main/java/com/newrelic/ChannelManager.java 61.38% <50.00%> (-2.45%) ⬇️
...ng/src/main/java/com/newrelic/SpanEventSender.java 90.14% <88.57%> (-2.72%) ⬇️
.../main/java/com/newrelic/InfiniteTracingConfig.java 55.55% <100.00%> (+9.60%) ⬆️
.../src/main/java/com/newrelic/SpanBatchObserver.java 100.00% <100.00%> (ø)
...cing/src/main/java/com/newrelic/SpanConverter.java 85.71% <100.00%> (+1.71%) ⬆️
...acing/src/main/java/com/newrelic/SpanObserver.java 100.00% <100.00%> (ø)
...wrelic/agent/config/InfiniteTracingConfigImpl.java 88.00% <100.00%> (+1.04%) ⬆️
...com/newrelic/agent/service/ServiceManagerImpl.java 77.97% <100.00%> (+0.16%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

obenkenobi and others added 10 commits May 12, 2023 11:46
…high-security

NR-106006 fix how user attribute is set in servlet-user from previous PR
…ng. Payloads being sent to trace observers will be compressed with `gzip` compression by default and will attempt to send batches of up to 100 spans by default. This replaces the existing default of no compression and no batching. The data is still streaming over HTTP/2 using gRPC but utilizing compression and batching to significantly reduce payload sizes and bytes over the wire, resulting in lower network transfer costs.
…bility metrics to bring implementation in line with agent spec.
@jtduffy jtduffy closed this May 22, 2023
@jtduffy jtduffy deleted the NR-87880-infinite-tracing branch May 22, 2023 13:29
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.

6 participants