MELT Type - NAMESPACE
MELT types (entities
, associations
, metrics
, and events
) are organized as AppD Types in the schema. AppD Types consist of two parts, namespace and type name.
AppD Types are often used in UQL queries. The syntax to use a AppD Type is <namespace>:<type name>
. For example apm:service
, apm
is the namespace and service
is the type name.
NAMESPACES clause
You can use the NAMESPACES clause to define a comma-separated list of namespaces. Use it for the following usecases:
- default namespaces
- namespace aliases
Note
All the clause keywords are valid in upper or lower case but not in mixed-case. Valid variants are 'namespaces' and 'NAMESPACES'.
Default NAMESPACES
With default namespace, you can specify types only as type names without namespaces and colon. The system evaluates it against a defined list of used namespaces.
If you define type names in multiple namespaces, the query fails.
NAMESPACES aliases
NAMESPACES clause can be used for a namespaces aliasing.
In this example, the entity type is resolved as k8s:pod.
Note
If you do not specify a namespace alias in the NAMESPACES clause then its name is used as the alias. For example these two clauses are the same:
- NAMESPACES apm
- NAMESPACES apm:apm
Warning
You cannot define more than one item with the same alias in the NAMESPACES.
NAMESPACES resolution
Namespaces defined within namespaces
clause are applied only to object types in the query, not to object IDs.
- Object type = a pair
<namespace>:<type>
, for example k8s:pod
- Object ID = a triplet
<namespace>:<type>:<ID>
, for example k8s:pod:DLT6XSeFMpqQxZIZ18mYkw
Warning
Object ID represents one concrete object; use the object ID as-is.
Default Values
Default values for the NAMESPACES
clause is