Skip to content

point 出现重复tag #62

@songlonqi-java

Description

@songlonqi-java

go 测试代码:

func TestNewPoint(t *testing.T) {
	var spanKV point.KVs
	spanKV = spanKV.AddTag("span_type", "web")  // 使用下划线
	spanKV = spanKV.Add("start", 123, false, false)
	spanKV = spanKV.AddTag("span.type", "local") // 使用点
	spanKV = spanKV.AddTag("status", "ok")
	pt := point.NewPointV2("otel", spanKV, point.DefaultLoggingOptions()...)
	t.Logf("point =%s", pt.LineProto())
}

运行结果:

=== RUN   TestNewPoint
    env_test.go:99: point =otel,span_type=web,span_type=local,status=ok start=123i 1701336381183861331
--- PASS: TestNewPoint (0.00s)
PASS

在测试otel过程中,发现如果行协议的key中带. 那么 数据会发送出去,并且 datakit monitor 也是发送成功,但是页面就是查询不到,dql 也查询不到。 使用 recorder 功能将数据输出到文件才发现的。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions