-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[clickhouse]: deprecated the dbmodel base on ch-go
library
#7149
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
base: main
Are you sure you want to change the base?
[clickhouse]: deprecated the dbmodel base on ch-go
library
#7149
Conversation
Signed-off-by: zhengkezhou1 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7149 +/- ##
==========================================
- Coverage 96.21% 96.15% -0.06%
==========================================
Files 361 361
Lines 21779 21483 -296
==========================================
- Hits 20955 20658 -297
Misses 616 616
- Partials 208 209 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@zhengkezhou1 Since all of the code is new and not used elsewhere, can we make the required changes directly in-place? |
Signed-off-by: zhengkezhou1 <[email protected]>
I make the changes directly. |
) | ||
|
||
// FromDBModel convert the Trace to ptrace.Traces | ||
func FromDBModel(dbTrace Trace) ptrace.Traces { |
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.
Instead of having this function be static - is it possible to have it be received by dbmodel.Trace
? Is there any reason we cannot do that?
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.
and same for the other types? maybe we could move them each to their own file to keep the files lightweight?
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.
and same for the other types? maybe we could move them each to their own file to keep the files lightweight?
What do you mean by moving those to different files?
Is that use a method instead of a function and move it into dbmodel.go?
type Link struct {
TraceId []byte
SpanId []byte
TraceState string
Attributes AttributesGroup
}
func (link Link) fromLink() ptrace.SpanLink {}
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.
Instead of having this function be static - is it possible to have it be received by
dbmodel.Trace
? Is there any reason we cannot do that?
It's easy to test and All these functions (FromDBModel
, fromDBScope
, fromDBSpan
, fromDBEvent
, fromDBLink
, fromDBSpanKind
, fromDBStatusCode
, attributesGroupToMap
) are purely converting from one data structure (dbmodel) to another (ptrace
or pcommon
). These conversion functions don't rely on any external state and don't modify the state of the objects being converted. They are side-effect-free.
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.
@mahadzaryab1 How do you think about this?
Signed-off-by: zhengkezhou1 <[email protected]>
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You may re-open it if you need more time. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You may re-open it if you need more time. |
Which problem is this PR solving?
ch-go
library in write path #7148Description of the changes
ch-go
and functions:to_dbmodel
from_dbmodel
.How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test