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

Support Protocol Dubbo2 #184

Merged
merged 14 commits into from
May 12, 2022
Merged

Conversation

hocktea214
Copy link
Collaborator

@hocktea214 hocktea214 commented Apr 19, 2022

Description

The changes of config.yaml

  1. Remove http_payload_length
  2. Add payload_length in protocol_config for all protocols
  3. Add dubbo in protocol_parser
  4. Net-adapter support to export dubbo info
  5. Update Prometheus Metrics documents

Related Issue

#175 #202

Motivation and Context

Support Dubbo2 Protocol Parser

How Has This Been Tested?

Run the unit test under collector/analyzer/network and the result is as follows.

=== RUN   TestHttpProtocol
=== RUN   TestHttpProtocol/slowData
=== RUN   TestHttpProtocol/errorData
=== RUN   TestHttpProtocol/normal
--- PASS: TestHttpProtocol (0.00s)
    --- PASS: TestHttpProtocol/slowData (0.00s)
    --- PASS: TestHttpProtocol/errorData (0.00s)
    --- PASS: TestHttpProtocol/normal (0.00s)
=== RUN   TestMySqlProtocol
=== RUN   TestMySqlProtocol/query-split
=== RUN   TestMySqlProtocol/query
--- PASS: TestMySqlProtocol (0.00s)
    --- PASS: TestMySqlProtocol/query-split (0.00s)
    --- PASS: TestMySqlProtocol/query (0.00s)
=== RUN   TestRedisProtocol
=== RUN   TestRedisProtocol/get
--- PASS: TestRedisProtocol (0.00s)
    --- PASS: TestRedisProtocol/get (0.00s)
=== RUN   TestDnsProtocol
=== RUN   TestDnsProtocol/multi
--- PASS: TestDnsProtocol (0.00s)
    --- PASS: TestDnsProtocol/multi (0.00s)
=== RUN   TestKafkaProtocol
=== RUN   TestKafkaProtocol/produce-split
=== RUN   TestKafkaProtocol/fetch-split
=== RUN   TestKafkaProtocol/fetch-one-topic-two-patitions
--- PASS: TestKafkaProtocol (0.00s)
    --- PASS: TestKafkaProtocol/produce-split (0.00s)
    --- PASS: TestKafkaProtocol/fetch-split (0.00s)
    --- PASS: TestKafkaProtocol/fetch-one-topic-two-patitions (0.00s)
=== RUN   TestDubboProtocol
=== RUN   TestDubboProtocol/shortData
--- PASS: TestDubboProtocol (0.00s)
    --- PASS: TestDubboProtocol/shortData (0.00s)
PASS

The changes of config.yaml
1. Remove http_payload_length
2. Add payload_length in protocol_config for all protocols
3. Add dubbo in protocol_parser

Dubbo Request Output:
1. content_key
2. request_payload

Dubbo Response Output:
1. dubbo_error_code
2. response_payload
3. is_error
4. error_type

Signed-off-by: huxiangyuan <huxiangyuan@harmonycloud.cn>
@hocktea214 hocktea214 requested a review from dxsup April 19, 2022 01:52
@dxsup dxsup marked this pull request as draft April 19, 2022 02:11
@NeJan2020 NeJan2020 marked this pull request as ready for review April 29, 2022 06:39
@NeJan2020 NeJan2020 changed the title WIP: Support Protocol Dubbo2 Support Protocol Dubbo2 Apr 29, 2022
@NeJan2020 NeJan2020 changed the title Support Protocol Dubbo2 WIP: Support Protocol Dubbo2 Apr 29, 2022
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
@NeJan2020 NeJan2020 changed the title WIP: Support Protocol Dubbo2 Support Protocol Dubbo2 Apr 29, 2022
docs/prometheus_metrics.md Outdated Show resolved Hide resolved
docs/prometheus_metrics.md Outdated Show resolved Hide resolved
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
@dxsup
Copy link
Member

dxsup commented Apr 29, 2022

Failed to build http/http_parser_test.go due to the changes.

# github.com/Kindling-project/kindling/collector/analyzer/network/protocol/http [github.com/Kindling-project/kindling/collector/analyzer/network/protocol/http.test]
http/http_parser_test.go:99:13: undefined: protocol.SetHttpPayLoadLength
http/http_parser_test.go:127:13: undefined: protocol.SetHttpPayLoadLength

NeJan2020 added 5 commits May 5, 2022 09:44
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
…ethod `GetPayloadLength(protocol string)`

Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
NeJan2020 and others added 2 commits May 11, 2022 09:57
# Conflicts:
#	collector/consumer/exporter/otelexporter/defaultadapter/label_converter_test.go
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>

# Conflicts:
#	docs/prometheus_metrics.md
Copy link
Member

@dxsup dxsup 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 1a2ead6 into KindlingProject:main May 12, 2022
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.

3 participants