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

Always enable service metrics and service summary aggregations #10060

Merged
merged 3 commits into from
Jan 17, 2023

Conversation

carsonip
Copy link
Member

Motivation/summary

Always enable service metrics and service summary aggregations. Remove corresponding config.

Checklist

How to test these changes

  • Check that service metrics / service summary metrics exists

Related issues

Closes #10048

@mergify
Copy link
Contributor

mergify bot commented Jan 17, 2023

This pull request does not have a backport label. Could you fix it @carsonip? 🙏
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 Jan 17, 2023
@apmmachine
Copy link
Contributor

apmmachine commented Jan 17, 2023

💚 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: 2023-01-17T17:28:23.349+0000

  • Duration: 10 min 30 sec

🤖 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

apmmachine commented Jan 17, 2023

📚 Go benchmark report

Diff with the main branch

goos: linux
goarch: amd64
pkg: github.com/elastic/apm-server/internal/agentcfg
cpu: 12th Gen Intel(R) Core(TM) i5-12500
                                  │ build/main/bench.out │             bench.out              │
                                  │        sec/op        │    sec/op     vs base              │
geomean                                     70.05n         70.13n        +0.12%
¹ need >= 6 samples for confidence interval at level 0.95

                                  │ build/main/bench.out │              bench.out              │
                                  │         B/op         │    B/op      vs base                │
geomean                                                ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

                                  │ build/main/bench.out │              bench.out              │
                                  │      allocs/op       │  allocs/op   vs base                │
geomean                                                ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

pkg: github.com/elastic/apm-server/internal/beater/request
                                             │ build/main/bench.out │             bench.out              │
                                             │        sec/op        │    sec/op     vs base              │
geomean                                                907.0n         890.8n        -1.78%
¹ need >= 6 samples for confidence interval at level 0.95

                                             │ build/main/bench.out │               bench.out               │
                                             │         B/op         │     B/op       vs base                │
geomean                                                           ³                  +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

                                             │ build/main/bench.out │              bench.out              │
                                             │      allocs/op       │  allocs/op   vs base                │
geomean                                                           ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

pkg: github.com/elastic/apm-server/internal/publish
             │ build/main/bench.out │          bench.out           │
             │        sec/op        │   sec/op     vs base         │
¹ need >= 6 samples for confidence interval at level 0.95

             │ build/main/bench.out │           bench.out            │
             │         B/op         │     B/op       vs base         │
¹ need >= 6 samples for confidence interval at level 0.95

             │ build/main/bench.out │           bench.out           │
             │      allocs/op       │  allocs/op    vs base         │
¹ need >= 6 samples for confidence interval at level 0.95

pkg: github.com/elastic/apm-server/x-pack/apm-server/aggregation/spanmetrics
                 │ build/main/bench.out │               bench.out               │
                 │        sec/op        │    sec/op      vs base                │
AggregateSpan-12           930.5n ± ∞ ¹   2422.0n ± ∞ ¹  +160.29% (p=0.008 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

                 │ build/main/bench.out │              bench.out               │
                 │         B/op         │     B/op       vs base               │
AggregateSpan-12          2.000Ki ± ∞ ¹   3.422Ki ± ∞ ¹  +71.09% (p=0.008 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

                 │ build/main/bench.out │               bench.out               │
                 │      allocs/op       │  allocs/op    vs base                 │
AggregateSpan-12            1.000 ± ∞ ¹   15.000 ± ∞ ¹  +1400.00% (p=0.008 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

pkg: github.com/elastic/apm-server/x-pack/apm-server/aggregation/txmetrics
                        │ build/main/bench.out │           bench.out           │
                        │        sec/op        │    sec/op     vs base         │
¹ need >= 6 samples for confidence interval at level 0.95

                        │ build/main/bench.out │           bench.out            │
                        │         B/op         │    B/op      vs base           │
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                        │ build/main/bench.out │           bench.out            │
                        │      allocs/op       │  allocs/op   vs base           │
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

pkg: github.com/elastic/apm-server/x-pack/apm-server/sampling
               │ build/main/bench.out │             bench.out              │
               │        sec/op        │    sec/op     vs base              │
geomean                  603.9n         579.0n        -4.13%
¹ need >= 6 samples for confidence interval at level 0.95

               │ build/main/bench.out │               bench.out               │
               │         B/op         │     B/op       vs base                │
geomean                             ³                  -0.33%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

               │ build/main/bench.out │              bench.out              │
               │      allocs/op       │  allocs/op   vs base                │
geomean                             ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

pkg: github.com/elastic/apm-server/x-pack/apm-server/sampling/eventstorage
                                            │ build/main/bench.out │             bench.out              │
                                            │        sec/op        │    sec/op     vs base              │
ReadEvents/nop_codec_big_tx/1_events-12               2.046µ ± ∞ ¹   2.168µ ± ∞ ¹  +5.96% (p=0.032 n=5)
ReadEvents/nop_codec_big_tx/100_events-12             154.6µ ± ∞ ¹   146.5µ ± ∞ ¹  -5.27% (p=0.032 n=5)
geomean                                               32.13µ         31.56µ        -1.79%
¹ need >= 6 samples for confidence interval at level 0.95

                                            │ build/main/bench.out │               bench.out                │
                                            │         B/op         │      B/op       vs base                │
ReadEvents/json_codec/199_events-12                  1.046Mi ± ∞ ¹    1.046Mi ± ∞ ¹  +0.03% (p=0.040 n=5)
ReadEvents/json_codec_big_tx/399_events-12           2.114Mi ± ∞ ¹    2.114Mi ± ∞ ¹  +0.00% (p=0.016 n=5)
IsTraceSampled/unknown-12                              341.0 ± ∞ ¹      335.0 ± ∞ ¹  -1.76% (p=0.040 n=5)
geomean                                              31.50Ki          31.32Ki        -0.59%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                            │ build/main/bench.out │              bench.out               │
                                            │      allocs/op       │  allocs/op    vs base                │
geomean                                                144.7          144.7        +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

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

Copy link
Contributor

@simitt simitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@carsonip carsonip marked this pull request as ready for review January 17, 2023 17:12
@@ -9,6 +9,7 @@ https://github.com/elastic/apm-server/compare/8.6\...main[View commits]
- `transaction.success_count` has been moved to `event.success_count` {pull}9819[9819]
- Stop indexing transaction metrics to `metrics-apm.internal` {pull}9846[9846]
- Stop indexing span destination metrics to `metrics-apm.internal` {pull}9926[9926]
- Service metrics and service summary aggregations are now always enabled {pull}10060[10060]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simitt here I'm calling this a breaking change since similar changes above e.g. "Stop indexing transaction metrics to metrics-apm.internal" are also called breaking. Can you please confirm if this applies to this PR as well? Or should this be under another section of the changelog?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this as enhancement - we are adding new functionality, not removing existing one. The feature was disabled by default since it was in beta.

@carsonip carsonip merged commit ce6d5df into elastic:main Jan 17, 2023
@marclop marclop self-assigned this Feb 20, 2023
@marclop
Copy link
Contributor

marclop commented Feb 20, 2023

Tested with 8.7.0 BC2:

Sent some transactions to the APM Server and got:

image

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 test-plan test-plan-ok v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable service metrics and service summary metrics by default
5 participants