diff --git a/CHANGELOG.md b/CHANGELOG.md index 62c28161b..4f118f66e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1128,7 +1128,7 @@ feedback that you would like to pass along, please open up an issue [here](https://github.com/newrelic/go-agent/issues/new) and be sure to include the label `3.0`. * For normal (non-3.0) issues/questions we request that you report them via - our [support site](http://support.newrelic.com/) or our + our [support site](https://support.newrelic.com/) or our [community forum](https://discuss.newrelic.com). Please only report questions related to the 3.0 pre-release directly via GitHub. @@ -1162,7 +1162,7 @@ include: ### Bug Fixes * Fixed an issue in the - [`nrhttprouter`](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrhttprouter) + [`nrhttprouter`](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrhttprouter) integration where the transaction was not being added to the requests context. This resulted in an inability to access the transaction from within an @@ -1208,7 +1208,7 @@ package. // (see https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/enable-distributed-tracing) txn := currentTxn() - req, err := http.NewRequest("GET", "http://example.com", nil) + req, err := http.NewRequest("GET", "https://example.com", nil) if nil != err { log.Fatalln(err) } @@ -1384,9 +1384,9 @@ It can be configured as follows: ### New Features * Added support for [HttpRouter](https://github.com/julienschmidt/httprouter) in - the new [_integrations/nrhttprouter](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrhttprouter) package. This package allows you to easily instrument inbound requests through the HttpRouter framework. + the new [_integrations/nrhttprouter](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrhttprouter) package. This package allows you to easily instrument inbound requests through the HttpRouter framework. - * [Documentation](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrhttprouter) + * [Documentation](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrhttprouter) * [Example](_integrations/nrhttprouter/example/main.go) * Added support for [github.com/uber-go/zap](https://github.com/uber-go/zap) in @@ -1469,7 +1469,7 @@ package. This package supports instrumentation for servers, clients, publishers * Added support for creating static `WebRequest` instances manually via the `NewStaticWebRequest` function. This can be useful when you want to create a web transaction but don't have an `http.Request` object. Here's an example of creating a static `WebRequest` and using it to mark a transaction as a web transaction: ```go hdrs := http.Headers{} - u, _ := url.Parse("http://example.com") + u, _ := url.Parse("https://example.com") webReq := newrelic.NewStaticWebRequest(hdrs, u, "GET", newrelic.TransportHTTP) txn := app.StartTransaction("My-Transaction", nil, nil) txn.SetWebRequest(webReq) @@ -1701,8 +1701,8 @@ package. This package supports instrumentation for servers and clients. When using these SDKs, a segment will be created for each out going request. For DynamoDB calls, these will be Datastore segments and for all others they will be External segments. - * [v1 Documentation](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrawssdk/v1) - * [v2 Documentation](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrawssdk/v2) + * [v1 Documentation](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrawssdk/v1) + * [v2 Documentation](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrawssdk/v2) * Added span event and transaction trace segment attribute configuration. You may control which attributes are captured in span events and transaction trace @@ -1801,7 +1801,7 @@ txn.Application().RecordCustomEvent("customerOrder", map[string]interface{}{ * Added support for [Echo](https://echo.labstack.com) in the new `nrecho` package. - * [Documentation](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrecho) + * [Documentation](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrecho) * [Example](_integrations/nrecho/example/main.go) * Introduced `Transaction.SetWebResponse(http.ResponseWriter)` method which sets @@ -1864,7 +1864,7 @@ transactions. Example use: ```go client := &http.Client{} client.Transport = newrelic.NewRoundTripper(nil, client.Transport) -request, _ := http.NewRequest("GET", "http://example.com", nil) +request, _ := http.NewRequest("GET", "https://example.com", nil) request = newrelic.RequestWithTransactionContext(request, txn) resp, err := client.Do(request) ``` @@ -2027,7 +2027,7 @@ txn.NoticeError(newrelic.Error{ * Added support for [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) in the new `nrgin` package. - * [Documentation](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrgin/v1) + * [Documentation](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrgin/v1) * [Example](examples/_gin/main.go) ## 1.8.0 @@ -2040,9 +2040,9 @@ txn.NoticeError(newrelic.Error{ ## 1.7.0 -* Added support for [gorilla/mux](http://github.com/gorilla/mux) in the new `nrgorilla` +* Added support for [gorilla/mux](https://github.com/gorilla/mux) in the new `nrgorilla` package. - * [Documentation](http://godoc.org/github.com/newrelic/go-agent/_integrations/nrgorilla/v1) + * [Documentation](https://godoc.org/github.com/newrelic/go-agent/_integrations/nrgorilla/v1) * [Example](examples/_gorilla/main.go) ## 1.6.0 diff --git a/GUIDE.md b/GUIDE.md index e20d4777d..3813a1c1b 100644 --- a/GUIDE.md +++ b/GUIDE.md @@ -127,7 +127,7 @@ app, err := newrelic.NewApplication( To log at info level to a file, set: ```go -w, err := os.OpenFile("my_log_file", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) +w, err := os.OpenFile("my_log_file", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600) if nil == err { app, _ := newrelic.NewApplication( newrelic.ConfigAppName("Your Application Name"), @@ -400,7 +400,7 @@ ways to use this functionality: ```go client := &http.Client{} client.Transport = newrelic.NewRoundTripper(client.Transport) - request, _ := http.NewRequest("GET", "http://example.com", nil) + request, _ := http.NewRequest("GET", "https://example.com", nil) // Put transaction in the request's context: request = newrelic.RequestWithTransactionContext(request, txn) resp, err := client.Do(request) diff --git a/MIGRATION.md b/MIGRATION.md index 1b74019d1..b3368c123 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -455,7 +455,7 @@ var _ newrelic.ErrorAttributer = MyErrorType{} ```go client := &http.Client{} client.Transport = newrelic.NewRoundTripper(txn, client.Transport) - req, _ := http.NewRequest("GET", "http://example.com", nil) + req, _ := http.NewRequest("GET", "https://example.com", nil) client.Do(req) ``` diff --git a/ROADMAP.md b/ROADMAP.md deleted file mode 100644 index bf21381e1..000000000 --- a/ROADMAP.md +++ /dev/null @@ -1,26 +0,0 @@ -# Go Agent Roadmap - -## Product Vision -The goal of the Go agent is to provide complete visibility into the health of your service. The agent provides metrics about the runtime health of your service and the process it runs in, and traces that show how specific requests are performing. It also provides information about the environment in which it is running, so you can identify issues with specific hosts, regions, deployments, and other facets. - -New Relic is moving toward OpenTelemetry. OpenTelemetry is a unified standard for service instrumentation. You can use our [OpenTelemetry Exporter](https://github.com/newrelic/opentelemetry-exporter-go) today, and will soon see a shim will convert New Relic Go Agent data to OpenTelemetry. OpenTelemetry will include a broad set of high-quality community-contributed instrumentation and a powerful vendor-neutral API for adding your own instrumentation. - - -## Roadmap -**The Go instrumentation roadmap project is found [here](https://github.com/orgs/newrelic/projects/24)**. - -This roadmap project is broken down into the following sections: - -- **Done**: - - This section contains features that were recently completed. -- **Now**: - - This section contains features that are currently in progress. -- **Next**: - - This section contains work planned within the next three months. These features may still be de-prioritized and moved to Future. -- **Future**: - - This section is for ideas for future work that is aligned with the product vision and possible opportunities for community contribution. It contains a list of features that anyone can implement. No guarantees can be provided on if or when these features will be completed. - - - -### Disclaimers -This roadmap is subject to change at any time. Future items should not be considered commitments. diff --git a/v3/examples/server/main.go b/v3/examples/server/main.go index c012e349b..856ed6cfc 100644 --- a/v3/examples/server/main.go +++ b/v3/examples/server/main.go @@ -159,7 +159,7 @@ func message(w http.ResponseWriter, r *http.Request) { func external(w http.ResponseWriter, r *http.Request) { txn := newrelic.FromContext(r.Context()) - req, _ := http.NewRequest("GET", "http://example.com", nil) + req, _ := http.NewRequest("GET", "https://example.com", nil) // Using StartExternalSegment is recommended because it does distributed // tracing header setup, but if you don't have an *http.Request and @@ -193,7 +193,7 @@ func roundtripper(w http.ResponseWriter, r *http.Request) { client := &http.Client{} client.Transport = newrelic.NewRoundTripper(client.Transport) - request, _ := http.NewRequest("GET", "http://example.com", nil) + request, _ := http.NewRequest("GET", "https://example.com", nil) // Since the transaction is already added to the inbound request's // context by WrapHandleFunc, we just need to copy the context from the // inbound request to the external request. diff --git a/v3/newrelic/examples_test.go b/v3/newrelic/examples_test.go index f553eeea6..96458486a 100644 --- a/v3/newrelic/examples_test.go +++ b/v3/newrelic/examples_test.go @@ -81,7 +81,7 @@ func ExampleNewRoundTripper() { // requests done by this client with external segments. client.Transport = newrelic.NewRoundTripper(client.Transport) - request, _ := http.NewRequest("GET", "http://example.com", nil) + request, _ := http.NewRequest("GET", "https://example.com", nil) // Be sure to add the current Transaction to each request's context so // the Transport has access to it. @@ -160,7 +160,7 @@ func ExampleError() { func ExampleExternalSegment() { txn := currentTransaction() client := &http.Client{} - request, _ := http.NewRequest("GET", "http://www.example.com", nil) + request, _ := http.NewRequest("GET", "https://www.example.com", nil) segment := newrelic.StartExternalSegment(txn, request) response, _ := client.Do(request) segment.Response = response @@ -186,7 +186,7 @@ func ExampleExternalSegment_url() { func ExampleStartExternalSegment() { txn := currentTransaction() client := &http.Client{} - request, _ := http.NewRequest("GET", "http://www.example.com", nil) + request, _ := http.NewRequest("GET", "https://www.example.com", nil) segment := newrelic.StartExternalSegment(txn, request) response, _ := client.Do(request) segment.Response = response @@ -195,7 +195,7 @@ func ExampleStartExternalSegment() { func ExampleStartExternalSegment_context() { txn := currentTransaction() - request, _ := http.NewRequest("GET", "http://www.example.com", nil) + request, _ := http.NewRequest("GET", "https://www.example.com", nil) // If the transaction is added to the request's context then it does not // need to be provided as a parameter to StartExternalSegment. @@ -214,7 +214,7 @@ func doSendRequest(*http.Request) int { return 418 } // http.Response and still want to record the response status code. func ExampleExternalSegment_SetStatusCode() { txn := currentTransaction() - request, _ := http.NewRequest("GET", "http://www.example.com", nil) + request, _ := http.NewRequest("GET", "https://www.example.com", nil) segment := newrelic.StartExternalSegment(txn, request) statusCode := doSendRequest(request) segment.SetStatusCode(statusCode) @@ -234,7 +234,7 @@ func ExampleTransaction_SetWebRequest() { func ExampleTransaction_SetWebRequestHTTP() { app := getApp() - inboundRequest, _ := http.NewRequest("GET", "http://example.com", nil) + inboundRequest, _ := http.NewRequest("GET", "https://example.com", nil) txn := app.StartTransaction("My-Transaction") // Mark transaction as a web transaction, record attributes based on the // inbound request, and read any available distributed tracing headers.