- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Calculated Fields is in beta. Have feedback or a feature request? Let us know.
Request AccessConstruct | Syntax and Notation |
---|---|
Reserved attribute or tag named tag | tag (no prefix required) |
Attribute named attr | @attr (use an @ prefix) |
Calculated field named field | #field (use a # prefix) |
String literal (quote) For example, text or Quoted "text" . | "text" "Quoted \"text\"" (Log Search Syntax applies) |
Numeric literal (number) For example, ten . | 10 |
Function named func with parameters x and y | func(x, y) |
Operator For example, a binary operator * with operands x and y . | x*y |
The available operators in order of precedence:
Operator | Description |
---|---|
() | A grouping or function call |
! , NOT , - | A logical or arithmetic negation |
* , / | Multiplication, division |
+ , - | Addition, subtraction |
< , <= , > , >= | Less than, less than or equal to, greater than, greater than or equal to |
== , != | Match, does not match |
&& , AND | Logical AND |
|| , OR | Logical OR |
The available functions are categorized as follows:
Returns the absolute value of a number.
@client_latency
= 2@server_latency
= 3@client_latency
-@server_latency
)Rounds number up to the nearest integer.
@value
=2.2@value
)Rounds number down to the nearest integer.
@value
=9.99@value
)Finds maximum value amongst a set of numbers.
@list_of_values
=[-1, 1, 5, 5]@list_of_values
)Finds the minimum value amongst a set of numbers.
@list_of_values
= [-1, 1, 5, 5]@list_of_values
)Rounds a number. Optionally, define how many decimal places to maintain.
@randInt
= -1234.01@randInt
, -1)Combines multiple values into a single string.
@first_name
= "Bob"@last_name
= "Smith"@first_name
, @last_name
)Converts string to lowercase.
@first_name
= "Bob"@first_name
)Extracts a portion of text from the beginning of a string.
@country
="Canada"@country
, 3))Converts string to proper case.
@name
= "bob SMITH"@name
)Extracts the portion of text preceding a certain pattern in a string.
@row_value
= "1,Bob,Smith"@row_value
, ",")Extracts the portion of text following a certain pattern in a string.
@row_value
= "1,Bob,Smith"@row_value
, ",", 2)Extracts a portion of text from the middle of a string.
@row_value
= "1,Bob,Smith"@row_value
, 3, 3)Extracts a portion of text from the end of a string.
@url
= "www.datadoghq.com"@url
, 4)Combines multiple values into a single string with a delimiter in between.
@first_name
= "Bob"@last_name
= "Smith"@last_name
, @first_name
)Converts string to uppercase.
@first_name
= "Bob"@first_name
)Evaluates a series of conditions and returns a value accordingly.
Evaluates a condition and returns a value accordingly.
@origin_country
= "USA"@destination_country
= "Canada"@origin_continent
= "NA"@destination_continent
= "NA"@origin_country
== @destination_country
, "national", if(@origin_continent
== @destination_continent
, "continental", "intercontinental"))Checks if an attribute or expression is null.
@users_online
= 5@max_capacity
= 0@users_online
/ @max_capacity
)추가 유용한 문서, 링크 및 기사: