• /
  • EnglishEspañolFrançais日本語한국어Português
  • 로그인지금 시작하기

Go agent release notesRSS

December 2, 2019
Go agent v2.16.1

2.16.1

뉴렐릭의 Go 에이전트 v3.0은 현재 검토 및 베타 테스트용으로 제공됩니다. 이 시험판 사용에 따른 위험 부담은 사용자에게 있습니다. 뉴렐릭은 베타 릴리스와 관련하여 명시적이거나 묵시적인 모든 보증을 부인합니다.

아래에 설명된 대로 새로운 v3 폴더를 사용하기 위한 단계를 수동으로 수행하지 않으면, 에이전트에서 아무런 변경 사항도 볼 수 없습니다.

이번 2.16.1 릴리스에는 Go 에이전트 v3.0의 시험판이 포함된 새로운 v3.0 폴더가 포함되어 있으며, Go 에이전트 v3.0에는 주요 변경 사항이 포함되어 있습니다. 피드백을 기다리고 있으며, 공식 릴리스 전에 이를 검토하고 변경 사항을 테스트해 보시기를 바랍니다.

이것은 공식 3.0 릴리스가 아니며, 제안된 변경 사항에 대한 피드백을 수집하기 위한 수단일 뿐입니다. Github에서 3.0으로 태그가 지정되지 않았으며, Go mod 파일에서 3.0 릴리스를 아직 업데이트할 수 없습니다. 이러한 변경 사항을 테스트하려면 [go-src-dir]/src/github.com/newrelic/go-agent 아래의 Go 소스 디렉터리에 이 리포지터리를 복제해야 합니다. 소스를 체크아웃한 후에는 v3/MIGRATION.md의 두 번째 섹션에 있는 단계를 따라야 합니다.

변경 사항 및 설치 지침 목록은 v3 폴더에 포함되어 있으며 여기에서 확인할 수 있습니다

Go 에이전트 v3.0의 이 시험판(베타) 버전에 대해 다음 사항에 유의하십시오:

  • v3 폴더의 변경 사항은 주요 3.0 릴리스로 {'-'}2주 후에 릴리스할 것으로 예상되는 내용을 나타냅니다. 그러나 변경 사항에 대한 피드백을 요청하고 있으며 공식 릴리스 전에 일부 호환성을 깨는 변경 사항이 있을 가능성이 있습니다.
  • 이것은 공식 3.0 릴리스가 아니며, Github에서 3.0으로 태그가 지정되지 않았고, Go mod 파일에서 3.0 릴리스를 아직 업데이트할 수 없습니다.
  • 이러한 변경 사항을 테스트하고 문제나 질문이 발생하거나 전달하고 싶은 피드백이 있는 경우 여기에서 이슈를 열고 3.0 레이블을 포함해 주십시오.
    • 일반적인(3.0이 아닌) 문제/질문은 당사의 지원 사이트 또는 커뮤니티 포럼을 통해 보고해 주시기 바랍니다. 3.0 사전 릴리스와 관련된 질문은 GitHub를 통해서만 직접 보고해 주시기 바랍니다.

새로운 기능

  • V3는 Go 모듈에 대한 지원을 추가합니다. go.mod 파일은 v3 폴더에 있지만, 3.0 릴리스가 공식적으로 완전히 태그될 때까지 사용할 수 없습니다. 다양한 모듈에 사용할 계획인 버전 태그의 예는 다음과 같습니다:

    • v3.0.0
    • v3/integrations/nrecho-v3/v1.0.0
    • v3/integrations/nrecho-v4/v1.0.0

변화

  • 이 변경 사항은 이전에 이 이슈에서 피드백을 요청했던 내용입니다.
  • 포함된 변경 사항의 전체 목록과 업그레이드 체크리스트는 v3/MIGRATION.md에서 확인할 수 있습니다.

November 22, 2019
Go agent v2.16.0

2.16.0

Upcoming

Bug Fixes

  • Fixed an issue in the 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 httprouter.Handle function. This issue has now been fixed.

October 24, 2019
Go agent v2.15.0

2.15.0

New Features

  • Added support for monitoring MongoDB queries with the new _integrations/nrmongo package.

  • Added new method Transaction.IsSampled() that returns a boolean that indicates if the transaction is sampled. A sampled transaction records a span event for each segment. Distributed tracing must be enabled for transactions to be sampled. false is returned if the transaction has finished. This sampling flag is needed for B3 trace propagation and future support of W3C Trace Context.

  • Added support for adding B3 Headers to outgoing requests. This is helpful if the service you are calling uses B3 for trace state propagation (for example, it uses Zipkin instrumentation). You can use the new _integrations/nrb3 package's nrb3.NewRoundTripper like this:

    // When defining the client, set the Transport to the NewRoundTripper. This
    // will create ExternalSegments and add B3 headers for each request.
    client := &http.Client{
    Transport: nrb3.NewRoundTripper(nil),
    }
    // Distributed Tracing must be enabled for this application.
    // (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)
    if nil != err {
    log.Fatalln(err)
    }
    // Be sure to add the transaction to the request context. This step is
    // required.
    req = newrelic.RequestWithTransactionContext(req, txn)
    resp, err := client.Do(req)
    if nil != err {
    log.Fatalln(err)
    }
    defer resp.Body.Close()
    fmt.Println(resp.StatusCode)

October 15, 2019
Go agent v2.14.1

2.14.1

Bug Fixes

  • Removed the hidden "NEW_RELIC_DEBUG_LOGGING" environment variable setting which was broken in release 2.14.0.

October 14, 2019
Go agent v2.14.0

2.14.0

New Features

  • Added support for a new segment type, MessageProducerSegment, to be used to track time spent adding messages to message queuing systems like RabbitMQ or Kafka.

    seg := &newrelic.MessageProducerSegment{
    StartTime: newrelic.StartSegmentNow(txn),
    Library: "RabbitMQ",
    DestinationType: newrelic.MessageExchange,
    DestinationName: "myExchange",
    }
    // add message to queue here
    seg.End()
  • Added new attribute constants for use with message consumer transactions. These attributes can be used to add more detail to a transaction that tracks time spent consuming a message off a message queuing system like RabbitMQ or Kafka. They can be added using txn.AddAttribute.

    // The routing key of the consumed message.
    txn.AddAttribute(newrelic.AttributeMessageRoutingKey, "myRoutingKey")
    // The name of the queue the message was consumed from.
    txn.AddAttribute(newrelic.AttributeMessageQueueName, "myQueueName")
    // The type of exchange used for the consumed message (direct, fanout,
    // topic, or headers).
    txn.AddAttribute(newrelic.AttributeMessageExchangeType, "myExchangeType")
    // The callback queue used in RPC configurations.
    txn.AddAttribute(newrelic.AttributeMessageReplyTo, "myReplyTo")
    // The application-generated identifier used in RPC configurations.
    txn.AddAttribute(newrelic.AttributeMessageCorrelationID, "myCorrelationID")

    It is recommended that at most one message is consumed per transaction.

  • Added support for Go 1.13's Error wrapping. Transaction.NoticeError now uses Unwrap recursively to identify the error's cause (the deepest wrapped error) when generating the error's class field. This functionality will help group your errors usefully.

    For example, when using Go 1.13, the following code:

    type socketError struct{}
    func (e socketError) Error() string { return "socket error" }
    func gamma() error { return socketError{} }
    func beta() error { return fmt.Errorf("problem in beta: %w", gamma()) }
    func alpha() error { return fmt.Errorf("problem in alpha: %w", beta()) }
    func execute(txn newrelic.Transaction) {
    err := alpha()
    txn.NoticeError(err)
    }

    captures an error with message "problem in alpha: problem in beta: socket error" and class "main.socketError". Previously, the class was recorded as "*fmt.wrapError".

  • A Stack field has been added to Error, which can be assigned using the new NewStackTrace function. This allows your error stack trace to show where the error happened, rather than the location of the NoticeError call.

    Transaction.NoticeError not only checks for a stack trace (using StackTracer) in the error parameter, but in the error's cause as well. This means that you can create an Error where your error occurred, wrap it multiple times to add information, notice it with NoticeError, and still have a useful stack trace. Take a look!

    func gamma() error {
    return newrelic.Error{
    Message: "something went very wrong",
    Class: "socketError",
    Stack: newrelic.NewStackTrace(),
    }
    }
    func beta() error { return fmt.Errorf("problem in beta: %w", gamma()) }
    func alpha() error { return fmt.Errorf("problem in alpha: %w", beta()) }
    func execute(txn newrelic.Transaction) {
    err := alpha()
    txn.NoticeError(err)
    }

    In this example, the topmost stack trace frame recorded is "gamma", rather than "execute".

  • Added support for configuring a maximum number of transaction events per minute to be sent to New Relic. It can be configured as follows:

    config := newrelic.NewConfig("Application Name", os.Getenv("NEW_RELIC_LICENSE_KEY"))
    config.TransactionEvents.MaxSamplesStored = 100

Miscellaneous

September 23, 2019
Go agent v2.13.0

2.13.0

New Features

September 17, 2019
Go agent v2.12.0

New Features

  • Added new methods to expose Transaction details:

    • Transaction.GetTraceMetadata() returns a TraceMetadata which contains distributed tracing identifiers.
    • Transaction.GetLinkingMetadata() returns a LinkingMetadata which contains the fields needed to link data to a trace or entity.
  • Added a new plugin for the Logrus logging framework with the new _integrations/logcontext/nrlogrusplugin package. This plugin leverages the new GetTraceMetadata and GetLinkingMetadata above to decorate logs.

    To enable, set your log's formatter to the nrlogrusplugin.ContextFormatter{}

    logger := logrus.New()
    logger.SetFormatter(nrlogrusplugin.ContextFormatter{})

    The logger will now look for a newrelic.Transaction inside its context and decorate logs accordingly. Therefore, the Transaction must be added to the context and passed to the logger. For example, this logging call

    logger.Info("Hello New Relic!")

    must be transformed to include the context, such as:

    ctx := newrelic.NewContext(context.Background(), txn)
    logger.WithContext(ctx).Info("Hello New Relic!")

    For full documentation see the godocs or view the example.

  • Added support for NATS and NATS Streaming monitoring with the new _integrations/nrnats and _integrations/nrstan packages. These packages support instrumentation of publishers and subscribers.

  • Enables ability to migrate to Configurable Security Policies (CSP) on a per agent basis for accounts already using High-security mode (HSM).

    • Previously, if CSP was configured for an account, New Relic would not allow an agent to connect without the security_policies_token. This led to agents not being able to connect during the period between when CSP was enabled for an account and when each agent is configured with the correct token.
    • With this change, when both HSM and CSP are enabled for an account, an agent (this version or later) can successfully connect with either high_security: true or the appropriate security_policies_token configured - allowing the agent to continue to connect after CSP is configured on the account but before the appropriate security_policies_token is configured for each agent.

August 22, 2019
Go agent v2.11.0

New Features

  • Added support for Micro monitoring with the new _integrations/nrmicro package. This package supports instrumentation for servers, clients, publishers, and subscribers.

  • 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:

    hdrs := http.Headers{}
    u, _ := url.Parse("http://example.com")
    webReq := newrelic.NewStaticWebRequest(hdrs, u, "GET", newrelic.TransportHTTP)
    txn := app.StartTransaction("My-Transaction", nil, nil)
    txn.SetWebRequest(webReq)

July 31, 2019
Go agent v2.10.0

2.10.0

New Features

  • Added support for custom events when using nrlambda. Example Lambda handler which creates custom event:

    func handler(ctx context.Context) {
    if txn := newrelic.FromContext(ctx); nil != txn {
    txn.Application().RecordCustomEvent("myEvent", map[string]interface{}{
    "zip": "zap",
    })
    }
    fmt.Println("hello world!")
    }

July 10, 2019
Go agent v2.9.0

2.9.0

New Features

  • Added support for gRPC monitoring with the new _integrations/nrgrpc package. This package supports instrumentation for servers and clients.

  • Added new ExternalSegment fields Host, Procedure, and Library. These optional fields are automatically populated from the segment's URL or Request if unset. Use them if you don't have access to a request or URL but still want useful external metrics, transaction segment attributes, and span attributes.

    • Host is used for external metrics, transaction trace segment names, and span event names. The host of segment's Request or URL is the default.
    • Procedure is used for transaction breakdown metrics. If set, it should be set to the remote procedure being called. The HTTP method of the segment's Request is the default.
    • Library is used for external metrics and the "component" span attribute. If set, it should be set to the framework making the call. "http" is the default.

    With the addition of these new fields, external transaction breakdown metrics are changed: External/myhost.com/all will now report as External/myhost.com/http/GET (provided the HTTP method is GET).

  • HTTP Response codes below 100, except 0 and 5, are now recorded as errors. This is to support gRPC status codes. If you start seeing new status code errors that you would like to ignore, add them to Config.ErrorCollector.IgnoreStatusCodes or your server side configuration settings.

  • Improve logrus support by introducing nrlogrus.Transform, a function which allows you to turn a logrus.Logger instance into a newrelic.Logger. Example use:

    l := logrus.New()
    l.SetLevel(logrus.DebugLevel)
    cfg := newrelic.NewConfig("Your Application Name", "__YOUR_NEW_RELIC_LICENSE_KEY__")
    cfg.Logger = nrlogrus.Transform(l)

    As a result of this change, the nrlogrus package requires logrus version v1.1.0 and above.

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.