• Log Entry
    • Template

    Log Entry

    The logentry template represents an individual entry within a log.

    Example config:

    1. apiVersion: "config.istio.io/v1alpha2"
    2. kind: instance
    3. metadata:
    4. name: accesslog
    5. namespace: istio-system
    6. spec:
    7. compiledTemplate: logentry
    8. params:
    9. severity: '"Default"'
    10. timestamp: request.time
    11. variables:
    12. sourceIp: source.ip | ip("0.0.0.0")
    13. destinationIp: destination.ip | ip("0.0.0.0")
    14. sourceUser: source.principal | ""
    15. method: request.method | ""
    16. url: request.path | ""
    17. protocol: request.scheme | "http"
    18. responseCode: response.code | 0
    19. responseSize: response.size | 0
    20. requestSize: request.size | 0
    21. latency: response.duration | "0ms"
    22. monitored_resource_type: '"UNSPECIFIED"'

    Template

    The logentry template represents an individual entry within a log.

    When writing the configuration, the value for the fields associated with this template can either be aliteral or an expression. Please note that if the datatype of a field is not istio.policy.v1beta1.Value,then the expression’s inferred type must match the datatype of the field.

    FieldTypeDescriptionRequired
    variablesmap<string, Value>Variables that are delivered for each log entry.No
    timestampTimeStampTimestamp is the time value for the log entryNo
    severitystringSeverity indicates the importance of the log entry.No
    monitoredResourceTypestringOptional. An expression to compute the type of the monitored resource this log entry is being recorded on.If the logging backend supports monitored resources, these fields are used to populate that resource.Otherwise these fields will be ignored by the adapter.No
    monitoredResourceDimensionsmap<string, Value>Optional. A set of expressions that will form the dimensions of the monitored resource this log entry is beingrecorded on. If the logging backend supports monitored resources, these fields are used to populate that resource.Otherwise these fields will be ignored by the adapter.No