Metadata (proto)
type.metadata.v3.MetadataKey
[type.metadata.v3.MetadataKey proto]
MetadataKey provides a way to retrieve values from
Metadata using a key and a path.
For example, consider the following Metadata:
filter_metadata:
envoy.xxx:
prop:
foo: bar
xyz:
hello: envoy
The following MetadataKey would retrieve the string value “bar” from the Metadata:
key: envoy.xxx
path:
- key: prop
- key: foo
{
"key": ...,
"path": []
}
- key
(string, REQUIRED) The key name of the Metadata from which to retrieve the Struct. This typically represents a builtin subsystem or custom extension.
- path
(repeated type.metadata.v3.MetadataKey.PathSegment, REQUIRED) The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example,
[{key: prop}, {key: xyz}]would retrieve a struct or[{key: prop}, {key: foo}]would retrieve a string in the example above.Path segments support both struct field access (via
key) and list element access (viaindex). For example, to access the first element of a list atenvoy.filters.http.grpc_field_extraction.tenant_id, usepath: [{key: tenant_id}, {index: 0}].
type.metadata.v3.MetadataKey.PathSegment
[type.metadata.v3.MetadataKey.PathSegment proto]
Specifies a segment in a path for retrieving values from Metadata. Supports both key-based segments (field names in a Struct) and index-based segments (element access in a ListValue).
{
"key": ...,
"index": ...
}
- key
(string) If specified, use this key to retrieve the value in a Struct.
type.metadata.v3.MetadataKind
[type.metadata.v3.MetadataKind proto]
Describes different types of metadata sources.
{
"request": {...},
"route": {...},
"cluster": {...},
"host": {...}
}
- request
(type.metadata.v3.MetadataKind.Request) Request kind of metadata.
- route
(type.metadata.v3.MetadataKind.Route) Route kind of metadata.
- cluster
(type.metadata.v3.MetadataKind.Cluster) Cluster kind of metadata.
- host
(type.metadata.v3.MetadataKind.Host) Host kind of metadata.
type.metadata.v3.MetadataKind.Request
[type.metadata.v3.MetadataKind.Request proto]
Represents dynamic metadata associated with the request.
type.metadata.v3.MetadataKind.Route
[type.metadata.v3.MetadataKind.Route proto]
Represents metadata from the route.
type.metadata.v3.MetadataKind.Cluster
[type.metadata.v3.MetadataKind.Cluster proto]
Represents metadata from the upstream cluster.
type.metadata.v3.MetadataKind.Host
[type.metadata.v3.MetadataKind.Host proto]
Represents metadata from the upstream host.