DataDog / orchestrion

Automatic compile-time instrumentation of Go code
http://datadoghq.dev/orchestrion/
Apache License 2.0
159 stars 5 forks source link

feat: support for GraphQL integrations #310

Closed RomainMuller closed 1 month ago

RomainMuller commented 1 month ago

Added support for the available GraphQL integrations in the tracer library:

Also - fixed a bug in the line offset normalization that could result in incorrectly labeling modified file lines when a single-statement block was written as a one-liner; due to incorrectly assigning synthetic spacing at the start of it.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 99.69325% with 1 line in your changes missing coverage. Please review.

Project coverage is 58.55%. Comparing base (d19e74d) to head (44c1771). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/injector/aspect/advice/call.go 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #310 +/- ## =========================================== - Coverage 73.92% 58.55% -15.38% =========================================== Files 146 151 +5 Lines 7966 10973 +3007 =========================================== + Hits 5889 6425 +536 - Misses 1640 4061 +2421 - Partials 437 487 +50 ``` | [Components](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [Generators](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `76.98% <ø> (ø)` | | | [Instruments](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `88.05% <ø> (ø)` | | | [Go Driver](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `72.81% <ø> (ø)` | | | [Toolexec Driver](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `70.88% <ø> (ø)` | | | [Aspects](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `70.85% <66.66%> (-0.03%)` | :arrow_down: | | [Injector](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `73.14% <75.00%> (-0.02%)` | :arrow_down: | | [Job Server](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `68.13% <ø> (+4.40%)` | :arrow_up: | | [Integration Test Suite](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `48.49% <100.00%> (-39.26%)` | :arrow_down: | | [Other](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `58.55% <99.69%> (-15.38%)` | :arrow_down: | | [Files with missing lines](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [...ests/99designs.gqlgen/generated/graph/generated.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?src=pr&el=tree&filepath=_integration-tests%2Ftests%2F99designs.gqlgen%2Fgenerated%2Fgraph%2Fgenerated.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzLzk5ZGVzaWducy5ncWxnZW4vZ2VuZXJhdGVkL2dyYXBoL2dlbmVyYXRlZC5nbw==) | `5.40% <ø> (ø)` | | | [...designs.gqlgen/generated/graph/schema.resolvers.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?src=pr&el=tree&filepath=_integration-tests%2Ftests%2F99designs.gqlgen%2Fgenerated%2Fgraph%2Fschema.resolvers.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzLzk5ZGVzaWducy5ncWxnZW4vZ2VuZXJhdGVkL2dyYXBoL3NjaGVtYS5yZXNvbHZlcnMuZ28=) | `100.00% <100.00%> (ø)` | | | [...integration-tests/tests/99designs.gqlgen/gqlgen.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?src=pr&el=tree&filepath=_integration-tests%2Ftests%2F99designs.gqlgen%2Fgqlgen.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzLzk5ZGVzaWducy5ncWxnZW4vZ3FsZ2VuLmdv) | `100.00% <100.00%> (ø)` | | | [...ntegration-tests/tests/graph-gophers/graphql-go.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fgraph-gophers%2Fgraphql-go.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL2dyYXBoLWdvcGhlcnMvZ3JhcGhxbC1nby5nbw==) | `100.00% <100.00%> (ø)` | | | [\_integration-tests/tests/graphql-go/graphql.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?src=pr&el=tree&filepath=_integration-tests%2Ftests%2Fgraphql-go%2Fgraphql.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-X2ludGVncmF0aW9uLXRlc3RzL3Rlc3RzL2dyYXBocWwtZ28vZ3JhcGhxbC5nbw==) | `100.00% <100.00%> (ø)` | | | [internal/injector/lineinfo/canonicalize.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?src=pr&el=tree&filepath=internal%2Finjector%2Flineinfo%2Fcanonicalize.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-aW50ZXJuYWwvaW5qZWN0b3IvbGluZWluZm8vY2Fub25pY2FsaXplLmdv) | `100.00% <100.00%> (ø)` | | | [internal/injector/aspect/advice/call.go](https://app.codecov.io/gh/DataDog/orchestrion/pull/310?src=pr&el=tree&filepath=internal%2Finjector%2Faspect%2Fadvice%2Fcall.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#diff-aW50ZXJuYWwvaW5qZWN0b3IvYXNwZWN0L2FkdmljZS9jYWxsLmdv) | `75.71% <66.66%> (-0.38%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/DataDog/orchestrion/pull/310/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)