Skip to content

Commit

Permalink
fix: Fixed typos (#2287)
Browse files Browse the repository at this point in the history
  • Loading branch information
brnhensley committed Jun 21, 2024
1 parent b1b5e3e commit 7b3c8d1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ API.prototype.setControllerName = function setControllerName(name, action) {
}

/**
* Add a custom attribute to the current transaction. Some attributes are
* Add a custom attribute to the current transaction and span. Some attributes are
* reserved (see CUSTOM_DENYLIST for the current, very short list), and
* as with most API methods, this must be called in the context of an
* active transaction. Most recently set value wins.
*
* @param {string} key The key you want displayed in the RPM UI.
* @param {string} value The value you want displayed. Must be serializable.
* @returns {false|undefined} Retruns false when disabled/errored, otherwise undefined
* @returns {false|undefined} Returns false when disabled/errored, otherwise undefined
*/
API.prototype.addCustomAttribute = function addCustomAttribute(key, value) {
const metric = this.agent.metrics.getOrCreateMetric(
Expand Down Expand Up @@ -298,7 +298,7 @@ API.prototype.addCustomAttribute = function addCustomAttribute(key, value) {
}

/**
* Adds all custom attributes in an object to the current transaction.
* Adds all custom attributes in an object to the current transaction and span.
*
* See documentation for newrelic.addCustomAttribute for more information on
* setting custom attributes.
Expand Down Expand Up @@ -360,7 +360,7 @@ API.prototype.addCustomSpanAttributes = function addCustomSpanAttributes(atts) {
*
* @param {string} key The key you want displayed in the RPM UI.
* @param {string} value The value you want displayed. Must be serializable.
* @returns {false|undefined} Retruns false when disabled/errored, otherwise undefined
* @returns {false|undefined} Returns false when disabled/errored, otherwise undefined
*/
API.prototype.addCustomSpanAttribute = function addCustomSpanAttribute(key, value) {
const metric = this.agent.metrics.getOrCreateMetric(
Expand Down Expand Up @@ -938,7 +938,7 @@ API.prototype.startSegment = function startSegment(name, record, handler, callba
* })
* @param {string} url
* The URL of the transaction. It is used to name and group related transactions in APM,
* so it should be a generic name and not iclude any variable parameters.
* so it should be a generic name and not include any variable parameters.
* @param {Function} handle
* Function that represents the transaction work.
* @returns {null|*} Returns null if handle is not a function, otherwise the return value of handle
Expand Down Expand Up @@ -1026,7 +1026,7 @@ API.prototype.startBackgroundTransaction = startBackgroundTransaction
* })
* @param {string} name
* The name of the transaction. It is used to name and group related
* transactions in APM, so it should be a generic name and not iclude any
* transactions in APM, so it should be a generic name and not include any
* variable parameters.
* @param {string} [group]
* Optional, used for grouping background transactions in APM. For more
Expand Down Expand Up @@ -1297,14 +1297,14 @@ API.prototype.recordCustomEvent = function recordCustomEvent(eventType, attribut
// Filter all object type valued attributes out
const filteredAttributes = _filterAttributes(attributes, `${eventType} custom event`)

const instrinics = {
const intrinsics = {
type: eventType,
timestamp: Date.now()
}

const tx = this.agent.getTransaction()
const priority = (tx && tx.priority) || Math.random()
this.agent.customEventAggregator.add([instrinics, filteredAttributes], priority)
this.agent.customEventAggregator.add([intrinsics, filteredAttributes], priority)
}

/**
Expand Down Expand Up @@ -1342,7 +1342,7 @@ API.prototype.instrument = function instrument(moduleName, onRequire, onError) {
* Registers an instrumentation function.
*
* - `newrelic.instrumentConglomerate(moduleName, onRequire [, onError])`
* - `newrelic.isntrumentConglomerate(options)`
* - `newrelic.instrumentConglomerate(options)`
*
* @param {string|object} moduleName The module name given to require to load the module, or the instrumentation specification
* @param {string} moduleName.moduleName The module name given to require to load the module
Expand Down

0 comments on commit 7b3c8d1

Please sign in to comment.