newrelic / go-agent

New Relic Go Agent
Apache License 2.0
764 stars 294 forks source link

add getter for transaction name #714

Closed rittneje closed 1 year ago

rittneje commented 1 year ago

Summary

Add a Name() string method to Transaction.

Desired Behavior

It should return the transaction name, as passed to StartTransaction or SetName.

Additional context

We'd like to be able to easily include the transaction name in the attributes for RecordCustomEvent. However, there doesn't seem to be a way to do this without keeping track of the name ourselves.

Alternatively, it would much nicer if there were a way to do RecordCustomEvent within a transaction.

nr-swilloughby commented 1 year ago

released