Standard Attributes and Aliasing
New announcements from Dash: Incident Management, Continuous Profiler, and more! New announcements from Dash!

Standard Attributes and Aliasing

Naming conventions

Centralizing logs from various technologies and applications tends to generate tens or hundreds of different attributes in a Log Management environment—especially when many teams’ users, each one with their own personal usage patterns, are working within the same environment.

For instance, a client IP might be transcribed with various attributes within your logs: clientIP, client_ip_address, remote_address, client.ip, etc. The execution time of a request may be referred to as exec_time, request_latency, request.time_elapsed, etc.

In this context, the number of created or provided attributes can lead to confusion and difficulty to configure or understand the environment. It is also cumbersome to know which attributes correspond to the the logs of interest and—for instance—correlating web proxy with web application logs would be difficult.

Even if technologies and teams natively define their respective logs attributes differently, a URL, client IP, or duration have universally consistent meanings. A naming convention defines standard names to use when referring to structuring technical or business concepts, resulting in a common language that everyone agrees to use by convention.

Standard attributes and aliasing

Standard Attributes are the backbone of the naming convention for your organization.

With Aliasing, search and aggregate logs flowing from heterogenous sources. Onboard users across multiple teams with your naming convention, without asking them for changes in their technical stack.

Aliasing is particularly useful when it comes to filtering or aggregating logs from different sources altogether—that is to say, when turned into facets. Gathering content from multiple and heterogenous sources into a unique Standard Facet makes it much more straightforward to build insights or pivot information across your organization.

For example, follow the clients most impacted by latencies on a hybrid Apache and Amazon Cloud Front infrastructure, using the standard Network Client IP facet alongside the standard duration.

Curate standard attributes

Log integrations natively rely on a default set of standard attributes.

Admin users in your organization can curate the list:

  • From the Log Explorer, promoting existing attributes as standard attributes.
  • From the standard attribute configuration page, creating new standard attributes from scratch.

Aliasing

Aliasing a source attribute towards a destination attribute allow logs carrying the source attribute to carry the source and destination attribute, both with the same value.

Users can interact with either the aliased (source) or standard (destination) faceted attribute. As far as facets are concerned, however, users are nudged to use the standard facet rather than the aliased one. This provides guidance towards the naming convention, and discourages users from building assets (such as saved views or dashboards) based on non-standard content.

Additional details regarding aliasing:

  • Aliasing happens after the logs are processed by the pipelines. Any extracted or processed attribute can be used a source for aliasing.
  • Datadog enforces the type of an aliased attribute. If this is not possible, the aliasing is skipped.
  • In case a log already carries the destination attribute, aliasing overrides the value.
  • For a standard attribute to which multiple attributes are aliased, if a log carries several of these source attributes, only one of these source attributes is aliased.
  • Any updates or additions to standard attributes are only applied to newly ingested logs.
  • Standard attributes cannot be aliased.
  • Attributes can only be aliased to standard attributes.
  • To respect the JSON structure of the logs, it is not possible to have one standard attribute as the child of another (for example user and user.name cannot both be standard attributes).

Standard attributes in log configuration

The standard attribute table is available in Log Configuration pages, along with pipelines and other logs intake capabilities such as metrics generation, archives, exclusion filters, etc.

Standard attribute list

The standard attribute table comes with a set of predefined standard attributes. You can append that list with your own attributes, and edit or delete existing standard attributes:

A standard attribute is defined by its:

  • Path: The path of the attribute promoted as a standard attribute, as you would find it in your JSON (for example: network.client.ip).
  • Type (string, integer, double, boolean): The type of the attribute, which is used to cast elements of the remapping list.
  • Aliasing list: Comma separated list of attributes that should be aliased to it.
  • Description: Human readable description of the attribute.

The standard attribute panel appears when you add a new standard attribute or edit an existing one:

Standard Attributes in The Log Explorer

Alias attributes directly from the log explorer. See the associated documentation for reference.

Default standard attribute list

The default standard attribute list is split into 7 functional domains:

Network

The following attributes are related to the data used in network communication. All fields and metrics are prefixed by network.

FullnameTypeDescription
network.client.ipstringThe IP address of the client that initiated the TCP connection.
network.destination.ipstringThe IP address the client connected to.
network.client.portnumberThe port of the client that initiated the connection.
network.destination.portnumberThe TCP port the client connected to.
network.bytes_readnumberTotal number of bytes transmitted from the client to the server when the log is emitted.
network.bytes_writtennumberTotal number of bytes transmitted from the server to the client when the log is emitted.

Typical integrations relying on these attributes include Apache, Varnish, AWS ELB, Nginx, HAProxy, etc.

Geolocation

The following attributes are related to the geolocation of IP addresses used in network communication. All fields are prefixed by network.client.geoip or network.destination.geoip.

FullnameTypeDescription
network.client.geoip.country.namestringName of the country
network.client.geoip.country.iso_codestringISO Code of the country (example: US for the United States, FR for France)
network.client.geoip.continent.codestringISO code of the continent (EU, AS, NA, AF, AN, SA, OC)
network.client.geoip.continent.namestringName of the continent (Europe, Australia, North America, Africa, Antartica, South America, Oceania)
network.client.geoip.subdivision.namestringName of the first subdivision level of the country (example: California in the United States or the Sarthe department in France)
network.client.geoip.subdivision.iso_codestringISO Code of the first subdivision level of the country (example: CA in the United States or the SA department in France)
network.client.geoip.city.nameStringThe name of the city (example Paris, New York)

HTTP requests

These attributes are related to the data commonly used in HTTP requests and accesses. All attributes are prefixed by http.

Typical integrations relying on these attributes include Apache, Rails, AWS CloudFront, web applications servers, etc.

Common attributes

FullnameTypeDescription
http.urlstringThe URL of the HTTP request.
http.status_codenumberThe HTTP response status code.
http.methodstringIndicates the desired action to be performed for a given resource.
http.refererstringHTTP header field that identifies the address of the webpage that linked to the resource being requested.
http.request_idstringThe ID of the HTTP request.
http.useragentstringThe User-Agent as it is sent (raw format). See below for more details.
http.versionstringThe version of HTTP used for the request.

URL details attributes

These attributes provide details about the parsed parts of the HTTP URL. They are generally generated thanks to the URL parser. All attributes are prefixed by http.url_details.

FullnameTypeDescription
http.url_details.hoststringThe HTTP host part of the URL.
http.url_details.portnumberThe HTTP port part of the URL.
http.url_details.pathstringThe HTTP path part of the URL.
http.url_details.queryStringobjectThe HTTP query string parts of the URL decomposed as query params key/value attributes.
http.url_details.schemestringThe protocol name of the URL (HTTP or HTTPS)

User-Agent attributes

These attributes provide details about the meanings of user-agents’ attributes. They are generally generated thanks to the User-Agent parser. All attributes are prefixed by http.useragent_details.

FullnameTypeDescription
http.useragent_details.os.familystringThe OS family reported by the User-Agent.
http.useragent_details.browser.familystringThe Browser Family reported by the User-Agent.
http.useragent_details.device.familystringThe Device family reported by the User-Agent.

Source code

These attributes are related to the data used when a log or an error is generated via a logger in a custom application. All attributes are prefixed either by logger or error.

FullnameTypeDescription
logger.namestringThe name of the logger.
logger.thread_namestringThe name of the current thread when the log is fired.
logger.method_namestringThe class method name.
logger.versionstringThe version of the logger.
error.kindstringThe error type or kind (or code is some cases).
error.messagestringA concise, human-readable, one-line message explaining the event
error.stackstringThe stack trace or the complementary information about the error

Typical integrations relying on these attributes are: Java, NodeJs, .NET, Golang, Python, etc.

Database

Database related attributes are prefixed by db.

FullnameTypeDescription
db.instancestringDatabase instance name. E.g., in Java, if jdbc.url="jdbc:mysql://127.0.0.1:3306/customers", the instance name is customers.
db.statementstringA database statement for the given database type. E.g., for mySQL: "SELECT * FROM wuser_table"; for Redis: "SET mykey 'WuValue'".
db.operationstringThe operation that was performed (“query”, “update”, “delete”,…).
db.userstringUser that performs the operation.

Typical integrations relying on these attributes are: Cassandra, MySQL, RDS, Elasticsearch, etc.

Performance

Performance metrics attributes.

FullnameTypeDescription
durationnumberA duration of any kind in nanoseconds: HTTP response time, database query time, latency, etc.

Datadog advises you to remap any durations within your logs on this attribute since Datadog displays and uses it as a default measure for trace search.

All attributes and measures are prefixed by usr.

FullnameTypeDescription
usr.idstringThe user identifier.
usr.namestringThe user friendly name.
usr.emailstringThe user email.

Syslog and log shippers

These attributes are related to the data added by a syslog or a log-shipper agent. All fields and metrics are prefixed by syslog.

FullnameTypeDescription
syslog.hostnamestringThe hostname
syslog.appnamestringThe application name. Generally remapped to the service reserved attribute.
syslog.severitynumberThe log severity. Generally remapped to the status reserved attribute.
syslog.timestampstringThe log timestamp. Generally remapped to the date reserved attribute.
syslog.envstringThe environment name where the source of logs come from.

Some integrations that rely on these are: Rsyslog, NxLog, Syslog-ng, Fluentd, Logstash, etc.

DNS

All attributes and measures are prefixed by dns.

FullnameTypeDescription
dns.idstringThe DNS query identifier.
dns.question.namestringThe queried domain name.
dns.question.typestringA two octet code which specifies the DNS question type.
dns.question.classstringThe class looked up by the DNS question (i.e IN when using the internet).
dns.question.sizenumberThe DNS question size in bytes.
dns.answer.namestringThe IP address that the DNS answers with.
dns.answer.typestringA two octet code which specifies the DNS answer type.
dns.answer.classstringThe class answered by the DNS.
dns.answer.sizenumberThe DNS answer size in bytes.
dns.flags.rcodestringThe DNS reply code.

Events

All attributes are prefixed by evt.

FullnameTypeDescription
evt.namestringThe shared name across events generated by the same activity (e.g.: authentication).
evt.outcomestringThe result of the event (e.g. success, failure).

Further Reading