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

[Draft; don't merge] v2.0.0-rc #2427

Draft
wants to merge 726 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
726 commits
Select commit Hold shift + click to select a range
8c9ac05
v2/contrib/google.golang.org/api: stable dependencies
darccio Mar 12, 2024
cbdabd0
v2/contrib/google.golang.org/api: revert google.golang.org/api back t…
darccio Mar 12, 2024
5ff3b32
v2/contrib/net/http: avoid mocktracer in BenchmarkHttpServeTrace
darccio Mar 12, 2024
fc1f329
Merge remote-tracking branch 'origin/main' into v2-dev
darccio Mar 13, 2024
62e6edb
go.mod: go mod tidy
darccio Mar 13, 2024
39d29bd
v2/contrib/99designs/gqlgen: fix contrib
darccio Mar 13, 2024
0730ca1
FAQ.md: replace WithServiceName by WithService
darccio Mar 13, 2024
163dd88
internal/contrib/options: add Expand function to handle reduced alloc…
darccio Mar 15, 2024
301b62d
v2/contrib: upgrade dd-trace-go/v2 & contribs
darccio Mar 15, 2024
68e1ad2
ci: trigger
darccio Mar 19, 2024
a81194e
ddtrace/tracer: use options.Expand in StartSpanFromContext
darccio Mar 20, 2024
1559d0b
internal/contrib/httptrace: improve memory management in StartRequest…
darccio Mar 20, 2024
7ebff8f
v2/contrib/confluentinc/confluent-kafka-go/kafka*: skip nil options
darccio Mar 20, 2024
224a0bc
chore(otel): adds an API for generating span links (#2614)
mabdinur Mar 21, 2024
918fafc
.github/workflows: fix v2-dev nightly tests
darccio Mar 22, 2024
3ad51a7
internal/contrib/options: fix import cycle
darccio Mar 22, 2024
5b596d3
Merge remote-tracking branch 'origin' into v2-dev
darccio Mar 22, 2024
1694bdb
ddtrace/tracer: fix tests
darccio Mar 25, 2024
c4cfc74
v2/contrib/google.golang.org/grpc: fix tests
darccio Mar 25, 2024
29a213f
Merge remote-tracking branch 'origin/main' into v2-dev
darccio Mar 25, 2024
7fc215e
ddtrace/tracer: create JSON rule in {Span,Trace}SamplingRules
darccio Mar 25, 2024
55cf688
.github/workflows: don't exit on test failure
darccio Mar 25, 2024
09c1b4f
.github/workflows: don't pass a value to run smoke tests in v2
darccio Mar 25, 2024
8af9f77
internal/apps/setup-smoke-test: use go work vendor instead of go mod …
darccio Mar 25, 2024
9562112
internal/apps/setup-smoke-test: revert using go work vendor instead o…
darccio Mar 25, 2024
e062db3
internal/apps/setup-smoke-test: use go work vendor ONLY IN 1.22 inste…
darccio Mar 25, 2024
6f9f98f
internal/apps/setup-smoke-test: add $go argument in corresponding bui…
darccio Mar 25, 2024
42807ee
.github/workflows: disable reviewdog
darccio Mar 25, 2024
a36ab4e
Merge remote-tracking branch 'origin/main' into v2-dev
darccio Mar 27, 2024
21c31dc
v2/contrib/database/sql: set WithDBStats to return OptionFn
darccio Mar 27, 2024
efa4ba6
v1internal: remove statsd carrier stuff
darccio Mar 27, 2024
be6407b
ddtrace/tracer: use localhost instead of my-host in TestTracerOptions…
darccio Mar 27, 2024
8d1ea11
Merge remote-tracking branch 'origin/main' into v2-dev
darccio Apr 8, 2024
c8ff8d7
ddtrace/tracer: remove Span.Tag function (reverts #2523)
darccio Apr 8, 2024
75c8781
v2/contrib/segmentio/kafka-go: fix WithDataStreams option signature
darccio Apr 8, 2024
f0eee6a
[v2] ddtrace/tracer: tidy up Tracer interface (#2633)
darccio May 8, 2024
1422d9c
tools/v2check: implement migration tool with all the required changes…
darccio May 16, 2024
ddac629
Merge branch main into v2-dev
darccio May 16, 2024
8d6fa2b
Merge remote-tracking branch 'origin' into v2-dev
darccio May 16, 2024
1bc2693
go.mod: upgrade to Go 1.20 & latest dd-trace-go/v2*
darccio May 17, 2024
532a55a
go.mod: add missing dependency to github.com/DataDog/dd-trace-go/v2/c…
darccio May 17, 2024
13caae9
chore: preparing for releasing submodules as v2
darccio May 21, 2024
5c87628
v2/contrib: remove v2 directory, move contrib to root
darccio May 21, 2024
13d2706
internal/appsec: remove contrib/net/http dependency
darccio May 21, 2024
32c9fe4
chore: fix contribs go.mod
darccio May 21, 2024
0d5f5a7
go.mod: remove google.golang.org/grpc
darccio May 22, 2024
916fe91
go.mod: go mod tidy
darccio Jul 2, 2024
602736a
contrib/**/**/go.mod: use replace directives to allow access to inter…
darccio Jul 10, 2024
b479415
contrib/**/**/go.mod: use v2.0.0 prefix everywhere
darccio Jul 10, 2024
3f7f527
v2: contrib/README: add versioning and deprecation policies for contr…
darccio Jul 12, 2024
e10036e
Contrib API proposal (#2768)
darccio Aug 28, 2024
c74f122
Merge remote-tracking branch 'origin' into v2-dev
darccio Aug 30, 2024
be74232
fix(test.sh): use "docker compose" instead of "docker-compose"
darccio Sep 2, 2024
7a32e40
fix(internal/civisibility): ensure mocktracer doesn't reset on stop
darccio Sep 2, 2024
5f4149c
fix(internal/civisibility): align gotesting to main
darccio Sep 2, 2024
47c2b19
chore: sync go.mod from main
darccio Sep 2, 2024
15f200b
Merge branch 'main' into v2-dev
darccio Sep 2, 2024
9879839
chore(CONTRIBUTING.md): fix contrib URL
darccio Sep 2, 2024
2a85f26
chore: update dd-trace-go and contribs
darccio Sep 2, 2024
6e92fdc
Merge branch 'v2-dev' of github.com:DataDog/dd-trace-go into v2-dev
darccio Sep 2, 2024
eea74d2
chore(mocktracer): remove fmt.Printf call
darccio Sep 2, 2024
8c646bb
fix(contrib/uptrace/bun): use DDServiceV0
darccio Sep 2, 2024
bb94c3e
fix(contrib/net/http): avoid race condition on request value
darccio Sep 2, 2024
4d3fad6
fix(contrib/labstack/echo.v4): sync with main
darccio Sep 2, 2024
72a0c0d
fix(ddtrace/tracer): don't use unknown hostnames for DD_AGENT_HOST in…
darccio Sep 2, 2024
6c152b2
fix(contrib/IBM/sarama): sync with main
darccio Sep 3, 2024
7cb6a69
fix(ddtrace/tracer): don't use unknown hostnames for DD_AGENT_HOST in…
darccio Sep 3, 2024
423fc6b
Merge remote-tracking branch 'origin' into v2-dev
darccio Sep 3, 2024
770a2e5
fix(contrib/{log/slog,net/http}): use testutils.DiscardLogger
darccio Sep 3, 2024
fb987a0
fix(contrib): replace ext.Error with ext.ErrorMsg on errors related a…
darccio Sep 3, 2024
35cbab0
fix(contrib/labstack/echo.v4): use DDServiceV0
darccio Sep 3, 2024
7c5699a
fix(contrib/gocql/gocql): fix expected value's type for ext.Cassandra…
darccio Sep 3, 2024
8746ff7
fix(internal/exectracetest): add to go.work and refactor internal/htt…
darccio Sep 3, 2024
be674c4
fix(contrib/labstack/echo.v4): set instrumentation package value to l…
darccio Sep 4, 2024
d606adb
fix(workflows/apps): set +e to avoid aborting contrib tests if any of…
darccio Sep 4, 2024
fd670e0
fix(internal/appsec): move httptracemock into instrumentation and Tes…
darccio Sep 5, 2024
db54771
copyright job needs go installed
ajgajg1134 Sep 4, 2024
695c69d
chore: go mod tidy
darccio Sep 5, 2024
f0d7a1d
Merge branch 'main' into v2-dev
darccio Sep 5, 2024
f49348a
feat(workflows/apps): report failure of any test in test-contrib-subm…
darccio Sep 5, 2024
4749ec8
chore: go generate ./...
darccio Sep 5, 2024
e519264
fix(ddtrace/tracer): update flushed bytes in writer tests
darccio Sep 6, 2024
a690433
fix(benchmarks): add canary file so benchmark platform can run
darccio Sep 6, 2024
95b77a5
fix(contrib/IBM/sarama): adapt tests to handle smoke tests
darccio Sep 6, 2024
c0d1af6
chore(benchmarks): use dario.castane/remove-v2-prefix-paths as benchm…
darccio Sep 6, 2024
0bc07d4
Merge remote-tracking branch 'origin' into v2-dev
darccio Sep 6, 2024
ac25f73
fix(civisibility): change dd-trace-go import URLs
darccio Sep 6, 2024
84db89c
chore: skip Orchestrion tests
darccio Sep 6, 2024
fcbd7f9
fix: skip UDS test in Windows
darccio Sep 6, 2024
9114f56
fix(workflows): fix checkout step for parametric tests
darccio Sep 6, 2024
644cdb0
fix(workflows): try to avoid ref overriding
darccio Sep 6, 2024
9c112db
fix(workflows): remove branch_ref from parametric tests
darccio Sep 6, 2024
37a04b0
fix(workflows): report any failing contrib test in appsec tests
darccio Sep 6, 2024
d23f879
refactor(.github/workflows): skip gin tests when GOEXPERIMENT=cgocheck2
darccio Sep 6, 2024
d66cefc
fix(.github/workflows): fix conditional for skipping gin tests
darccio Sep 6, 2024
d1f31b7
fix(contrib/database/sql): replace glebarez/go-sqlite by modernc/sqli…
darccio Sep 9, 2024
4d4e39d
chore: update dd-trace-go in contribs
darccio Sep 9, 2024
c452671
Merge remote-tracking branch 'origin' into v2-dev
darccio Sep 9, 2024
648c291
chore: update dd-trace-go in contribs (again)
darccio Sep 9, 2024
5b4715c
fix: remove unneeded SQL driver
darccio Sep 9, 2024
41aa615
chore: go mod tidy
darccio Sep 9, 2024
b075389
fix(mocktracer): add missing assertions in TestTracerStatSpan tests
darccio Sep 13, 2024
f251ab8
feat(v1internal): temporary exposal for {,Set}DogstatsdAddr
darccio Sep 17, 2024
8a0def8
feat(v1internal): temporary exposal for {,Set}StatsTags
darccio Sep 17, 2024
28e8581
feat: support for _dd.stack meta struct value set by v1 shim
darccio Sep 18, 2024
132386d
fix: avoid panic on nil casted propagator due to v1 wrapper
darccio Sep 18, 2024
7d4b68c
chore(profiler): sync upload code with main
darccio Sep 18, 2024
ecbf69a
feat: support for v1 shim's contribs
darccio Oct 3, 2024
b42729d
feat: add another batch of v1 shim's contribs
darccio Oct 3, 2024
1843e7b
v2: fix divergent changes (#2879)
hannahkm Oct 7, 2024
4bdbe4c
v2: remove sampling priority (#2906)
hannahkm Oct 9, 2024
433fb7a
fix: improve v1 deprecated contribs' support
darccio Oct 9, 2024
6a6d3c0
refactor(v1internal): drop globalconfig & normalizer code
darccio Oct 9, 2024
4b68ec8
Merge branch 'v2-dev' of github.com:DataDog/dd-trace-go into v2-dev
darccio Oct 9, 2024
c89ace4
refactor(contrib/google.golang.org/grpc): remove applyStream
darccio Oct 9, 2024
7c95d5c
feat(instrumentation/testutils): SetPropagatingTags implemented for v…
darccio Oct 10, 2024
3f96da4
refactor(v1internal): reduce exposed APIs
darccio Oct 10, 2024
fc7865f
fix(kafka.v2) wrong import line
hannahkm Oct 11, 2024
aae338a
merge main into v2 (#2930)
hannahkm Oct 21, 2024
f2acfa7
mark branch as merged
hannahkm Oct 21, 2024
4a17681
update go mod
hannahkm Oct 24, 2024
69a858e
v2: merge main into v2 again (#2937)
hannahkm Oct 31, 2024
72188bb
marking v2 as merged
hannahkm Oct 31, 2024
d24bdec
v2: finalize migration tool for v2 (#2914)
hannahkm Oct 31, 2024
d38ce54
update migration md
hannahkm Oct 31, 2024
0dbfdf7
feat: use dd tracing libraries in all examples in contrib
hannahkm Oct 31, 2024
e5bf967
add example for globalsign mgo
hannahkm Oct 31, 2024
350ef22
fix(docker-compose): remove Git merging tags
darccio Nov 4, 2024
e35eba2
fix import url migration tests
hannahkm Nov 4, 2024
d12310b
fix: remove internal pubsub pkg
hannahkm Nov 4, 2024
5abf2a5
fix(v2check): resolve incorrect urls
hannahkm Nov 4, 2024
25601cd
chore: go mod tidy
darccio Nov 5, 2024
3808637
chore(internal/version): bump to v2.0.0-beta.6
darccio Nov 5, 2024
65abd19
chore: bump dd-trace-go to v2.0.0-beta.6
darccio Nov 5, 2024
19d6441
chore: bump dd-trace-go to v2.0.0-beta.6 for dependent nested modules…
darccio Nov 5, 2024
cd6d42a
fix(aws): consistent trace usage in test
hannahkm Nov 5, 2024
43534f2
Merge branch 'v2-dev' of github.com:DataDog/dd-trace-go into v2-dev
darccio Nov 6, 2024
d6f504b
fix: support deprecated ext.SamplingPriority for v1 shim
darccio Nov 6, 2024
c6460d5
chore: tag v2.0.0-beta.7
darccio Nov 6, 2024
92e8b92
fix(ddtrace/tracer): allow beta versions in logging tests
darccio Nov 8, 2024
bff750d
chore: sync go.mod with main
darccio Nov 8, 2024
98e19d4
chore: sync go.mod with main for contribs
darccio Nov 8, 2024
b7c3238
chore: upgrade dd-trace-go in contribs up to v2.0.0-beta.8
darccio Nov 8, 2024
75a4de4
chore: upgrade dd-trace-go/v2/contribs in dependent contribs up to v2…
darccio Nov 8, 2024
f2fc7cb
chore: sync go.mod with v1.69.1
darccio Nov 8, 2024
3e841d6
chore: update version.go to v2.0.0-beta.9
darccio Nov 8, 2024
ff422b3
chore: sync contrib/net/[email protected] go.mod with v1.69.1
darccio Nov 8, 2024
3334e0e
chore: sync contrib/database/[email protected] go.mod with v1.69.1
darccio Nov 8, 2024
8fa4f45
chore: sync instrumentation/testutils/[email protected] go.mod with …
darccio Nov 8, 2024
11f0c09
chore: sync {contrib,internal,tools}/*@v2.0.0-beta.9 go.mod with v1.69.1
darccio Nov 8, 2024
85762c5
chore: sync internal apps go.mod with v1.69.1
darccio Nov 8, 2024
d22e2e2
chore(contrib/aws/aws-sdk-go-v2): go mod tidy
darccio Nov 9, 2024
5be7c3a
fix(ddtrace/tracer): lock span to prevent race with error stack
hannahkm Nov 11, 2024
61e1e80
fix(instrumentation/internal/namingschema): add lock to prevent races…
hannahkm Nov 12, 2024
adfc580
chore: upgrade version to v2.0.0-beta.10
hannahkm Nov 13, 2024
8389af3
chore: upgrade net/http and database/sql to v2.0.0-beta.10
hannahkm Nov 13, 2024
890a6eb
chore({contrib/internal/tools): upgrade contribs to v2.0.0-beta.10
hannahkm Nov 13, 2024
6ddb175
chore(instrumentation/internal): update go mod to v2.0.0-beta.10
hannahkm Nov 13, 2024
711daec
fix(ddtrace/tracer): ignore gen_endpoints in TestIntegrationsEnabled
hannahkm Nov 13, 2024
d382244
fix(ddtrace/tracer): fix flakiness when running TestIntegrationEnable…
hannahkm Nov 14, 2024
cadcc44
chore: upgrade to v2.0.0-beta.11
hannahkm Nov 19, 2024
5ef1c6a
chore({contrib/instrumentation}): upgrade net/http, database/sql, and…
hannahkm Nov 19, 2024
bb12d5c
chore({contrib/instrumentation/internal/tools}): upgrade all contribs…
hannahkm Nov 19, 2024
573868d
refactor(ddtrace/tracer): rename WithDogstatsAddress as WithDogstatsAddr
darccio Nov 26, 2024
c31b1de
fix(instrumentation/internal/namingschematest): upgrade google.golang…
darccio Nov 26, 2024
9a75896
fix(contrib/google.golang.org/grpc): remove extra call to testutils.S…
darccio Nov 26, 2024
88f84f0
Merge tag 'v1.70.1' into v2-dev
hannahkm Nov 26, 2024
f6d022a
Merge remote-tracking branch 'origin' into v2-dev
hannahkm Nov 26, 2024
5196e30
fix(tools/v2check): fix wrong import paths and go mod tidy
hannahkm Nov 26, 2024
12cf41d
fix(internal/osinfo): bring in missing files from main
hannahkm Nov 26, 2024
d13ea72
fix(internal/osinfo): replace gopkg.in import with v2 equivalent
darccio Nov 26, 2024
6622ffe
go.mod: go mod tidy
darccio Nov 26, 2024
80020e4
fix(ddtrace/tracer): remove stop() call in TestLogSamplingRules
darccio Nov 26, 2024
7863b4c
fix(contrib/{go-chi,urfave/negroni}): use proper syntax for getting E…
hannahkm Nov 26, 2024
f07a859
fix(ddtrace/tracer): flip incorrect assertions
hannahkm Nov 26, 2024
92f5e33
fix(contrib/go-chi): remove checks for ext.Error, stop setting isServ…
hannahkm Nov 26, 2024
eea2087
fix(ddtrace/tracer): fix another flipped assertion
hannahkm Nov 26, 2024
b503062
fix(contrib/aws/sfn): add missing sfn folder
hannahkm Nov 26, 2024
a180892
fix(contrib/aws): downgrade aws modules to match main branch
hannahkm Nov 26, 2024
91231ab
fix(internal/civisibility/integrations/gotesting): remove unused func…
hannahkm Nov 26, 2024
7e48a76
fix(go.mod): keep AWS dependencies aligned
darccio Nov 27, 2024
c96705e
fix(go.mod): go mod tidy
darccio Nov 27, 2024
4561946
fix(internal/osinfo): align Windows implementation
darccio Nov 27, 2024
25e81df
fix(go.mod): downgrading all direct and indirect aws-sdk-go-v2 depend…
darccio Nov 27, 2024
6ff8851
fix(contrib/aws/aws-sdk-go-v2): downgrading all direct and indirect …
darccio Nov 27, 2024
e070942
refactor(tag_all_contrib.sh): prepare for release
darccio Nov 27, 2024
013b2d3
chore(instrumentation/internal/namingschematest): go mod tidy
darccio Nov 27, 2024
6131b2f
fix(tag_all_contrib.sh): tag main contribs
darccio Nov 27, 2024
b1945d5
fix(contrib/aws/aws-sdk-go-v2): downgrading smithy-go
darccio Nov 27, 2024
0ccf4f8
chore(instrumentation/internal/namingschematest): align aws-sdk-go-v2…
darccio Nov 27, 2024
c2ac84a
feat(contrib/{database/sql,net/http}): upgrade to dd-trace-go v2.0.0-…
darccio Nov 27, 2024
fb44d6b
feat({contrib,internal}/*): upgrade to dd-trace-go/contrib/{database/…
darccio Nov 27, 2024
fe886dd
feat({contrib,internal}/*): upgrade to dd-trace-go v2.0.0-rc.1
darccio Nov 27, 2024
53971d2
fix(tag_all_contrib.sh): phase 2 must use the version variable, don't…
darccio Nov 27, 2024
310137d
fix(tag_all_contrib.sh): guard rails and warnings
darccio Nov 27, 2024
2605b0a
feat({instrumentation,internal}/*): upgrade to dd-trace-go/contrib/* …
darccio Nov 27, 2024
08a1289
feat(tag_all_contrib.sh): add previous phase
darccio Nov 27, 2024
f89888d
refactor(tools): use a more appropriate name for our release script
darccio Nov 27, 2024
cb07b73
appsec: never start a new WAF Context when one is in context (#2998)
eliottness Nov 27, 2024
52576bf
Merge remote-tracking branch 'origin' into v2-dev
darccio Nov 27, 2024
2a0723a
feat(ddtrace/tracer): remove SpanContextWithLinks in favor of using S…
hannahkm Nov 27, 2024
1d02649
fix(instrumentation/internal/namingschematest): align AWS deps
darccio Nov 27, 2024
fc0c3af
Merge branch 'v2-dev' of github.com:DataDog/dd-trace-go into v2-dev
darccio Nov 27, 2024
1e2b0ac
Merge branch 'main' into v2-dev
darccio Nov 28, 2024
d0864f9
fix(ddtrace/tracer): update TestTracerOptionsDefaults and improve mer…
darccio Nov 28, 2024
54d2756
fix(.github/workflows): align orchestrion.yml with main
darccio Nov 28, 2024
3b0a239
fix(.github/workflows): disable orchestrion.yml
darccio Nov 28, 2024
d478039
fix(ddtrace/tracer): don't use my-host as hostname in tests
darccio Nov 28, 2024
a9ffcdf
fix(.github/workflows): reactivate smoke tests
darccio Nov 28, 2024
0443318
fix(ddtrace/tracer): remove misleading health_metrics_enabled from st…
hannahkm Dec 2, 2024
f799a44
propagate statsd client to stats concentrator (#3009)
ajgajg1134 Dec 4, 2024
793e435
refactor(ddtrace/tracer): rename WithDogstatsdAddress as WithDogstats…
darccio Dec 5, 2024
2696801
[v2] contrib/net/http: Make DD_TRACE_HTTP_CLIENT_TAG_QUERY_STRING fal…
mtoffl01 Dec 10, 2024
e6a87da
internal: add workflow to check for outdated integrations (#3008)
quinna-h Dec 10, 2024
b5a98c3
[v2] fix(ddtrace/tracer): Disable agent features and remote configura…
tonyredondo Dec 12, 2024
9e02ac3
[v2] internal/civisibility: Add auto test retries telemetry metric (#…
tonyredondo Dec 12, 2024
5ff2197
v2: merging main into v2-dev (#3039)
darccio Dec 17, 2024
0de6bdb
Merge branch 'main' into v2-dev
darccio Dec 17, 2024
c074735
fix(ddtracer/tracer): remove duplicated lines
darccio Dec 17, 2024
f68f3ff
fix(ddtrace/tracer): update flush_bytes' magic number in TestTraceWri…
darccio Dec 17, 2024
1d06fe6
go.mod: module go.opentelemetry.io/collector/pdata@latest found (v1.2…
eliottness Dec 17, 2024
82073c0
chore: go mod tidy
darccio Dec 18, 2024
1e947d6
fix(ddtrace/tracer): use statsd.NoOpClientDirect in WithTestDefaults
darccio Dec 18, 2024
f0a48e3
release: upgrade main contribs
darccio Dec 19, 2024
975f333
fix: add instrumentation and contrib/google.golang.org/grpc support f…
darccio Dec 19, 2024
6a0a0c9
release: upgrade contribs and almost all internal nested modules
darccio Dec 19, 2024
d43163f
fix: add autogenerated messages to tags
darccio Dec 19, 2024
d6664e0
chore: update internal apps and tools
darccio Dec 19, 2024
dccc349
fix: improving test logic for TestStreamSendsErrorCode to avoid flaki…
darccio Dec 19, 2024
cec8baa
fix(contrib/google.golang.org/grpc): fix type mismatch
hannahkm Dec 19, 2024
a36a57f
internal/contrib: fix TestTelemetryEnabled flakiness on Windows (#3051)
hannahkm Dec 19, 2024
d1e90d7
contrib/miekg/dns: resolve flaky test in TestExchange* (#3045)
hannahkm Dec 19, 2024
bc23448
vuln: upgrade golang.org/x/{crypto,net} to non-vulnerable versions (#…
darccio Dec 19, 2024
1691ef6
appsec: stop storing span tags, directly call span.SetTag (#3044)
eliottness Dec 18, 2024
235763a
fix: ensure all go.mod files use the same Go version
darccio Dec 20, 2024
2a35ed2
[v2] ddtrace/tracer: report datadog.tracer.api.errors health metric (…
mtoffl01 Dec 20, 2024
b87a853
Merge branch 'v2-dev' of github.com:DataDog/dd-trace-go into v2-dev
darccio Dec 20, 2024
5d9fa48
Merge remote-tracking branch 'origin' into v2-dev
darccio Dec 20, 2024
bf84d28
fix(ddtrace/tracer): avoid panic on nil spancontext on Extract
darccio Dec 20, 2024
27ca67c
fix(ddtrace/tracer): update expected datadog.tracer.flush_bytes in Te…
darccio Dec 20, 2024
0b8d13e
chore: go mod tidy
darccio Dec 20, 2024
be5c295
ddtrace/tracer: Report datadog.tracer.queue.enqueued.traces as health…
mtoffl01 Jan 2, 2025
2629185
[v2] Report datadog.tracer.abandoned_spans health metric (#3032)
mtoffl01 Dec 23, 2024
5f5b7a1
chore: rename reportHealthMetrics function (#3040)
mtoffl01 Dec 23, 2024
c90908e
Merge branch 'main' into v2-dev
hannahkm Jan 2, 2025
eb4f0d7
ddtrace/tracer: Tracing as transport-only mode (APPSEC_STANDALONE) (#…
eliottness Dec 19, 2024
bbf1468
ddtrace/tracer: check for nil trace to prevent panic
hannahkm Jan 2, 2025
568c2fe
ddtrace/tracer: check for nil ctx to prevent panic
hannahkm Jan 2, 2025
b056608
ddtrace/tracer: double check if trace is nil
hannahkm Jan 2, 2025
50298b9
ddtrace/tracer: fix nil check
hannahkm Jan 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .github/workflows/apps/appsec-test-contrib-submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ echo " DD_APPSEC_ENABLED=$DD_APPSEC_ENABLED"
echo " DD_APPSEC_WAF_TIMEOUT=$DD_APPSEC_WAF_TIMEOUT"

function gotestsum_runner() {
report=$1; shift; shift
report=$1; shift
wd=$1; shift
cd "$wd"
gotestsum --junitfile "$report" -- -v "$@"
cd -
}

function docker_runner() {
Expand Down Expand Up @@ -45,5 +48,5 @@ SCOPES=("gin-gonic/gin" "google.golang.org/grpc" "net/http" "gorilla/mux" "go-ch
for SCOPE in "${SCOPES[@]}"; do
contrib=$(basename "$SCOPE")
echo "Running appsec tests for contrib/$SCOPE"
$runner "$JUNIT_REPORT.$contrib.xml" "." "./contrib/$SCOPE/..."
$runner "$JUNIT_REPORT.$contrib.xml" "./v2/contrib/$SCOPE" "."
done
10 changes: 10 additions & 0 deletions .github/workflows/apps/govulncheck-contribs-v2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

find ./v2/contrib -mindepth 2 -type f -name go.mod -exec dirname {} \; | while read dir ; do
echo "Checking $dir"
# govulncheck doesn't support modules with only a go.mod in the root
go_files=$(find $dir -maxdepth 1 -type f -name '*.go' | wc -l)
[[ $go_files -eq 0 ]] && dir=$(realpath "$(ls -d $dir/*/ | head)")

govulncheck -C $dir .
done
2 changes: 1 addition & 1 deletion .github/workflows/apps/parse/parse_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package main
import (
"fmt"

"gopkg.in/DataDog/dd-trace-go.v1/internal/version"
"github.com/DataDog/dd-trace-go/v2/internal/version"
)

func ghOutput(varName, v string) string {
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/apps/test-contrib-submodules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

# This script is used to test the contrib submodules in the apps directory.
# It is run by the GitHub Actions CI workflow defined in
# .github/workflows/unit-integration-tests.yml.

[[ -d ./v2/contrib ]] || exit 0

CONTRIBS=$(find ./v2/contrib -mindepth 2 -type f -name go.mod -exec dirname {} \;)

for contrib in $CONTRIBS; do
echo "Testing contrib module: $contrib"
contrib_id=$(echo $contrib | sed 's/^\.\///g;s/[\/\.]/_/g')
cd $contrib
[[ "$1" = "smoke" ]] && go get -u -t ./...
gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report-$contrib_id.xml -- ./... -v -race -coverprofile=coverage-$contrib_id.txt -covermode=atomic
cd -
done
5 changes: 4 additions & 1 deletion .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@v3 # TODO: rely on v4 which now provides github caching by default
with:
go-version: stable
Expand Down Expand Up @@ -195,7 +197,8 @@ jobs:
- run: |
env CGO_ENABLED=${{ matrix.cgo_enabled }} DD_APPSEC_ENABLED=${{ matrix.appsec_enabled }} DD_APPSEC_WAF_TIMEOUT=$DD_APPSEC_WAF_TIMEOUT ./.github/workflows/apps/appsec-test-contrib-submodules.sh docker linux/arm64

# TODO(darccio): revert to use main on release
smoke-tests:
uses: DataDog/appsec-go-test-app/.github/workflows/smoke-tests.yml@main
uses: DataDog/appsec-go-test-app/.github/workflows/smoke-tests.yml@dario.castane/AIT-3705/dd-trace-go.v2
with:
dd-trace-go-version: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
6 changes: 1 addition & 5 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ jobs:
- name: Run govulncheck
run: govulncheck ./ddtrace/... ./appsec/... ./profiler/... ./internal/...
- name: Run govulncheck-contribs
run: |
# Excluding legacy contrib grpc.v12
go list -f '{{.Dir}}' ./contrib/... | grep -v -e grpc.v12 | while read dir ; do
govulncheck -C $dir .
done
run: ./.github/workflows/apps/govulncheck-contribs-v2.sh
2 changes: 1 addition & 1 deletion .github/workflows/multios-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: "Runner ${{ matrix.runner-index }}: Test Core and Contrib (No Integration Tests)"
shell: bash
run: |
go list ./... | grep -v -e grpc.v12 -e google.golang.org/api -e sarama -e confluent-kafka-go -e cmemprof | sort >packages.txt
go list ./... | grep -v -e google.golang.org/api -e sarama -e confluent-kafka-go -e cmemprof | sort >packages.txt
gotestsum --junitfile ${REPORT} -- $(cat packages.txt) -v -coverprofile=coverage.txt -covermode=atomic -timeout 15m
- name: Upload the results to Datadog CI App
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/parametric-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: 'DataDog/system-tests'
ref: ${{ inputs.ref }}
ref: refs/heads/dario.castane/AIT-3705/dd-trace-go.v2

- name: Checkout dd-trace-go
uses: actions/checkout@v3
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ jobs:
run: |
go get -u -t $PACKAGES
go mod tidy
for d in `find . -iname go.mod | xargs -n1 dirname`; do pushd $d; go mod tidy; popd; done;
go mod tidy
- name: Compile dd-trace-go
run: go build $PACKAGES
- name: Test contribs (v2)
# It needs to run before "Test dd-trace-go" to avoid TestTelemetryEnabled tests to fail.
run: |
go install gotest.tools/gotestsum@latest
mkdir -p $TEST_RESULTS
./.github/workflows/apps/test-contrib-submodules.sh smoke
- name: Test dd-trace-go
run: go test $PACKAGES

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: 'DataDog/system-tests'
ref: ${{ inputs.ref }}
ref: refs/heads/dario.castane/AIT-3705/dd-trace-go.v2

- name: Checkout dd-trace-go
uses: actions/checkout@v3
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/unit-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,8 @@ jobs:
go-version: ${{ inputs.go-version }}

- name: Test Contrib
run: |
mkdir -p $TEST_RESULTS
PACKAGE_NAMES=$(go list ./contrib/... | grep -v -e grpc.v12 -e google.golang.org/api)
gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report.xml -- $PACKAGE_NAMES -v -race -coverprofile=coverage.txt -covermode=atomic
if: always()
run: ./.github/workflows/apps/test-contrib-submodules.sh

- name: Upload the results to Datadog CI App
if: always()
Expand Down Expand Up @@ -238,27 +236,10 @@ jobs:

- name: Testing outlier google.golang.org/api
run: |
cd ./v2/contrib/google.golang.org/api
go get google.golang.org/[email protected] # version used to generate code
go mod tidy # Go1.16 doesn't update the sum file correctly after the go get, this tidy fixes it
go test -v ./contrib/google.golang.org/api/...

- name: Testing outlier gRPC v1.2
run: |
# This hacky approach is necessary because running the tests regularly
# do not allow using [email protected] alongside [email protected]
go mod vendor

# Checkout [email protected]
cd vendor/google.golang.org && rm -rf grpc
git clone https://github.com/grpc/grpc-go grpc && cd grpc
git fetch origin && git checkout v1.2.0 && cd ../..

# Checkout [email protected]
cd vendor/github.com/DataDog && rm -rf sketches-go
git clone https://github.com/DataDog/sketches-go && cd sketches-go
git fetch origin && git checkout v1.0.0 && cd ../..

go test -mod=vendor -v ./contrib/google.golang.org/grpc.v12/...
go test -v ./...

test-core:
runs-on:
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/v2-nightly.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# go
bin/
go.work*
!/go.work
!/go.work.sum

# profiling
*.test
Expand All @@ -15,7 +17,7 @@ go.work*
dd-trace-go.iml
vendor

/contrib/google.golang.org/grpc.v12/vendor/
/contrib_coverage.txt
contrib_coverage*.txt
/core_coverage.txt
/gotestsum-report.xml
gotestsum-report*.xml
/internal/apps/unit-of-work/unit-of-work
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ variables:
INDEX_FILE: index.txt
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-go
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true"
BENCHMARK_TARGETS: "BenchmarkStartRequestSpan|BenchmarkHttpServeTrace|BenchmarkTracerAddSpans|BenchmarkStartSpan|BenchmarkSingleSpanRetention|BenchmarkOTelApiWithCustomTags|BenchmarkInjectW3C|BenchmarkExtractW3C|BenchmarkPartialFlushing|BenchmarkGraphQL"
BENCHMARK_TARGETS: "BenchmarkStartRequestSpan|BenchmarkHttpServeTrace|BenchmarkTracerAddSpans|BenchmarkStartSpan|BenchmarkSingleSpanRetention|BenchmarkOTelApiWithCustomTags|BenchmarkInjectW3C|BenchmarkExtractW3C|BenchmarkPartialFlushing|BenchmarkConfig|BenchmarkStartSpanConfig|BenchmarkGraphQL"

include:
- ".gitlab/benchmarks.yml"
Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
run:
deadline: 10m
skip-dirs:
# This package is an exception and has its own test job (Testing outlier gRPC v1.2).
- contrib/google.golang.org/grpc.v12
linters:
disable-all: true
enable:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.52.2 golangci-l

### Integrations

Please view our contrib [README.md](contrib/README.md) for information on new integrations. If you need support for a new integration, please file an issue to discuss before opening a PR.
Please view our contrib [README.md](v2/contrib/README.md) for information on new integrations. If you need support for a new integration, please file an issue to discuss before opening a PR.

### Go Modules

Expand Down
22 changes: 11 additions & 11 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This document outlines migrating from an older version of the Datadog tracer (0.

Datadog's v1 version of the Go tracer provides not only an overhauled core that comes with huge performance improvements, but also the promise of a new and stable API to be relied on. It is the result of continuous feedback from customers, the community, as well as our extensive internal usage.

As is common and recommended in the Go community, the best way to approach migrating to this new API is by using the [gradual code repair](https://talks.golang.org/2016/refactor.article) method. We have done the same internally and it has worked just great! For this exact reason we have provided a new, [semver](https://semver.org/) friendly import path to help with using both tracers in parallel, without conflict, for the duration of the migration. This new path is `gopkg.in/DataDog/dd-trace-go.v1`.
As is common and recommended in the Go community, the best way to approach migrating to this new API is by using the [gradual code repair](https://talks.golang.org/2016/refactor.article) method. We have done the same internally and it has worked just great! For this exact reason we have provided a new, [semver](https://semver.org/) friendly import path to help with using both tracers in parallel, without conflict, for the duration of the migration. This new path is `github.com/DataDog/dd-trace-go/v2`.

Our [godoc page](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace) should deem helpful during this process. We also have the [official documentation](https://docs.datadoghq.com/tracing/setup/go/), which contains a couple of examples.
Our [godoc page](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace) should deem helpful during this process. We also have the [official documentation](https://docs.datadoghq.com/tracing/setup/go/), which contains a couple of examples.

This document will further outline some _before_ and _after_ examples.

Expand All @@ -32,15 +32,15 @@ tracer.Start(
defer tracer.Stop()
```

Notice that the tracer object is no longer returned. Consult the documentation to see [all possible parameters](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#StartOption) to the `Start` call.
Notice that the tracer object is no longer returned. Consult the documentation to see [all possible parameters](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer#StartOption) to the `Start` call.

## Service Information

The [`tracer.SetServiceInfo`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Tracer.SetServiceInfo) method has been deprecated. The service information is now set automatically based on the value of the [`ext.SpanType`](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext#SpanType) tag that was set on the root span of a trace.
The [`tracer.SetServiceInfo`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Tracer.SetServiceInfo) method has been deprecated. The service information is now set automatically based on the value of the [`ext.SpanType`](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/ext#SpanType) tag that was set on the root span of a trace.

## Spans

Starting spans is now possible with [functional options](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#StartSpanOption). Which means that all span properties (or none) can be set when starting a span dynamically. Before:
Starting spans is now possible with [functional options](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer#StartSpanOption). Which means that all span properties (or none) can be set when starting a span dynamically. Before:

```go
span := tracer.NewRootSpan("web.request", "my_service", "resource_name")
Expand All @@ -52,27 +52,27 @@ Becomes:
span := tracer.StartSpan("web.request", tracer.ServiceName("my_service"), tracer.ResourceName("resource_name"))
```

We've done this because in many cases the extra parameters could become tedious, given that service names can be inherited and resource names can default to the operation name. This also allows us to have one single, more dynamic API for starting both root and child spans. Check out all possible [StartSpanOption](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#StartSpanOption) values to get an idea.
We've done this because in many cases the extra parameters could become tedious, given that service names can be inherited and resource names can default to the operation name. This also allows us to have one single, more dynamic API for starting both root and child spans. Check out all possible [StartSpanOption](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer#StartSpanOption) values to get an idea.

### Children

Here is an example for spawning a child of the previously declared span:
```go
child := tracer.StartSpan("process.user", tracer.ChildOf(span.Context()))
```
You will notice that the new tracer also introduces the concept of [SpanContext](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace#SpanContext), which is different from Go's context and is used to carry information needed to spawn children of a specific span and can be propagated cross-process. To learn more about distributed tracing check the package-level [documentation](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#ChildOf) of the `tracer` package.
You will notice that the new tracer also introduces the concept of [SpanContext](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace#SpanContext), which is different from Go's context and is used to carry information needed to spawn children of a specific span and can be propagated cross-process. To learn more about distributed tracing check the package-level [documentation](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer#ChildOf) of the `tracer` package.

### Using Go's context

It is also possible to create children of spans that live inside Go's [context](https://golang.org/pkg/context/):
```go
child, ctx := tracer.StartSpanFromContext(ctx, "process.user", tracer.Tag("key", "value"))
```
This will create a child of the span which exists inside the passed context and return it, along with a new context which contains the new span. To add or retrieve a span from a context use the [`ContextWithSpan`](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#ContextWithSpan) or [`SpanFromContext`](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#SpanFromContext) functions.
This will create a child of the span which exists inside the passed context and return it, along with a new context which contains the new span. To add or retrieve a span from a context use the [`ContextWithSpan`](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer#ContextWithSpan) or [`SpanFromContext`](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer#SpanFromContext) functions.

### Setting errors

The [`SetError`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Span.SetError) has been deprecated in favour of the [`ext.Error`](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext#Error) tag value which matches other tracing libraries in the wild. Whereas before we had:
The [`SetError`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Span.SetError) has been deprecated in favour of the [`ext.Error`](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/ext#Error) tag value which matches other tracing libraries in the wild. Whereas before we had:

```go
span.SetError(err)
Expand All @@ -88,7 +88,7 @@ Note that this tag can accept value of the types `error`, `string` and `bool` as

### Finishing

The [`FinishWithErr`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Span.FinishWithErr) and [`FinishWithTime`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Span.FinishWithTime) methods have been removed in favour of a set of [`FinishOption`](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#FinishOption). For example, this would now become:
The [`FinishWithErr`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Span.FinishWithErr) and [`FinishWithTime`](https://godoc.org/github.com/DataDog/dd-trace-go/tracer#Span.FinishWithTime) methods have been removed in favour of a set of [`FinishOption`](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer#FinishOption). For example, this would now become:

```go
span.Finish(tracer.WithError(err), tracer.FinishTime(t))
Expand All @@ -100,5 +100,5 @@ Providing a `nil` value as an error is perfectly fine and will not mark the span

The new version of the tracer also comes with a lot of new features, such as support for distributed tracing and distributed sampling priority.

* package level documentation of the [`tracer` package](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer) for a better overview.
* package level documentation of the [`tracer` package](https://godoc.org/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer) for a better overview.
* [official documentation](https://docs.datadoghq.com/tracing/setup/go/)
Loading
Loading