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] When creating Trace Explorer links transaction.id is replaced when page is loaded #171368

Open
spong opened this issue Nov 15, 2023 · 3 comments
Labels
apm:trace-explorer APM UI Trace Explorer Work bug Fixes for quality problems that affect the customer experience Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@spong
Copy link
Member

spong commented Nov 15, 2023

We're instrumenting the Security Assistant with APM and linking off to the Trace Explorer UI for any given message that has a transaction/trace id. E.g.

const apmTraceLink =
    message.traceData != null
      ? `${basePath}/app/apm/traces/explorer/waterfall?comparisonEnabled=false&detailTab=timeline&environment=ENVIRONMENT_ALL&kuery=&query=transaction.id:%20${message.traceData.transactionId}&rangeFrom=now-1y/d&rangeTo=now&showCriticalPath=false&traceId=${message.traceData.traceId}&transactionId=${message.traceData.transactionId}&type=kql&waterfallItemId=`
      : undefined; 

I first started by just copying the main URL from the Trace Explorer page and replacing traceId and transactionId ala:

http://localhost:5601/kbn/app/apm/traces/explorer/waterfall?comparisonEnabled=false&detailTab=timeline&environment=ENVIRONMENT_ALL&kuery=&query=&rangeFrom=now-1y/d&rangeTo=now&showCriticalPath=false&traceId=37d559d825f68d3b5251f8e16029c604&transactionId=83c8c2c5f680a65d&type=kql&waterfallItemId=

traceId=37d559d825f68d3b5251f8e16029c604
transactionId=83c8c2c5f680a65d

however I noticed that when navigating to the route both the traceId and transactionId were rewritten:

http://localhost:5601/kbn/app/apm/traces/explorer/waterfall?comparisonEnabled=false&detailTab=timeline&environment=ENVIRONMENT_ALL&kuery=&query=&rangeFrom=now-1y/d&rangeTo=now&showCriticalPath=false&traceId=bedffbd989af4982cd7530794bc32c8c&transactionId=019047f20836c69a&type=kql&waterfallItemId=

traceId=bedffbd989af4982cd7530794bc32c8c
transactionId=019047f20836c69a

I then constructed a link with a kql query param for filtering on transaction.id. While the transactionId param got updated to 4a5ff15270e35400 from of 83c8c2c5f680a65d, it seems the search filter overrides this and gives the correct view:

http://localhost:5601/kbn/app/apm/traces/explorer/waterfall?comparisonEnabled=false&detailTab=timeline&environment=ENVIRONMENT_ALL&kuery=&query=transaction.id:%2083c8c2c5f680a65d&rangeFrom=now-1y/d&rangeTo=now&showCriticalPath=false&traceId=37d559d825f68d3b5251f8e16029c604&transactionId=4a5ff15270e35400&type=kql&waterfallItemId=

traceId=37d559d825f68d3b5251f8e16029c604 (not replaced this time!)
transactionId=4a5ff15270e35400
@spong spong added bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support apm:trace-explorer APM UI Trace Explorer Work labels Nov 15, 2023
@elasticmachine
Copy link
Contributor

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

@smith smith added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Nov 15, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic
Copy link

botelastic bot commented May 14, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the stale Used to mark issues that were closed for being stale label May 14, 2024
@smith smith removed the Team:APM All issues that need APM UI Team support label May 18, 2024
@botelastic botelastic bot removed the stale Used to mark issues that were closed for being stale label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:trace-explorer APM UI Trace Explorer Work bug Fixes for quality problems that affect the customer experience Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

No branches or pull requests

3 participants