Skip to content

The TelemetryPolicy Custom Resource Definition (CRD)

TelemetryPolicy

Field Type Required Description
spec TelemetryPolicySpec Yes The specification for TelemetryPolicy custom resource
status TelemetryPolicyStatus No The status for the custom resource

TelemetryPolicySpec

Custom logging is disabled by default. To enable logging.default.fields, an administrator must set spec.enableLoggingFields: true on the Authorino CR. Creating a TelemetryPolicy alone does not enable custom logging, and logging fields apply only to routes with an AuthPolicy. This requires an Authorino and Authorino Operator version supporting custom logging fields.

Field Type Required Description
targetRef LocalPolicyTargetReferenceWithSectionName Yes Reference to a Kubernetes resource that the policy attaches to. For more info
metrics MetricsSpec No Metrics holds the telemetry metrics configuration. At least one of metrics or logging must be defined.
logging LoggingSpec No Logging holds the custom authorization decision logging configuration. At least one of metrics or logging must be defined.

LocalPolicyTargetReferenceWithSectionName

Field Type Required Description
LocalPolicyTargetReference LocalPolicyTargetReference Yes Reference to a local policy target.
sectionName SectionName No Section name for further specificity (if needed).

LocalPolicyTargetReference

Field Type Required Description
group Group Yes Group of the target resource.
kind Kind Yes Kind of the target resource.
name ObjectName Yes Name of the target resource.

SectionName

Field Type Required Description
SectionName v1.SectionName (String) Yes SectionName is the name of a section in a Kubernetes resource.
In the following resources, SectionName is interpreted as the following:
* Gateway: Listener name
* HTTPRoute: HTTPRouteRule name
* Service: Port name

MetricsSpec

Field Type Required Description
default MetricsConfig Yes Default metrics configuration that applies to all requests

MetricsConfig

Field Type Required Description
labels Map Yes Labels to add to metrics, where keys are label names and values are CEL expressions

LoggingSpec

Field Type Required Description
default LoggingConfig Yes Default logging configuration that applies to all requests

LoggingConfig

Field Type Required Description
fields Map Yes Fields to add to authorization decision logs, where keys are field names and values are CEL expressions

TelemetryPolicyStatus

Field Type Description
observedGeneration String Number of the last observed generation of the resource. Use it to check if the status info is up to date with latest resource spec.
conditions []ConditionSpec List of conditions that define that status of the resource.

See Also