Skip to content
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

feat: support go to cpp PipelineEventGroup transfer #1771

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Assassin718
Copy link

新增go插件、cpp插件PipelineEventGroup转换

  • 新增描述PipelineEventGroup、LogEvent、MetricEvent、SpanEvent的protobuf
  • go侧增加由go数据结构创建protobuf数据结构的接口
  • cpp侧增加由protobuf数据结构转换成cpp数据结构的接口

core/protobuf/sls/pipeline_event.proto Outdated Show resolved Hide resolved
core/protobuf/sls/pipeline_event.proto Outdated Show resolved Hide resolved
core/protobuf/sls/pipeline_event.proto Outdated Show resolved Hide resolved
core/protobuf/sls/pipeline_event.proto Outdated Show resolved Hide resolved
core/protobuf/sls/pipeline_event.proto Outdated Show resolved Hide resolved
core/go_pipeline/LogtailPlugin.cpp Outdated Show resolved Hide resolved
core/go_pipeline/LogtailPlugin.cpp Outdated Show resolved Hide resolved
core/protobuf/sls/pipeline_event.proto Outdated Show resolved Hide resolved
core/protobuf/sls/pipeline_event.proto Outdated Show resolved Hide resolved
core/go_pipeline/LogtailPlugin.cpp Outdated Show resolved Hide resolved
Comment on lines 58 to +59
core/protobuf/sls/*.pb.*
core/protobuf/models/*.pb.*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两行能不能合并?

core/protobuf/models/log_event.proto Show resolved Hide resolved
Comment on lines +11 to +14
oneof Value {
UntypedSingleValue UntypedSingleValue = 3;
}
map<string, bytes> Tags = 4;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oneof里的编号是必须和外面连续吗?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是必须的

core/protobuf/models/span_event.proto Show resolved Hide resolved
core/go_pipeline/LogtailPlugin.cpp Show resolved Hide resolved
},
}

func CreateLogEvent(t time.Time, enableTimestampNano bool, fields map[string]string) (*protocol.LogEvent, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个和下面ByArray是用来做什么的?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go v1 input是以map形式生成数据的,这里用于直接将map转为proto数据结构

pkg/helper/pipeline_event_helper.go Show resolved Hide resolved
pkg/helper/pipeline_event_helper.go Show resolved Hide resolved
pkg/helper/pipeline_event_helper.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants