grapl-security / grapl

Graph platform for Detection and Response
https://www.graplsecurity.com
Apache License 2.0
686 stars 78 forks source link

Rust-proto supports sending grpc metadata #2101

Closed wimax-grapl closed 2 years ago

wimax-grapl commented 2 years ago

Which issue does this PR correspond to?

None.

What changes does this PR make to Grapl? Why?

This is the "right" home for headers like x-trace-id, etc. This will help me trace stuff across requests, like Analyzer Execution Sidecar -> Analyzer -> Graph Query Proxy -> Graph Query

How were these changes tested?

I threw a log line into an analyzer to make sure it gets the trace id (previous x-grpal-trace-id now x-trace-id):

image

codecov[bot] commented 2 years ago

Codecov Report

Base: 35.94% // Head: 35.87% // Decreases project coverage by -0.07% :warning:

Coverage data is based on head (740ad37) compared to base (a730570). Patch coverage: 15.38% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2101 +/- ## ========================================== - Coverage 35.94% 35.87% -0.08% ========================================== Files 300 301 +1 Lines 5416 5430 +14 ========================================== + Hits 1947 1948 +1 - Misses 3469 3482 +13 ``` | [Impacted Files](https://codecov.io/gh/grapl-security/grapl/pull/2101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security) | Coverage Δ | | |---|---|---| | [.../graplinc/grapl/api/event\_source/v1beta1/client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL2V2ZW50X3NvdXJjZS92MWJldGExL2NsaWVudC5ycw==) | `0.00% <ø> (ø)` | | | [...raplinc/grapl/api/graph\_mutation/v1beta1/client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL2dyYXBoX211dGF0aW9uL3YxYmV0YTEvY2xpZW50LnJz) | `0.00% <ø> (ø)` | | | [...c/graplinc/grapl/api/graph\_query/v1beta1/client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL2dyYXBoX3F1ZXJ5L3YxYmV0YTEvY2xpZW50LnJz) | `0.00% <ø> (ø)` | | | [...linc/grapl/api/graph\_query\_proxy/v1beta1/client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL2dyYXBoX3F1ZXJ5X3Byb3h5L3YxYmV0YTEvY2xpZW50LnJz) | `0.00% <ø> (ø)` | | | [...c/grapl/api/graph\_schema\_manager/v1beta1/client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL2dyYXBoX3NjaGVtYV9tYW5hZ2VyL3YxYmV0YTEvY2xpZW50LnJz) | `0.00% <ø> (ø)` | | | [...plinc/grapl/api/organization\_management/v1beta1.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL29yZ2FuaXphdGlvbl9tYW5hZ2VtZW50L3YxYmV0YTEucnM=) | `0.00% <ø> (ø)` | | | [...plinc/grapl/api/pipeline\_ingress/v1beta1/client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL3BpcGVsaW5lX2luZ3Jlc3MvdjFiZXRhMS9jbGllbnQucnM=) | `100.00% <ø> (ø)` | | | [...src/graplinc/grapl/api/plugin\_bootstrap/v1beta1.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL3BsdWdpbl9ib290c3RyYXAvdjFiZXRhMS5ycw==) | `0.00% <ø> (ø)` | | | [...aplinc/grapl/api/plugin\_registry/v1beta1\_client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL3BsdWdpbl9yZWdpc3RyeS92MWJldGExX2NsaWVudC5ycw==) | `0.00% <ø> (ø)` | | | [...c/grapl/api/plugin\_sdk/analyzers/v1beta1/client.rs](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL3BsdWdpbl9zZGsvYW5hbHl6ZXJzL3YxYmV0YTEvY2xpZW50LnJz) | `0.00% <ø> (ø)` | | | ... and [10 more](https://codecov.io/gh/grapl-security/grapl/pull/2101/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.