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

Add request/response payload of Redis to span data #325

Merged
merged 4 commits into from
Sep 27, 2022

Conversation

dxsup
Copy link
Member

@dxsup dxsup commented Sep 22, 2022

Description

  • Add the fields request_payload and response_payload to the DataGroup in networkanalyzer.
  • Add these fields to span in net_dict.

Motivation and Context

Now there is a field called "redis.command" which is enough for metrics. But for span data, users want to know which key the command is operating and what value it is. So the detailed information is added to the span data, which is named payload.

How Has This Been Tested?

go test -v network_analyzer_test.go network_analyzer.go config.go message_pair.go metric.go gauge_pool.go 

=== RUN   TestHttpProtocol
=== RUN   TestHttpProtocol/slowData
=== RUN   TestHttpProtocol/errorData
=== RUN   TestHttpProtocol/split
=== RUN   TestHttpProtocol/normal
--- PASS: TestHttpProtocol (0.01s)
    --- PASS: TestHttpProtocol/slowData (0.00s)
    --- PASS: TestHttpProtocol/errorData (0.00s)
    --- PASS: TestHttpProtocol/split (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.01s)
    --- 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.01s)
    --- 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
ok      command-line-arguments  0.071s

Daxin Wang added 2 commits September 22, 2022 11:15
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Daxin Wang added 2 commits September 22, 2022 13:56
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
@dxsup dxsup merged commit 252d213 into KindlingProject:main Sep 27, 2022
@dxsup dxsup deleted the feat/add-redis-payload branch September 27, 2022 05:36
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