module ietf-netconf-otlp-context { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:otlp-context"; prefix ietf-netconf-otlp-context; import ietf-yang-structure-ext { prefix sx; reference "RFC8791: YANG Data Structure Extensions"; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: WG List: "; description "When propagating tracing information across applications, client and servers needs to share some specific contextual information. This NETCONF extensions aligns the NETCONF protocol to the W3C trace-context document: https://www.w3.org/TR/2021/REC-trace-context-1-20211123 Copyright (c) 2024 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself for full legal notices The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here. "; revision 2023-07-01 { description "Initial revision"; reference "RFC XXXX"; } identity meta-error { description "Base identity for otlp attribute errors."; } identity missing { base meta-error; description "Indicates an attribute or header that is required (in the current situation) is missing."; } identity bad-format { base meta-error; description "Indicates an attribute or header value where the value is incorrectly formatted."; } identity processing-error { base meta-error; description "Indicates that the server encountered a processing error while processing the attribute or header value."; } typedef meta-error-type { type identityref { base meta-error; } description "Error type"; } sx:structure otlp-trace-context-error-info { container otlp-trace-context-error-info { description "This error is returned by a NETCONF or RESTCONF server when a client sends a NETCONF RPC with additonal attributes or RESTCONF RPC with additional headers for trace context processing, and there is an error related to them. The server has aborted the RPC."; leaf meta-name { type string; description "The name of the problematic or missing meta information. In NETCONF, the qualified XML attribute name. In RESTCONF, the HTTP header name. If a client sent a NETCONF RPC with the attribute w3ctc:traceparent='incorrect-format' this leaf would have the value 'w3ctc:traceparent'"; } leaf meta-value { type string; description "The value of the problematic meta information received by the server. If a client sent a NETCONF RPC with the attribute w3ctc:traceparent='incorrect-format' this leaf would have the value 'incorrect-format'."; } leaf error-type { type meta-error-type; description "Indicates the type of OTLP meta information problem detected by the server. If a client sent an RPC annotated with the attribute w3ctc:traceparent='incorrect-format' this leaf might have the value 'ietf-netconf-otlp-context:bad-format'."; } } } }