diff --git a/src/store/modules/trace.ts b/src/store/modules/trace.ts
index e9654e83..4d698ed6 100644
--- a/src/store/modules/trace.ts
+++ b/src/store/modules/trace.ts
@@ -175,7 +175,23 @@ export const traceStore = defineStore({
if (res.data.errors) {
return res.data;
}
- this.setTraceSpans(res.data.data.trace.spans || []);
+ const data = res.data.data.trace.spans;
+ data[4].attachedEvents = [
+ {
+ startTime: {
+ seconds: 1669102205296,
+ nanos: 1669102205296,
+ },
+ event: "event",
+ endTime: {
+ seconds: 1669102212791,
+ nanos: 1669102212791,
+ },
+ tags: [{ key: "test", value: "test" }],
+ summary: [{ key: "test", value: 123 }],
+ },
+ ];
+ this.setTraceSpans(data || []);
return res.data;
},
async getSpanLogs(params: any) {
diff --git a/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue b/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue
index e8a33f17..dcac04de 100644
--- a/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue
+++ b/src/views/dashboard/related/trace/components/D3Graph/SpanDetail.vue
@@ -42,7 +42,9 @@ limitations under the License. -->
{{ t("isError") }}:
{{ currentSpan.isError }}
-
{{ t("tags") }}.
+
+ {{ t("tags") }}.
+
{{ i.key }}:
@@ -77,8 +79,17 @@ limitations under the License. -->
{{ _i.value }}
- {{ t("events") }}.
-
+
+ {{ t("events") }}.
+
+
@@ -211,22 +222,7 @@ function visTimeline() {
visGraph.value.destroy();
}
const h = timeline.value.getBoundingClientRect().height;
- // const attachedEvents = props.currentSpan.attachedEvents || [];
- const attachedEvents: SpanAttachedEvent[] = [
- {
- startTime: {
- seconds: 1669102205296,
- nanos: 1669102205296,
- },
- event: "event",
- endTime: {
- seconds: 1669102212791,
- nanos: 1669102212791,
- },
- tags: [{ key: "test", value: "test" }],
- summary: [{ key: "test", value: 123 }],
- },
- ];
+ const attachedEvents = props.currentSpan.attachedEvents || [];
const events: any[] = attachedEvents.map(
(d: SpanAttachedEvent, index: number) => {
return {
@@ -240,11 +236,12 @@ function visTimeline() {
}
);
const items = new DataSet(events);
- const options = {
+ const options: any = {
height: h,
width: "100%",
locale: "en",
- autoResize: true,
+ groupHeightMode: "fitItems",
+ autoResize: false,
};
visGraph.value = new Timeline(timeline.value, items, options);
visGraph.value.on("select", (data: { items: number[] }) => {