-
Notifications
You must be signed in to change notification settings - Fork 183
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
update: use cgo instead of uds #264
Conversation
Signed-off-by: sangyangji <songyujie@zju.edu.cn>
Signed-off-by: jundizhou <jundizhou@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
convert the cgo event to the KindlingEvent
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
using a channel to store the events
Signed-off-by: jundizhou <jundizhou@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
func (r *CgoReceiver) printMetrics() { | ||
timer := time.NewTicker(1 * time.Second) | ||
r.shutdownWG.Add(1) | ||
for { | ||
select { | ||
case <-r.stopCh: | ||
r.shutdownWG.Done() | ||
return | ||
case <-timer.C: | ||
r.telemetry.Logger.Info("Total number events received: ", zap.Int("events", r.eventCount)) | ||
r.eventCount = 0 | ||
r.telemetry.Logger.Info("Current channel size: ", zap.Int("channel size", len(r.eventChannel))) | ||
} | ||
} |
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.
Was that necessary to print this Metric every second
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, I will open another PR to introduce opentelemetry to record metrics.
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
deploy/agent/kindling-deploy.yml
Outdated
- cat | ||
- /opt/kernel-support | ||
initialDelaySeconds: 5 | ||
periodSeconds: 5 | ||
- cat | ||
- /opt/kernel-support |
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.
Why not keep the initialDelaySeconds
and periodSeconds
?
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.
Yes, we should.
cd probe/build | ||
cmake -DBUILD_DRIVER=OFF -DPROBE_VERSION=0.1.1dev .. | ||
make |
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.
It seems we have to set the PROBE_VERSION
manually.
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.
There will be another PR to improve it.
deploy/scripts/build.sh
Outdated
cd ../../collector/ | ||
go build | ||
collectorPath="./collector" | ||
if [ ! -f "$collectorPath" ]; then |
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.
We need the CodeVersion
of the collector either.
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.
Using the collector-version-build.sh
to replace go build
deploy/agent/kindling-deploy.yml
Outdated
- name: kindling-probe | ||
image: kindlingproject/kindling-probe:latest | ||
- name: kindling-collector | ||
image: registry.cn-hangzhou.aliyuncs.com/zjd-kindling/zjdkindling:new1 | ||
imagePullPolicy: Always |
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.
We should not use a personal image
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Description
probe:
Sending data using CGO mode
Update struct of kindlingEvent
Remove probe Dockerfile
Remove probe compiler's scripts
Use cmake instead of bazel
collector:
Receiver data using CGO mode
Update Dockerfile
Update compiler scripts
How Has This Been Tested?
recompiler and test all
for issue #265