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

Implement self-metrics using opentelemetry for cgoreceiver #269

Merged

Conversation

dxsup
Copy link
Member

@dxsup dxsup commented Jun 28, 2022

Description

Implement metrics of kindling_telemetry_cgoreceiver_events_total and kindling_telemetry_cgoreceiver_channel_size using opentelemetry for cgoreceiver.

How Has This Been Tested?

Unit test.

=== RUN   TestCounterMutexMap
--- PASS: TestCounterMutexMap (1.07s)
=== RUN   TestCounterRwMutexMap
--- PASS: TestCounterRwMutexMap (1.39s)
=== RUN   TestCounterIntCombination
--- PASS: TestCounterIntCombination (0.23s)
=== RUN   TestCounterRwAtomicMap
--- PASS: TestCounterRwAtomicMap (0.36s)
PASS
ok      command-line-arguments  4.145s

Benchmark result. We are using RwAtomicMap.

goos: darwin
goarch: amd64
cpu: Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
BenchmarkCounterMutexMap
BenchmarkCounterMutexMap-4                   172           6849760 ns/op
BenchmarkCounterRwMutexMap
BenchmarkCounterRwMutexMap-4                 126           9374031 ns/op
BenchmarkCounterIntCombination
BenchmarkCounterIntCombination-4            1173           1119354 ns/op
BenchmarkCounterOtelCounter
BenchmarkCounterOtelCounter-4                 45          27502518 ns/op
BenchmarkCounterRwAtomicMap
BenchmarkCounterRwAtomicMap-4                772           1652800 ns/op
PASS
ok      command-line-arguments  7.634s

Daxin Wang added 2 commits June 28, 2022 10:28
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
@dxsup dxsup requested a review from NeJan2020 June 28, 2022 02:48
Copy link
Collaborator

@NeJan2020 NeJan2020 left a comment

Choose a reason for hiding this comment

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

LGTM

@dxsup dxsup merged commit bd9ba7e into KindlingProject:main Jun 28, 2022
@dxsup dxsup deleted the feature/add-self-metrics-cgoreceiver branch June 28, 2022 08:23
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