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

[APM] Service metrics - after merge improvements #141185

Closed
2 tasks done
kpatticha opened this issue Sep 21, 2022 · 9 comments · Fixed by #143299
Closed
2 tasks done

[APM] Service metrics - after merge improvements #141185

kpatticha opened this issue Sep 21, 2022 · 9 comments · Fixed by #143299
Labels
apm:service-metrics apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support v8.6.0

Comments

@kpatticha
Copy link
Contributor

kpatticha commented Sep 21, 2022

I received some feedback after merging the PR and some nits before. Gathering all of them in this ticket to address them

changes:

  1. Rename helper functions according to the outcome of the discussion we'll have below - [APM] Renaming helper functions about transaction aggegations #143299
  2. use _doc_count instead of value count sub aggs - [APM] Use _doc_count from service metrics #141210
    i. unblocked by Add _doc_count to Service metrics apm-server#9143
@kpatticha kpatticha added the Team:APM All issues that need APM UI Team support label Sep 21, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@kpatticha
Copy link
Contributor Author

kpatticha commented Sep 22, 2022

Regarding renaming the functions. it turns out that the naming can be really confusing. It would be great if we could standardize it.

Today we could have the following sources in services inventory:

  1. Aggregated transaction (transaction metrics)
  2. Aggregated transaction for service metrics (service metrics)
  3. Transactions (event based)
Transaction metrics Service metrics
getSearchAggregatedTransactions getSearchAggregatedServiceMetrics
getHasAggregatedTransactions getHasAggregatedServicesMetrics
getServiceTransactionStats getServiceAggregatedTransactionStats
getServiceDetailedStatsPeriods getServiceAggregatedDetailedStatsPeriods

Proposal

Transaction metrics Service metrics
getSearchTransactionMetrics getSearchServiceMetrics
getHasTransactionMetrics getHasServicesMetrics
getServiceTransactionStats getServiceMetricsTransactionStats
getServiceTransactionDetailedStatsPeriods getServiceMetricsTransactionDetailedStatsPeriods

getServiceTransactionStats and getServiceTransactionDetailedStatsPeriods rename unchanged.

@elastic/apm-ui let me know what you think

@sorenlouv
Copy link
Member

I'm not totally sold on getServiceTransactionStats and getServiceMetricsTransactionStats. I think it's important to signal, that this returns service stats. That's not easily decipherable from the current names. My suggestion:

getServiceTransactionStats -> getServiceStatsFromTransactions
getServiceMetricsTransactionStats -> getServiceStatsFromServiceMetrics

@kpatticha
Copy link
Contributor Author

Thanks @sqren. Make sense

@kpatticha
Copy link
Contributor Author

@elastic/apm-ui team if anyone has another proposal please me let me know.
Otherwise,I will proceed with the following changes:

Transaction metrics Service metrics
getSearchAggregatedTransactions getSearchAggregatedServiceMetrics
getHasAggregatedTransactions getHasAggregatedServicesMetrics
getServiceStatsFromTransactions getServiceStatsFromServiceMetrics
getServiceDetailedStatsPeriodsFromTransactions getServiceDetailedStatsPeriodsFromServiceMetrics

@sorenlouv
Copy link
Member

WDYT about dropping "aggregated"

getSearchAggregatedTransactions -> getSearchTransactionsEvents
getHasAggregatedTransactions -> getHasTransactionsEvents
getSearchAggregatedServiceMetrics -> getSearchServiceMetrics
getHasAggregatedServicesMetrics -> getHasServicesMetrics

@gbamparop
Copy link
Contributor

getSearchAggregatedTransactions -> getSearchTransactionsEvents

@sqren Transaction event seems to refer to a transaction document instead of a transaction metric document.

@kpatticha
Copy link
Contributor Author

getSearchTransactionsEvents is the helper which determines if we'll use aggregated transactions or not.

@kpatticha
Copy link
Contributor Author

but now I'm thinking that getSearchTransactionsEvents could interpreted as single transaction document not the metric. 🤔

is it also confusing for other?

@kpatticha kpatticha added the apm:test-plan-done Pull request that was successfully tested during the test plan label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:service-metrics apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support v8.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants