Syntax
Java
NewRelic.removeAttribute(string $name)Kotlin
NewRelic.removeAttribute(name: String?)Description
This method removes an attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute that you want to remove. |
Return values
Returns true if recorded successfully, and false if it doesn't.
Example
Here's an example of removing an attribute named rate:
Java
boolean attributeRemoved = NewRelic.removeAttribute("rate");Kotlin
val attributeRemoved = NewRelic.removeAttribute("rate")Syntax
Objective-c
removeAttribute:(NSString*)name;Swift
NewRelic.removeAttribute(_ name: : String!)-> BoolDescription
This method removes the attribute specified by the name string from the session. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute that you want to remove. |
Return values
Returns true if recorded successfully, and false if it doesn't.
Examples
Objective-C
Here's an example to remove the session attribute specified by a NSString* named rate:
BOOL attributeRemoved = [NewRelic removedAttribute@"rate"];Swift
Here's an example to remove the session attribute specified by a string named rate:
let attributeRemoved = NewRelic.removedAttribute("rate")Syntax
removeAttribute(options: { name: string; }) => voidDescription
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
NewRelicCapacitorPlugin.removeAttribute({ name: "CapacitorAttribute" });Syntax
removeAttribute(name: string): void;Description
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
NewRelic.removeAttribute({ name: "CordovaAttribute" }); voidSyntax
RemoveAttribute(string name) : bool;Description
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
CrossNewRelic.Current.RemoveAttribute("MAUINumAttr");Syntax
removeAttribute(name: string): void;Description
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
NewrelicMobile.instance.removeAttribute("FlutterCustomAttrNumber");Syntax
removeAttribute(name: string): void;Description
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
NewRelic.removeAttribute('RNCustomAttrNumber');Syntax
RemoveAttribute(string name) : bool;Description
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
NewRelicAgent.RemoveAttribute("UnityCustomAttrNumber");Syntax
removeAttribute(FString name) : void;Description
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
#include "NewRelicBPLibrary.h"
UNewRelicBPLibrary::removeAttribute("Unreal String");
Syntax
RemoveAttribute(string name) : bool;Description
This method removes the attribute specified by the name string. If you want to remove all custom attributes, see Remove all attributes.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. The name of the attribute. |
Example
CrossNewRelicClient.Current.RemoveAttribute("XamarinNumAttr");