Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fixed typos in API jsdoc #2287

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@
}

/**
* 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 @@
}

/**
* 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 @@
*
* @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 @@
* })
* @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 @@
* })
* @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 @@
// 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 @@
* 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 Expand Up @@ -1548,7 +1548,7 @@
* @param {string} params.traceId Identifier for the feedback event.
* Obtained from {@link getTraceMetadata}.
* @param {string} params.category A tag for the event.
* @param {string} params.rating A indicator of how useful the message was.

Check warning on line 1551 in api.js

View workflow job for this annotation

GitHub Actions / lint (lts/*)

The type 'getTraceMetadata' is undefined

Check warning on line 1551 in api.js

View workflow job for this annotation

GitHub Actions / lint (lts/*)

The type 'getTraceMetadata' is undefined
* @param {string} [params.message] The message that triggered the event.
* @param {object} [params.metadata] Additional key-value pairs to associate
* with the recorded event.
Expand Down
Loading