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

Deprecate apm-server apikey #9446

Merged
merged 2 commits into from
Oct 28, 2022
Merged

Deprecate apm-server apikey #9446

merged 2 commits into from
Oct 28, 2022

Conversation

axw
Copy link
Member

@axw axw commented Oct 27, 2022

Motivation/summary

Deprecate the apikey commands, as users have better options now. See #9444.

Checklist

How to test these changes

  1. Run apm-server -h, verify the apikey command mentions that it is deprecated.
  2. Run apm-server apikey -h, verify the command description mentions that it is deprecated.
  3. Run apm-server apikey create, verify the command output mentions that it is deprecated.

Related issues

Closes #9444

@axw axw force-pushed the deprecate-apikey branch from ee860dd to bbbaa0d Compare October 27, 2022 02:15
@mergify
Copy link
Contributor

mergify bot commented Oct 27, 2022

This pull request does not have a backport label. Could you fix it @axw? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.x is the label to automatically backport to the 7.x branch.
  • backport-7./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 27, 2022
@apmmachine
Copy link
Contributor

apmmachine commented Oct 27, 2022

💚 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-10-28T06:12:06.942+0000

  • Duration: 35 min 16 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!)

@axw axw force-pushed the deprecate-apikey branch from bbbaa0d to 71e84e0 Compare October 27, 2022 03:21
@apmmachine
Copy link
Contributor

apmmachine commented Oct 27, 2022

📚 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                                                                       41.1ns ± 0%    46.1ns ± 0%   +12.14%  (p=0.008 n=5+5)
FetchAndAdd/FetchAndAddToCache-12                                                                   92.9ns ± 5%   102.1ns ± 1%    +9.96%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/internal/beater/request goos:linux goarch:amd64
ContextResetContentEncoding/empty-12                                                                 118ns ± 1%     131ns ± 1%   +11.01%  (p=0.008 n=5+5)
ContextResetContentEncoding/uncompressed-12                                                          152ns ± 1%     170ns ± 1%   +12.20%  (p=0.008 n=5+5)
pkg:github.com/elastic/apm-server/internal/model/modelindexer goos:linux goarch:amd64
ModelIndexer/DefaultCompressionScaling-12                                                           3.03µs ± 2%    3.17µs ± 5%    +4.51%  (p=0.032 n=5+5)
pkg:github.com/elastic/apm-server/internal/processor/stream goos:linux goarch:amd64
BackendProcessorParallel/BenchmarkBackendProcessorParallel2/errors.ndjson-12                        35.3µs ±36%    25.3µs ±10%   -28.34%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel2/spans.ndjson-12                         32.6µs ±13%    38.1µs ± 6%   +16.98%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/invalid-event-type.ndjson-12            1.19µs ± 2%    1.17µs ± 1%    -1.66%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/spans.ndjson-12                         10.8µs ± 1%    11.3µs ± 8%    +4.39%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions.ndjson-12                  10.8µs ± 1%    11.1µs ± 1%    +2.83%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans.ndjson-12            10.6µs ± 1%    11.1µs ± 1%    +4.68%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum.ndjson-12        1.99µs ± 2%    2.04µs ± 2%    +2.51%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum_2.ndjson-12      1.90µs ± 1%    1.96µs ± 1%    +3.04%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/unknown-span-type.ndjson-12             7.14µs ± 2%    7.30µs ± 2%    +2.35%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors.ndjson-12                      6.83µs ± 1%    7.41µs ± 2%    +8.45%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors_transaction_id.ndjson-12       5.35µs ± 1%    5.47µs ± 1%    +2.30%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/events.ndjson-12                      12.9µs ± 1%    13.3µs ± 2%    +3.18%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event-type.ndjson-12           783ns ± 1%     795ns ± 1%    +1.48%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event.ndjson-12               3.29µs ± 1%    3.34µs ± 1%    +1.41%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-json-event.ndjson-12          1.07µs ± 1%    1.09µs ± 1%    +1.36%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-metadata.ndjson-12             471ns ± 1%     479ns ± 1%    +1.65%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/metadata-null-values.ndjson-12         759ns ± 1%     772ns ± 1%    +1.67%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/minimal-service.ndjson-12              954ns ± 1%     981ns ± 1%    +2.83%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/optional-timestamps.ndjson-12         1.43µs ± 1%    1.49µs ± 3%    +4.17%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/spans.ndjson-12                       9.30µs ± 1%    9.49µs ± 2%    +2.02%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/transactions-huge_traces.ndjson-12    4.53µs ± 2%    4.66µs ± 3%    +2.88%  (p=0.032 n=5+5)
ReadBatch/invalid-json-event.ndjson-12                                                              15.2µs ±19%    11.5µs ±15%   -24.33%  (p=0.032 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
WriteTransaction/json_codec-12                                                                      4.49µs ±15%    9.30µs ±62%  +107.05%  (p=0.032 n=5+5)
WriteTransaction/json_codec_big_tx-12                                                               4.93µs ± 2%   15.60µs ±29%  +216.40%  (p=0.008 n=5+5)
ReadEvents/json_codec/0_events-12                                                                    314ns ± 9%     347ns ± 7%   +10.74%  (p=0.040 n=5+5)
ReadEvents/json_codec_big_tx/0_events-12                                                             311ns ± 7%     338ns ± 5%    +8.55%  (p=0.032 n=5+5)
ReadEvents/nop_codec/0_events-12                                                                     303ns ± 5%     334ns ± 4%   +10.48%  (p=0.008 n=5+5)
ReadEvents/nop_codec/199_events-12                                                                   280µs ± 5%     254µs ± 4%    -9.41%  (p=0.008 n=5+5)
IsTraceSampled/sampled-12                                                                           69.4ns ± 4%    74.1ns ± 4%    +6.82%  (p=0.008 n=5+5)
IsTraceSampled/unsampled-12                                                                         69.9ns ± 1%    77.8ns ± 1%   +11.24%  (p=0.008 n=5+5)
IsTraceSampled/unknown-12                                                                            374ns ± 2%     410ns ± 2%    +9.63%  (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
pkg:github.com/elastic/apm-server/internal/processor/stream goos:linux goarch:amd64
BackendProcessor/errors_rum.ndjson-12                                                               7.94kB ± 2%    7.76kB ± 1%    -2.33%  (p=0.016 n=5+5)
BackendProcessor/optional-timestamps.ndjson-12                                                      4.57kB ± 2%    4.50kB ± 1%    -1.54%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel2/invalid-json-metadata.ndjson-12         5.95kB ± 2%    6.05kB ± 2%    +1.72%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel4/invalid-event.ndjson-12                 8.35kB ± 2%    8.56kB ± 2%    +2.53%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel4/transactions_spans_rum_2.ndjson-12      6.07kB ± 1%    6.15kB ± 1%    +1.45%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions.ndjson-12                  27.4kB ± 1%    27.8kB ± 0%    +1.18%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-metadata-2.ndjson-12          3.08kB ± 1%    3.12kB ± 1%    +1.27%  (p=0.048 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/transactions-huge_traces.ndjson-12    15.2kB ± 1%    15.3kB ± 1%    +1.07%  (p=0.016 n=5+5)
ReadBatch/errors_transaction_id.ndjson-12                                                           18.0kB ± 0%    18.0kB ± 0%    -0.08%  (p=0.024 n=5+5)
ReadBatch/events.ndjson-12                                                                          38.7kB ± 0%    38.6kB ± 0%    -0.36%  (p=0.008 n=5+5)
ReadBatch/heavy.ndjson-12                                                                            838kB ± 0%     840kB ± 0%    +0.18%  (p=0.008 n=5+5)
ReadBatch/metricsets.ndjson-12                                                                      15.6kB ± 0%    15.5kB ± 1%    -0.65%  (p=0.032 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
WriteTransaction/json_codec_big_tx-12                                                               3.90kB ± 0%    3.90kB ± 0%    +0.06%  (p=0.008 n=5+5)
ReadEvents/nop_codec/100_events-12                                                                   251kB ± 0%     250kB ± 0%    -0.14%  (p=0.008 n=5+5)
ReadEvents/nop_codec_big_tx/1_events-12                                                             3.27kB ± 0%    3.28kB ± 0%    +0.15%  (p=0.024 n=5+5)

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
ReadBatch/heavy.ndjson-12                                                                            22.1k ± 0%     22.1k ± 0%    +0.01%  (p=0.016 n=5+4)
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
ModelIndexer/DefaultCompressionScaling-12                                                          827MB/s ± 2%   792MB/s ± 5%    -4.23%  (p=0.032 n=5+5)
pkg:github.com/elastic/apm-server/internal/processor/stream goos:linux goarch:amd64
BackendProcessorParallel/BenchmarkBackendProcessorParallel2/errors.ndjson-12                       187MB/s ±29%   252MB/s ± 9%   +34.43%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel2/spans.ndjson-12                        248MB/s ±12%   211MB/s ± 6%   -14.97%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/invalid-event-type.ndjson-12           328MB/s ± 2%   334MB/s ± 1%    +1.67%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/spans.ndjson-12                        744MB/s ± 1%   714MB/s ± 8%    -4.04%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions.ndjson-12                 523MB/s ± 1%   508MB/s ± 1%    -2.76%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans.ndjson-12           548MB/s ± 1%   523MB/s ± 1%    -4.46%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum.ndjson-12       581MB/s ± 2%   567MB/s ± 2%    -2.45%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/transactions_spans_rum_2.ndjson-12     587MB/s ± 1%   570MB/s ± 1%    -2.93%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel8/unknown-span-type.ndjson-12            463MB/s ± 2%   453MB/s ± 2%    -2.31%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors.ndjson-12                     929MB/s ± 1%   857MB/s ± 2%    -7.79%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/errors_transaction_id.ndjson-12      715MB/s ± 1%   699MB/s ± 1%    -2.24%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/events.ndjson-12                     577MB/s ± 1%   559MB/s ± 2%    -3.08%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event-type.ndjson-12         499MB/s ± 1%   492MB/s ± 1%    -1.45%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-event.ndjson-12              232MB/s ± 1%   229MB/s ± 1%    -1.40%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-json-event.ndjson-12         547MB/s ± 1%   540MB/s ± 1%    -1.31%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/invalid-metadata.ndjson-12           947MB/s ± 1%   932MB/s ± 1%    -1.62%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/metadata-null-values.ndjson-12       693MB/s ± 1%   682MB/s ± 1%    -1.64%  (p=0.016 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/minimal-service.ndjson-12            445MB/s ± 1%   433MB/s ± 1%    -2.74%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/optional-timestamps.ndjson-12        717MB/s ± 1%   688MB/s ± 3%    -3.97%  (p=0.008 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/spans.ndjson-12                      863MB/s ± 1%   846MB/s ± 2%    -1.96%  (p=0.032 n=5+5)
BackendProcessorParallel/BenchmarkBackendProcessorParallel200/transactions-huge_traces.ndjson-12   700MB/s ± 2%   680MB/s ± 3%    -2.78%  (p=0.032 n=5+5)
ReadBatch/invalid-json-event.ndjson-12                                                            39.3MB/s ±21%  51.7MB/s ±14%   +31.58%  (p=0.032 n=5+5)

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

@axw axw force-pushed the deprecate-apikey branch from 71e84e0 to bfca99b Compare October 28, 2022 02:50
Emit a deprecation notice to stderr for every
`apm-server apikey` command.

JSON errors are now sent to stdout, so they can
be parsed independently of the notice.
@axw axw force-pushed the deprecate-apikey branch from bfca99b to 35922ff Compare October 28, 2022 02:50
@axw axw marked this pull request as ready for review October 28, 2022 03:27
@axw axw requested a review from a team October 28, 2022 03:27
@axw axw enabled auto-merge (squash) October 28, 2022 06:11
@axw axw merged commit ba5607d into elastic:main Oct 28, 2022
@axw axw deleted the deprecate-apikey branch October 28, 2022 06:52
@lahsivjar lahsivjar assigned lahsivjar and unassigned lahsivjar Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate apm-server apikey
4 participants