-
Notifications
You must be signed in to change notification settings - Fork 705
[feat] [observation] trajectory observe #332
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?
Conversation
(LogID: 20251127120914010091115104657BA09) Co-Authored-By: Coda <coda@bytedance.com>
Change-Id: I276d102667fc5e195d930d8352972f71803c9847
Change-Id: I278ed8d9f51ecadad41074892144e471360f6ef0
Change-Id: I5491314293e069d38f41c6aa6a7975dd22ac0392
…op into feat_trajectory_observe
Change-Id: I1274e7d69d8a86e160c5cd0b123da573d0ce71dd
Change-Id: I4e8103ed4f8bbcefe383a9f4aeff881ba9ae16ea
Change-Id: Ia22e14e7d9dd027b735aaa3222caed1fb3937eb8
Change-Id: Ib8d6987180c958e7f5654410b98b0477ea20f89a
Change-Id: Ic088c21db3efdc9115ca00b733ae2145f8244bb9
Change-Id: I33d7db20f81e4bc1059c5b8be2113e8826406395
|
Submission history contains excessive meaningless information, please organize it |
mocayo
left a comment
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.
reorganize commit message and resolve conflicts
CozeLoop
left a comment
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.
Summary: Found compile-blocking issue in otel FieldConf map and a missing middleware function reference in router.
- [🚫Must Fix] backend/modules/observability/lib/otel/otel_convert.go: Struct literal for FieldConf uses non-existent field names (
attributeKey,isTag,dataType). Replace withAttributeKey,IsTag,DataType. - [🚨Should Fix] backend/api/router/coze/loop/apis/coze.loop.apis.go: Route references
_gettrajectoryconfigMwbut the stub is not defined inmiddleware.go. Add the missing middleware function.
Please address these to unblock compilation and ensure routing consistency.
backend/modules/observability/infra/mq/producer/span_with_annotation_producer.go
Show resolved
Hide resolved
| // 按开始时间排序 | ||
| for i := 0; i < len(children); i++ { | ||
| for j := i + 1; j < len(children); j++ { | ||
| if children[i].StartTime > children[j].StartTime { | ||
| children[i], children[j] = children[j], children[i] | ||
| } |
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.
[💡Suggestion] Sorting children can use sort.Slice for clarity and O(n log n) complexity: sort.Slice(children, func(i, j int) bool { return children[i].StartTime < children[j].StartTime }).
backend/modules/observability/infra/mq/producer/span_with_annotation_producer.go
Show resolved
Hide resolved
| TraceID: span.TraceId, | ||
| DurationMicros: (endTimeUnixNanoInt64 - startTimeUnixNanoInt64) / 1000, | ||
| PSM: "", | ||
| PSM: psm, |
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.
No risk detected for this change.
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.
无问题
| IsTag: true, | ||
| DataType: dataTypeString, | ||
| }, | ||
| "psm": { |
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.
[🚫Must Fix] Struct literal uses unknown field names for FieldConf
attributeKey, isTag, and dataType are not fields of FieldConf (the correct names are AttributeKey, IsTag, and DataType). This will fail to compile with “unknown field” errors. Please use the exported field names.
Suggestion:
"psm": {
AttributeKey: []string{"service.name"},
IsTag: false,
DataType: dataTypeString,
},Change-Id: I923bfa772de801964c637a9741216dcf383eb1ef
…op into feat_trajectory_observe
9406baf to
f97ef04
Compare
update fix
1d9c7e2 to
4466987
Compare
What type of PR is this?
Check the PR title
(Optional) Translate the PR title into Chinese
(Optional) More detailed description for this PR(en: English/zh: Chinese)
en:
zh(optional):
(Optional) Which issue(s) this PR fixes