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

apmpackage: add unit for decoded_body_size #9742

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Conversation

axw
Copy link
Member

@axw axw commented Dec 6, 2022

Motivation/summary

Add unit: byte to http.response.decoded_body_size. Found to be missing in #9429 (comment)

Checklist

- [ ] Update CHANGELOG.asciidoc
- [ ] Update package changelog.yml (only if changes to apmpackage have been made)
- [ ] Documentation has been updated

How to test these changes

Check the field mapping for unit in field metadata

Related issues

None

@axw axw added the backport-8.6 Automated backport with mergify label Dec 6, 2022
@axw axw requested a review from a team December 6, 2022 01:17
@apmmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-12-06T01:17:59.019+0000

  • Duration: 27 min 15 sec

Test stats 🧪

Test Results
Failed 0
Passed 153
Skipped 0
Total 153

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate and publish the docker images.

  • /test windows : Build & tests on Windows.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@apmmachine
Copy link
Contributor

📚 Go benchmark report

Diff with the main branch

name                                                                                              old time/op    new time/op    delta
pkg:github.com/elastic/apm-server/internal/agentcfg goos:linux goarch:amd64
FetchAndAdd/FetchFromCache-12                                                                       46.2ns ± 0%    41.1ns ± 0%  -10.89%  (p=0.008 n=5+5)
FetchAndAdd/FetchAndAddToCache-12                                                                    106ns ± 3%      96ns ± 1%   -9.08%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/internal/beater/request goos:linux goarch:amd64
ContextResetContentEncoding/empty-12                                                                 135ns ± 3%     119ns ± 1%  -11.94%  (p=0.008 n=5+5)
ContextResetContentEncoding/uncompressed-12                                                          159ns ± 1%     141ns ± 0%  -11.25%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/internal/model/modelindexer goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/internal/processor/stream goos:linux goarch:amd64
BackendProcessor/minimal.ndjson-12                                                                  21.7µs ±11%    16.6µs ± 8%  -23.79%  (p=0.016 n=5+4)
BackendProcessor/transactions.ndjson-12                                                             86.9µs ±25%   114.7µs ±17%  +31.95%  (p=0.032 n=5+5)
RUMV3Processor/rum_errors.ndjson-12                                                                 7.89µs ±13%    9.22µs ± 6%  +16.89%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel2/invalid-json-event.ndjson-12            4.14µs ± 6%    3.81µs ± 6%   -7.90%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel4/metadata-null-values.ndjson-12          2.15µs ± 7%    1.95µs ±11%   -9.29%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/invalid-metadata-2.ndjson-12             825ns ± 0%     836ns ± 3%   +1.32%  (p=0.032 n=4+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/span-links.ndjson-12                    1.56µs ± 1%    1.57µs ± 1%   +1.22%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions-huge_traces.ndjson-12      5.67µs ± 1%    5.56µs ± 1%   -2.07%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions.ndjson-12                  11.2µs ± 1%    10.9µs ± 1%   -2.50%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans.ndjson-12            11.1µs ± 1%    10.7µs ± 1%   -4.09%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum.ndjson-12        2.06µs ± 1%    2.01µs ± 2%   -2.55%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum_2.ndjson-12      1.98µs ± 1%    1.93µs ± 1%   -2.17%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/unknown-span-type.ndjson-12             7.34µs ± 1%    7.13µs ± 2%   -2.83%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors.ndjson-12                      7.39µs ± 1%    6.94µs ± 4%   -6.10%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors_2.ndjson-12                    6.87µs ± 1%    6.52µs ± 2%   -5.19%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors_transaction_id.ndjson-12       5.51µs ± 1%    5.40µs ± 1%   -1.99%  (p=0.024 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/events.ndjson-12                      13.3µs ± 1%    13.0µs ± 1%   -1.94%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event-type.ndjson-12           832ns ± 2%     799ns ± 2%   -3.98%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event.ndjson-12               3.37µs ± 1%    3.32µs ± 1%   -1.44%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-json-event.ndjson-12          1.10µs ± 1%    1.09µs ± 1%   -1.40%  (p=0.040 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-metadata-2.ndjson-12           488ns ± 1%     465ns ± 2%   -4.84%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-metadata.ndjson-12             496ns ± 1%     470ns ± 1%   -5.30%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/metadata.ndjson-12                    1.30µs ± 2%    1.28µs ± 1%   -1.90%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/minimal-service.ndjson-12              989ns ± 1%     969ns ± 1%   -2.01%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/optional-timestamps.ndjson-12         1.49µs ± 2%    1.45µs ± 2%   -3.01%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/otel-bridge.ndjson-12                 3.26µs ± 3%    3.16µs ± 2%   -2.88%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/spans.ndjson-12                       9.62µs ± 2%    9.33µs ± 1%   -3.05%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/transactions_spans.ndjson-12          9.49µs ± 3%    9.28µs ± 1%   -2.27%  (p=0.032 n=5+5)
ReadBatch/minimal-service.ndjson-12                                                                 11.6µs ± 7%    14.0µs ±14%  +20.55%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/internal/publish goos:linux goarch:amd64
Publisher-12                                                                                         1.00s ± 0%     1.00s ± 0%   +0.10%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/x-pack/apm-server/aggregation/spanmetrics goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/aggregation/txmetrics goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/sampling goos:linux goarch:amd64
TraceGroups-12                                                                                       123ns ± 3%     133ns ± 2%   +8.22%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/x-pack/apm-server/sampling/eventstorage goos:linux goarch:amd64
WriteTransaction/json_codec-12                                                                      12.7µs ±61%     4.5µs ±13%  -64.72%  (p=0.016 n=5+5)
WriteTransaction/json_codec_big_tx-12                                                               12.6µs ±59%     5.1µs ± 3%  -59.42%  (p=0.008 n=5+5)
ReadEvents/json_codec/1_events-12                                                                   10.2µs ± 4%     9.2µs ± 4%   -9.79%  (p=0.008 n=5+5)
ReadEvents/json_codec_big_tx/0_events-12                                                             346ns ±12%     310ns ± 4%  -10.53%  (p=0.008 n=5+5)
ReadEvents/json_codec_big_tx/1_events-12                                                            11.5µs ± 2%    10.9µs ± 4%   -5.56%  (p=0.008 n=5+5)
ReadEvents/nop_codec/0_events-12                                                                     339ns ± 4%     309ns ± 4%   -8.74%  (p=0.008 n=5+5)
ReadEvents/nop_codec/399_events-12                                                                   430µs ±12%     477µs ± 9%  +10.99%  (p=0.032 n=5+5)
ReadEvents/nop_codec_big_tx/0_events-12                                                              345ns ±10%     302ns ± 4%  -12.39%  (p=0.008 n=5+5)
IsTraceSampled/sampled-12                                                                           75.5ns ± 3%    67.7ns ± 3%  -10.43%  (p=0.008 n=5+5)
IsTraceSampled/unsampled-12                                                                         78.5ns ± 2%    70.1ns ± 1%  -10.65%  (p=0.008 n=5+5)
IsTraceSampled/unknown-12                                                                            419ns ± 2%     370ns ± 1%  -11.59%  (p=0.008 n=5+5)

name                                                                                              old alloc/op   new alloc/op   delta
pkg:github.com/elastic/apm-server/internal/agentcfg goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/internal/beater/request goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/internal/model/modelindexer goos:linux goarch:amd64
ModelIndexer/BestCompressionScaling-12                                                              2.59kB ± 1%    2.62kB ± 1%   +1.36%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/internal/processor/stream goos:linux goarch:amd64
BackendProcessor/errors_rum.ndjson-12                                                               7.98kB ± 2%    8.13kB ± 2%   +1.81%  (p=0.032 n=5+5)
BackendProcessor/invalid-event-type.ndjson-12                                                       3.78kB ± 2%    3.72kB ± 1%   -1.71%  (p=0.008 n=5+5)
BackendProcessor/invalid-event.ndjson-12                                                            7.70kB ± 0%    7.88kB ± 2%   +2.42%  (p=0.008 n=5+5)
BackendProcessor/invalid-metadata-2.ndjson-12                                                       2.71kB ± 1%    2.74kB ± 1%   +1.40%  (p=0.040 n=5+5)
BackendProcessor/spans.ndjson-12                                                                    29.0kB ± 2%    29.9kB ± 2%   +3.04%  (p=0.016 n=5+5)
BackendProcessor/transactions.ndjson-12                                                             26.3kB ± 1%    26.8kB ± 1%   +2.04%  (p=0.016 n=5+5)
BackendProcessor/transactions_spans.ndjson-12                                                       24.0kB ± 1%    24.3kB ± 1%   +1.64%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions-huge_traces.ndjson-12      15.7kB ± 0%    15.6kB ± 1%   -0.60%  (p=0.016 n=5+5)
ReadBatch/errors_2.ndjson-12                                                                        22.7kB ± 0%    22.7kB ± 0%   +0.09%  (p=0.024 n=5+5)
ReadBatch/errors_rum.ndjson-12                                                                      6.88kB ± 0%    6.88kB ± 0%   +0.05%  (p=0.040 n=5+5)
ReadBatch/metadata-null-values.ndjson-12                                                            2.42kB ± 0%    2.42kB ± 0%   -0.04%  (p=0.029 n=4+4)
ReadBatch/ratelimit.ndjson-12                                                                       10.4kB ± 0%    10.4kB ± 0%   +0.05%  (p=0.040 n=5+5)
ReadBatch/spans.ndjson-12                                                                           27.5kB ± 0%    27.6kB ± 0%   +0.04%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/internal/publish goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/aggregation/spanmetrics goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/aggregation/txmetrics goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/sampling goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/sampling/eventstorage goos:linux goarch:amd64
ShardedWriteTransactionContended-12                                                                 8.42kB ±33%    6.86kB ± 3%  -18.50%  (p=0.016 n=5+5)
WriteTransaction/json_codec-12                                                                      3.00kB ± 0%    3.00kB ± 0%   -0.05%  (p=0.032 n=5+5)
WriteTransaction/json_codec_big_tx-12                                                               3.90kB ± 0%    3.90kB ± 0%   -0.03%  (p=0.029 n=4+4)

name                                                                                              old allocs/op  new allocs/op  delta
pkg:github.com/elastic/apm-server/internal/agentcfg goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/internal/beater/request goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/internal/model/modelindexer goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/internal/processor/stream goos:linux goarch:amd64
BackendProcessor/events.ndjson-12                                                                      716 ± 0%       717 ± 0%   +0.14%  (p=0.016 n=4+5)
BackendProcessor/heavy.ndjson-12                                                                     22.3k ± 0%     22.3k ± 0%   +0.01%  (p=0.016 n=5+4)
BackendProcessorParallel/BenchmarkBackendProcessorParallel4/heavy.ndjson-12                          22.3k ± 0%     22.3k ± 0%   -0.01%  (p=0.016 n=4+5)
pkg:github.com/elastic/apm-server/internal/publish goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/aggregation/spanmetrics goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/aggregation/txmetrics goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/sampling goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/x-pack/apm-server/sampling/eventstorage goos:linux goarch:amd64

name                                                                                              old speed      new speed      delta
pkg:github.com/elastic/apm-server/internal/model/modelindexer goos:linux goarch:amd64
pkg:github.com/elastic/apm-server/internal/processor/stream goos:linux goarch:amd64
BackendProcessor/transactions.ndjson-12                                                           66.7MB/s ±22%  49.9MB/s ±19%  -25.07%  (p=0.032 n=5+5)
RUMV3Processor/rum_errors.ndjson-12                                                                122MB/s ±12%   104MB/s ± 7%  -14.66%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel2/invalid-json-event.ndjson-12           142MB/s ± 7%   154MB/s ± 5%   +8.57%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel4/metadata-null-values.ndjson-12         245MB/s ± 7%   271MB/s ±10%  +10.38%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/invalid-metadata-2.ndjson-12           528MB/s ± 0%   522MB/s ± 3%   -1.28%  (p=0.032 n=4+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/span-links.ndjson-12                   438MB/s ± 1%   433MB/s ± 1%   -1.21%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions-huge_traces.ndjson-12     558MB/s ± 1%   570MB/s ± 1%   +2.10%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions.ndjson-12                 504MB/s ± 1%   517MB/s ± 1%   +2.56%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans.ndjson-12           524MB/s ± 1%   546MB/s ± 1%   +4.27%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum.ndjson-12       561MB/s ± 1%   575MB/s ± 2%   +2.63%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum_2.ndjson-12     565MB/s ± 1%   578MB/s ± 1%   +2.23%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/unknown-span-type.ndjson-12            451MB/s ± 1%   464MB/s ± 2%   +2.92%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors.ndjson-12                     858MB/s ± 1%   914MB/s ± 4%   +6.54%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors_2.ndjson-12                   686MB/s ± 1%   723MB/s ± 2%   +5.49%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors_transaction_id.ndjson-12      694MB/s ± 1%   708MB/s ± 1%   +2.03%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/events.ndjson-12                     559MB/s ± 1%   570MB/s ± 1%   +1.98%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event-type.ndjson-12         470MB/s ± 2%   489MB/s ± 2%   +4.13%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event.ndjson-12              227MB/s ± 1%   231MB/s ± 1%   +1.46%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-json-event.ndjson-12         533MB/s ± 1%   541MB/s ± 1%   +1.41%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-metadata-2.ndjson-12         893MB/s ± 1%   938MB/s ± 2%   +5.11%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-metadata.ndjson-12           898MB/s ± 1%   949MB/s ± 1%   +5.60%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/metadata.ndjson-12                   954MB/s ± 2%   972MB/s ± 1%   +1.90%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/minimal-service.ndjson-12            430MB/s ± 1%   439MB/s ± 1%   +2.06%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/optional-timestamps.ndjson-12        688MB/s ± 2%   709MB/s ± 2%   +3.09%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/otel-bridge.ndjson-12                578MB/s ± 3%   595MB/s ± 2%   +2.95%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/spans.ndjson-12                      838MB/s ± 2%   865MB/s ± 1%   +3.12%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/transactions_spans.ndjson-12         613MB/s ± 3%   627MB/s ± 1%   +2.30%  (p=0.032 n=5+5)
ReadBatch/minimal-service.ndjson-12                                                               36.8MB/s ± 7%  30.6MB/s ±13%  -16.75%  (p=0.008 n=5+5)

report generated with https://pkg.go.dev/golang.org/x/perf/cmd/benchstat

@axw
Copy link
Member Author

axw commented Dec 6, 2022

Merging without review to get the 8.6 package updated ASAP. Should be non-controversial :)

@axw axw merged commit aca77ec into elastic:main Dec 6, 2022
@axw axw deleted the add-unit branch December 6, 2022 02:04
mergify bot pushed a commit that referenced this pull request Dec 6, 2022
axw added a commit that referenced this pull request Dec 6, 2022
(cherry picked from commit aca77ec)

Co-authored-by: Andrew Wilkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.6 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants