-
Notifications
You must be signed in to change notification settings - Fork 441
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
[contrib] add orchestrion integration configuration #3074
Merged
RomainMuller
merged 53 commits into
main
from
romain.marcadier/APPSEC-55160/orchestrion
Jan 20, 2025
Merged
Changes from 8 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
4631a52
[contrib] add orchestrion integration configuration
RomainMuller 6d487dd
WIP: Set up orchestrion integration testing
RomainMuller 4ac23cc
Add CI viz integration test
RomainMuller 6a90e73
Add GLS integration tests
RomainMuller ee47a13
Add harness + gqlgen integration test
RomainMuller d60d93e
Add AWS.v1 tests
RomainMuller 1295f26
Add AWS.v2 tests
RomainMuller 41e9732
Add the rest of integration tests
RomainMuller 882c4c7
Fixup path to requirements-dev.txt
RomainMuller 31fac3e
Add workflow_call trigger to orchestrion workflow
RomainMuller 839cfba
Add option to collect coverage
RomainMuller 435e6ea
Make workflow work when called via workflow_call (event is in foreign…
RomainMuller 03f1102
Quotes around the not
RomainMuller a674731
Check out orchestrion (go get can't necessarily resolve any SHA githu…
RomainMuller 58d4880
Limit test paralellism in ubuntu
RomainMuller 90908d7
support for DD_TRACE_HTTP_CLIENT_ERROR_STATUSES in orchestrion
eliottness 8eecd63
Model phantom dependency of k8s integration
RomainMuller c08bdb7
fix comp errors
eliottness 8d5a38e
s/GetEnv/Getenv/
RomainMuller e0d5d08
Fix linkname directive
RomainMuller f0b349b
Upgrade to latest dependency
RomainMuller 5b36f94
Move with-context HTTP client short-hand functions to http contrib
RomainMuller 39dd8c8
Also put in replace directive for orchestrion/instrument
RomainMuller 92e9603
Don't use line continuations, PWSH does them differently
RomainMuller 59da424
refactor net/http contrib to remove use of orchestrion/instrument
RomainMuller 1228acc
Automatically detect repo & ref from workflow_ref
RomainMuller adf5b9e
Merge remote-tracking branch 'origin/main' into romain.marcadier/APPS…
RomainMuller 65d1133
github.workflow_ref is about the top-level workflow, sadly
RomainMuller 2c40d92
Fix breakage on Windows
RomainMuller efb0ab4
Automatically select go versions to test
RomainMuller 02f0df4
go mod tidy
RomainMuller e01931b
Merge remote-tracking branch 'origin/main' into romain.marcadier/APPS…
RomainMuller 603e9eb
Update go.mod
RomainMuller 246d470
contrib/net/http: move htto client short-hands into a dedicated clien…
RomainMuller cca10ca
fix: update integration tests for contribs to skip subpackages
darccio 08cb209
fix(contrib/sirupsen/logrus): remove output assertion
darccio 965bd82
fix(ddtrace/tracer): update TestSpanFromContext to new SpanFromContex…
darccio db0b477
Add os.OpenFile function to contrib/os
RomainMuller 8128730
Add explanation of what the internal/orchestrion/generator does
RomainMuller 4a44e8a
s/cfg/internalconfig/
RomainMuller c430ae9
rename _.orchestrion.yml to gls.orchestrion.yml
RomainMuller afde3ea
Use non-endlessly-respawing orchestrion release
RomainMuller ada7401
Explicitly go mod download
RomainMuller c5fc0a1
Try to troubleshoot integration tests failure
RomainMuller cca226f
Force CGO_ENABLED
RomainMuller abbb144
Print out complete go env
RomainMuller b2c8d4c
Remove explicit CGO_ENABLED setting
RomainMuller 9507c38
use go mod tidy instead of go mod download
RomainMuller beb36c6
Also run linter in integration package directory
RomainMuller 508b9e5
Merge remote-tracking branch 'origin/main' into romain.marcadier/APPS…
RomainMuller 2a8b0d4
Okay got it now :)
RomainMuller 6e09796
Add matrix join point
RomainMuller 0dd7466
Merge branch 'main' into romain.marcadier/APPSEC-55160/orchestrion
RomainMuller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed | ||
# under the Apache License Version 2.0. | ||
# This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
# Copyright 2023-present Datadog, Inc. | ||
--- | ||
# yaml-language-server: $schema=https://datadoghq.dev/orchestrion/schema.json | ||
meta: | ||
name: gopkg.in/DataDog/dd-trace-go.v1/contrib/99designs/gqlgen | ||
description: gqlgen is a Go library for building GraphQL servers without any fuss. | ||
|
||
aspects: | ||
- id: New | ||
join-point: | ||
one-of: | ||
- function-call: github.com/99designs/gqlgen/graphql/handler.New | ||
- function-call: github.com/99designs/gqlgen/graphql/handler.NewDefaultServer | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
handler: github.com/99designs/gqlgen/graphql/handler | ||
gqlgentrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/99designs/gqlgen | ||
template: |- | ||
func(s *handler.Server) *handler.Server { | ||
s.Use(gqlgentrace.NewTracer()) | ||
return s | ||
}({{ . }}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed | ||
# under the Apache License Version 2.0. | ||
# This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
# Copyright 2023-present Datadog, Inc. | ||
--- | ||
# yaml-language-server: $schema=https://datadoghq.dev/orchestrion/schema.json | ||
meta: | ||
name: gopkg.in/DataDog/dd-trace-go.v1/contrib/IBM/sarama.v1 | ||
description: Sarama is a Go library for Apache Kafka | ||
|
||
aspects: | ||
- id: NewConsumer | ||
join-point: | ||
one-of: | ||
- function-call: github.com/IBM/sarama.NewConsumer | ||
- function-call: github.com/IBM/sarama.NewConsumerClient | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
saramatrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/IBM/sarama.v1 | ||
sarama: github.com/IBM/sarama | ||
template: |- | ||
func(c sarama.Consumer, err error) (sarama.Consumer, error) { | ||
if c != nil { | ||
c = saramatrace.WrapConsumer(c) | ||
} | ||
return c, err | ||
}({{ . }}) | ||
|
||
- id: NewSyncProducer | ||
join-point: | ||
one-of: | ||
- function-call: github.com/IBM/sarama.NewSyncProducer | ||
- function-call: github.com/IBM/sarama.NewSyncProducerFromClient | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
saramatrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/IBM/sarama.v1 | ||
sarama: github.com/IBM/sarama | ||
template: |- | ||
{{- $cfg := .Function.ArgumentOfType "sarama.Config" -}} | ||
func(p sarama.SyncProducer, err error) (sarama.SyncProducer, error) { | ||
if p != nil { | ||
p = saramatrace.WrapSyncProducer( | ||
{{- if $cfg -}} | ||
{{ $cfg }}, | ||
{{- else -}} | ||
nil, | ||
{{- end -}} | ||
p, | ||
) | ||
} | ||
return p, err | ||
}({{ . }}) | ||
|
||
- id: NewAsyncProducer | ||
join-point: | ||
one-of: | ||
- function-call: github.com/IBM/sarama.NewAsyncProducer | ||
- function-call: github.com/IBM/sarama.NewAsyncProducerFromClient | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
saramatrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/IBM/sarama.v1 | ||
sarama: github.com/IBM/sarama | ||
template: |- | ||
{{- $cfg := .Function.ArgumentOfType "sarama.Config" -}} | ||
func(p sarama.AsyncProducer, err error) (sarama.AsyncProducer, error) { | ||
if p != nil { | ||
p = saramatrace.WrapAsyncProducer( | ||
{{- if $cfg -}} | ||
{{ $cfg }}, | ||
{{- else -}} | ||
nil, | ||
{{- end -}} | ||
p, | ||
) | ||
} | ||
return p, err | ||
}({{ . }}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed | ||
# under the Apache License Version 2.0. | ||
# This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
# Copyright 2023-present Datadog, Inc. | ||
--- | ||
# yaml-language-server: $schema=https://datadoghq.dev/orchestrion/schema.json | ||
meta: | ||
name: gopkg.in/DataDog/dd-trace-go.v1/contrib/Shopify/sarama | ||
description: Sarama is a Go library for Apache Kafka | ||
|
||
aspects: | ||
- id: NewConsumer | ||
join-point: | ||
one-of: | ||
- function-call: github.com/Shopify/sarama.NewConsumer | ||
- function-call: github.com/Shopify/sarama.NewConsumerClient | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
saramatrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/Shopify/sarama | ||
sarama: github.com/Shopify/sarama | ||
template: |- | ||
func(c sarama.Consumer, err error) (sarama.Consumer, error) { | ||
if c != nil { | ||
c = saramatrace.WrapConsumer(c) | ||
} | ||
return c, err | ||
}({{ . }}) | ||
|
||
- id: NewSyncProducer | ||
join-point: | ||
one-of: | ||
- function-call: github.com/Shopify/sarama.NewSyncProducer | ||
- function-call: github.com/Shopify/sarama.NewSyncProducerFromClient | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
saramatrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/Shopify/sarama | ||
sarama: github.com/Shopify/sarama | ||
template: |- | ||
{{- $cfg := .Function.ArgumentOfType "sarama.Config" -}} | ||
func(p sarama.SyncProducer, err error) (sarama.SyncProducer, error) { | ||
if p != nil { | ||
p = saramatrace.WrapSyncProducer( | ||
{{- if $cfg -}} | ||
{{ $cfg }}, | ||
{{- else -}} | ||
nil, | ||
{{- end -}} | ||
p, | ||
) | ||
} | ||
return p, err | ||
}({{ . }}) | ||
|
||
- id: NewAsyncProducer | ||
join-point: | ||
one-of: | ||
- function-call: github.com/Shopify/sarama.NewAsyncProducer | ||
- function-call: github.com/Shopify/sarama.NewAsyncProducerFromClient | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
saramatrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/Shopify/sarama | ||
sarama: github.com/Shopify/sarama | ||
template: |- | ||
{{- $cfg := .Function.ArgumentOfType "sarama.Config" -}} | ||
func(p sarama.AsyncProducer, err error) (sarama.AsyncProducer, error) { | ||
if p != nil { | ||
p = saramatrace.WrapAsyncProducer( | ||
{{- if $cfg -}} | ||
{{ $cfg }}, | ||
{{- else -}} | ||
nil, | ||
{{- end -}} | ||
p, | ||
) | ||
} | ||
return p, err | ||
}({{ . }}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed | ||
# under the Apache License Version 2.0. | ||
# This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
# Copyright 2023-present Datadog, Inc. | ||
--- | ||
# yaml-language-server: $schema=https://datadoghq.dev/orchestrion/schema.json | ||
meta: | ||
name: gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws | ||
description: The official AWS SDK for Go | ||
|
||
aspects: | ||
- id: Config | ||
join-point: | ||
struct-literal: | ||
type: github.com/aws/aws-sdk-go-v2/aws.Config | ||
match: value-only | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
awstrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws | ||
aws: github.com/aws/aws-sdk-go-v2/aws | ||
template: |- | ||
func(cfg aws.Config) (aws.Config) { | ||
awstrace.AppendMiddleware(&cfg) | ||
return cfg | ||
}({{ . }}) | ||
|
||
- id: '*Config' | ||
join-point: | ||
one-of: | ||
- struct-literal: | ||
type: github.com/aws/aws-sdk-go-v2/aws.Config | ||
match: pointer-only | ||
- function-call: github.com/aws/aws-sdk-go-v2/aws.NewConfig | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
awstrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go-v2/aws | ||
aws: github.com/aws/aws-sdk-go-v2/aws | ||
template: |- | ||
func(cfg *aws.Config) (*aws.Config) { | ||
awstrace.AppendMiddleware(cfg) | ||
return cfg | ||
}({{ . }}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed | ||
# under the Apache License Version 2.0. | ||
# This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
# Copyright 2023-present Datadog, Inc. | ||
--- | ||
# yaml-language-server: $schema=https://datadoghq.dev/orchestrion/schema.json | ||
meta: | ||
name: gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go/aws | ||
description: The official AWS SDK for Go | ||
|
||
aspects: | ||
- id: session.NewSession | ||
join-point: | ||
function-call: github.com/aws/aws-sdk-go/aws/session.NewSession | ||
advice: | ||
- wrap-expression: | ||
imports: | ||
awstrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/aws/aws-sdk-go/aws | ||
session: github.com/aws/aws-sdk-go/aws/session | ||
template: |- | ||
func(sess *session.Session, err error) (*session.Session, error) { | ||
if sess != nil { | ||
sess = awstrace.WrapSession(sess) | ||
} | ||
return sess, err | ||
}({{ . }}) | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Code Vulnerability
Workflow depends on a GitHub actions pinned by tag (...read more)