Skip to content

Remove transport.Default#1195

Merged
axw merged 3 commits intoelastic:masterfrom
axw:remove-transport-default
Jan 14, 2022
Merged

Remove transport.Default#1195
axw merged 3 commits intoelastic:masterfrom
axw:remove-transport-default

Conversation

@axw
Copy link
Member

@axw axw commented Jan 14, 2022

Remove transport.Default, and construct a new transport for each new tracer. This will enable us to pass the tracer's associated service name and version into its transport, for appending to the User-Agent header.

Closes #1194

@ghost
Copy link

ghost commented Jan 14, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-01-14T07:37:21.255+0000

  • Duration: 32 min 54 sec

  • Commit: 1df6b92

Test stats 🧪

Test Results
Failed 0
Passed 7171
Skipped 174
Total 7345

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark test.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@axw axw marked this pull request as ready for review January 14, 2022 06:32
@axw axw requested a review from a team January 14, 2022 06:32
- Remove stacktrace.ContextSetter {pull}1187[#(1187)]
- Drop support for versions of Go prior to 1.15.0 {pull}1190[#(1190)]
- Replace apm.DefaultTracer with an initialization function {pull}1189[#(1189)]
- Remove transport.Default, construct a new Transport in each new tracer {pull}[#()]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding the missing notes to the change log, I've been meaning to do so, but hadn't gotten to it.

@axw axw enabled auto-merge (squash) January 14, 2022 07:37
@axw axw merged commit 4fe506d into elastic:master Jan 14, 2022
@simitt simitt added this to the 2.0 milestone Feb 9, 2022
@marclop
Copy link
Contributor

marclop commented Feb 11, 2022

I verified that transport.Default doesn't resolve to and that my Go program does not compile 😄

package main

import (
	"go.elastic.co/apm/v2/transport"
)

func main() {
	transport.Default
}
$ go run a/main.go
# command-line-arguments
a/main.go:25:2: undefined: transport.Default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment