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] transactionType should be required on service-specific endpoints #84611

Closed
sorenlouv opened this issue Dec 1, 2020 · 1 comment · Fixed by #86893
Closed

[APM] transactionType should be required on service-specific endpoints #84611

sorenlouv opened this issue Dec 1, 2020 · 1 comment · Fixed by #86893
Assignees
Labels
Team:APM - DEPRECATED Use Team:obs-ux-infra_services. technical debt Improvement of the software architecture and operational architecture v7.12.0

Comments

@sorenlouv
Copy link
Member

The following endpoint should require transactionType:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/routes/services.ts#L281

And the logic for determining the default transaction type should be removed. Instead the client should specify the transactionType:

const transactionTypes =
groupBucket?.transaction_types.buckets.map(
(bucket) => bucket.key as string
) ?? [];
const transactionType =
transactionTypes.find(
(type) => type === TRANSACTION_PAGE_LOAD || type === TRANSACTION_REQUEST
) ?? transactionTypes[0];

A general note

The logic for calculating the default transaction type resides in the client, and should not be duplicated elsewhere:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/public/context/apm_service_context.tsx#L32-L36

All service-specific endpoints should require transactionType and let the client specify the transactionType

@sorenlouv sorenlouv added [zube]: (7.11) Team:APM - DEPRECATED Use Team:obs-ux-infra_services. labels Dec 1, 2020
@elasticmachine
Copy link
Contributor

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

@sorenlouv sorenlouv changed the title [APM] transctionType should be required on service-specific endpoints [APM] transactionType should be required on service-specific endpoints Dec 3, 2020
@smith smith added technical debt Improvement of the software architecture and operational architecture v7.12.0 [zube]: Backlog and removed [zube]: (7.11) labels Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM - DEPRECATED Use Team:obs-ux-infra_services. technical debt Improvement of the software architecture and operational architecture v7.12.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants