Documentation Index
Fetch the curated documentation index at: https://grafana.com/llms.txt
Fetch the complete documentation index at: https://grafana.com/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: https://grafana.com/docs/alloy/v1.2/get-started/configuration-syntax/expressions.md (append .md) or send Accept: text/markdown to https://grafana.com/docs/alloy/v1.2/get-started/configuration-syntax/expressions/. For the curated documentation index, use https://grafana.com/llms.txt. For the complete documentation index, use https://grafana.com/llms-full.txt.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Expressions
Expressions represent or compute values you can assign to attributes within a configuration.
Basic expressions are literal values, like "Hello, world!" or true.
Expressions may also do things like refer to values exported by components, perform arithmetic, or call functions.
You use expressions when you configure any component. All component arguments have an underlying type. Alloy checks the expression type before assigning the result to an attribute.