-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(trace-items): Pull useGetTraceItemAttributeKeys into hook #93739
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
ref(trace-items): Pull useGetTraceItemAttributeKeys into hook #93739
Conversation
❌ 4 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
type TraceItemAttributeKeyOptions = Pick< | ||
ReturnType<typeof normalizeDateTimeParams>, | ||
'end' | 'start' | 'statsPeriod' | 'utc' | ||
> & { | ||
attributeType: 'string' | 'number'; | ||
itemType: TraceItemDataset; | ||
project?: string[]; | ||
substringMatch?: string; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about something like this
type TraceItemAttributeKeyOptions = Pick< | |
ReturnType<typeof normalizeDateTimeParams>, | |
'end' | 'start' | 'statsPeriod' | 'utc' | |
> & { | |
attributeType: 'string' | 'number'; | |
itemType: TraceItemDataset; | |
project?: string[]; | |
substringMatch?: string; | |
}; | |
type TraceItemAttributeKeyOptions = { | |
attributeType: 'string' | 'number'; | |
itemType: TraceItemDataset; | |
project?: string[]; | |
substringMatch?: string; | |
dateTime: Pick< | |
ReturnType<typeof normalizeDateTimeParams>, | |
'end' | 'start' | 'statsPeriod' | 'utc' | |
> | |
}; |
This would allow you to preserve the boundary between the dateTime and the trace item specific options (which seems like two different concepts anyways), at a small cost of the extra key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't actually do that, this is actually the type of the query string. And since the api is expecting all these keys at the top level, it needs to be like this.
We'll need the
useGetTraceItemAttributeKeys
hook in other places so refactoring it so that it can exported.