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

Core v2 protocol support #180

Merged
merged 9 commits into from
Aug 28, 2018
Merged

Core v2 protocol support #180

merged 9 commits into from
Aug 28, 2018

Conversation

axw
Copy link
Member

@axw axw commented Aug 28, 2018

This implements the bulk of the v2 protocol. We still need to move spans to the top level, and some more testing is required around buffer and request sizes.

@axw axw mentioned this pull request Aug 28, 2018
10 tasks
Add a new package, internal/iochan, which provides
a channel-based io.Reader. This is used for streaming
to the transport.
Introduce a new package, internal/ringbuffer, which provides
a cyclic queue for storing blocks of bytes. Each block is
preceded by 4 bytes encoding the block length. If the buffer
lacks capacity for a new block, the oldest blocks are first
evicted.
Implementation of elasticapm.Logger, backed by either
a *testing.T or *testing.B.
Transport now has a single SendStream method, which
starts sending a stream of data to the /v2/intake
endpoint. The body is an io.Reader, and is expected
to be zlib-compressed.
The tracer now streams data, through a zlib compressor,
to an active request. If there is no active request,
entities are encoded to JSON and stored, uncompressed,
in a ring buffer.
@codecov-io
Copy link

Codecov Report

Merging #180 into v2 will increase coverage by 5.42%.
The diff coverage is 85.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##               v2    #180      +/-   ##
=========================================
+ Coverage   75.37%   80.8%   +5.42%     
=========================================
  Files          86      85       -1     
  Lines        5352    5120     -232     
=========================================
+ Hits         4034    4137     +103     
+ Misses       1128     775     -353     
- Partials      190     208      +18
Impacted Files Coverage Δ
apmtest/testlogger.go 0% <0%> (ø)
module/apmgin/middleware.go 66.66% <0%> (ø) ⬆️
error.go 68.78% <100%> (-3.19%) ⬇️
module/apmecho/middleware.go 84.74% <100%> (ø) ⬆️
internal/iochan/reader.go 100% <100%> (ø)
transport/http.go 87.05% <100%> (+4.38%) ⬆️
utils.go 96.15% <100%> (+0.59%) ⬆️
transport/discard.go 100% <100%> (+66.66%) ⬆️
transaction.go 94.87% <100%> (+1.2%) ⬆️
builtin_metrics.go 85.1% <100%> (-0.16%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f4b9d2...6ecbeef. Read the comment docs.

@axw axw merged commit e811034 into elastic:v2 Aug 28, 2018
@axw axw deleted the v2 branch August 28, 2018 07:15
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.

None yet

2 participants