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

added function to show full traceID in #2536

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

avinpy-255
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • I've added a funtion to show the full trace ID in the trace details page

How was this change tested?

  • here is the screenshot of the function Full ID
    Screenshot from 2025-01-03 18-00-08

  • after clicking the Full ID
    Screenshot from 2025-01-03 17-59-45

Checklist

Signed-off-by: Avinash <avinashchowdhury81@gmail.com>
@avinpy-255 avinpy-255 requested a review from a team as a code owner January 3, 2025 12:30
@avinpy-255 avinpy-255 requested review from jkowall and removed request for a team January 3, 2025 12:30
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.58%. Comparing base (1178b1c) to head (af3ec46).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2536   +/-   ##
=======================================
  Coverage   96.58%   96.58%           
=======================================
  Files         255      255           
  Lines        7732     7733    +1     
  Branches     2009     1996   -13     
=======================================
+ Hits         7468     7469    +1     
  Misses        264      264           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MAX-786
Copy link

MAX-786 commented Jan 11, 2025

looks great ... but IMHO it takes extra space as it's showing the User same information as it's already available on top. what you can do is that make the shorten traceID clickable and then clicking on it would expand to show Full ID and again clicking on it would collapse it. This would also clean-up the UI and IMO would be a better UX design

@avinpy-255
Copy link
Contributor Author

looks great ... but IMHO it takes extra space as it's showing the User same information as it's already available on top. what you can do is that make the shorten traceID clickable and then clicking on it would expand to show Full ID and again clicking on it would collapse it. This would also clean-up the UI and IMO would be a better UX design

Thanks! I'll make TraceID clickable for better UX

avinpy-255 and others added 2 commits January 13, 2025 17:51
Signed-off-by: Avinash <avinashchowdhury81@gmail.com>
@avinpy-255
Copy link
Contributor Author

Hey @MAX-786
As suggested, I've successfully updated the ui here is the example:
Screencast from 2025-01-13 19-53-13.webm

@MAX-786
Copy link

MAX-786 commented Jan 13, 2025

@avinpy-255 Hi,
yepp, wait for the review from the maintainers.

@yurishkuro
Copy link
Member

The original issue was asking for configuration to make the trace ID displayed in full. There is no configuration added in this PR. The configuration can be specifying the desired length from the ID to display, e.g. 32 would display full ID.

Signed-off-by: Avinash <avinashchowdhury81@gmail.com>
@@ -20,6 +20,8 @@ import getVersion from '../utils/version/get-version';
import { version } from '../../package.json';
import { Config } from '../types/config';

export const TraceIDLength = 7;
Copy link
Member

Choose a reason for hiding this comment

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

we don't use constants for anything else, just use the value directly

@@ -149,7 +150,7 @@ export function TracePageHeaderFn(props: TracePageHeaderEmbedProps & { forwarded
return { ...rest, value: renderer(trace) };
});

const traceShortID = trace.traceID.slice(0, 7);
const traceShortID = trace.traceID.slice(0, TraceIDLength);
Copy link
Member

Choose a reason for hiding this comment

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

add a test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I will add a test for tracIDlength

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: UI configuration to display the entire trace ID
3 participants