• English日本語한국어
  • Log inStart now

.NET custom attributes

Attributes are key-value pairs containing information that determines the properties of an event or transaction. You can create custom attributes using the AddCustomAttribute API.

When adding custom attribute values to transactions, custom events, spans, and errors, the API accepts an object. This describes how these values are processed and how they will appear in APM. In all cases, NULL values are not recorded.

.NET type

How the value will be represented

byte, Int16, Int32, Int64

sbyte, UInt16, UInt32, UInt64

As an integral value

float, double, decimal

A decimal-based number


A string truncated after 255-bytes.

Empty strings are supported.


True or false


A string representation following the ISO-8601 format, including time zone information:



A decimal-based number representing number of seconds.

everything else

The ToString() method will be applied. Custom types must have an implementation of Object.ToString() or they will throw an exception.

Copyright © 2024 New Relic Inc.

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