2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 package org.onap.policy.drools.utils.logging;
22 import org.onap.policy.common.utils.network.NetworkUtil;
24 public class MdcTransactionConstants {
26 * The fields must match the naming given at
27 * https://wiki.onap.org/pages/viewpage.action?pageId=20087036
31 * End to end transaction ID. Subtransactions will inherit this value from the transaction.
33 public static final String REQUEST_ID = "RequestID";
36 * Invocation ID, ie. SubTransaction ID.
38 public static final String INVOCATION_ID = "InvocationID";
41 * Service Name. Both transactions and subtransactions will have its own copy.
43 public static final String SERVICE_NAME = "ServiceName";
46 * Partner Name Subtransactions will inherit this value from the transaction.
48 public static final String PARTNER_NAME = "PartnerName";
51 * Start Timestamp. Both transactions and subtransactions will have its own copy.
53 public static final String BEGIN_TIMESTAMP = "BeginTimestamp";
56 * End Timestamp. Both transactions and subtransactions will have its own copy.
58 public static final String END_TIMESTAMP = "EndTimestamp";
61 * Elapsed Time. Both transactions and subtransactions will have its own copy.
63 public static final String ELAPSED_TIME = "ElapsedTime";
66 * Elapsed Time. Both transactions and subtransactions will have its own copy.
68 public static final String SERVICE_INSTANCE_ID = "ServiceInstanceID";
71 * Virtual Server Name. Subtransactions will inherit this value from the transaction.
73 public static final String VIRTUAL_SERVER_NAME = "VirtualServerName";
76 * Status Code Both transactions and subtransactions will have its own copy.
78 public static final String STATUS_CODE = "StatusCode";
81 * Response Code Both transactions and subtransactions will have its own copy.
83 public static final String RESPONSE_CODE = "ResponseCode";
86 * Response Description Both transactions and subtransactions will have its own copy.
88 public static final String RESPONSE_DESCRIPTION = "ResponseDescription";
91 * Instance UUID Both transactions and subtransactions will have its own copy.
93 public static final String INSTANCE_UUID = "InstanceUUID";
96 * Severity Both transactions and subtransactions will have its own copy.
98 public static final String SEVERITY = "Severity";
101 * Target Entity Both transactions and subtransactions will have its own copy.
103 public static final String TARGET_ENTITY = "TargetEntity";
106 * Target Service Name Both transactions and subtransactions will have its own copy.
108 public static final String TARGET_SERVICE_NAME = "TargetServiceName";
111 * Server Subtransactions inherit this value. if (this.getSources().size() == 1)
112 * this.getSources().get(0).getTopic();
114 public static final String SERVER = "Server";
117 * Server IP Address Subtransactions inherit this value.
119 public static final String SERVER_IP_ADDRESS = "ServerIpAddress";
122 * Server FQDN Subtransactions inherit this value.
124 public static final String SERVER_FQDN = "ServerFQDN";
127 * Client IP Address Both transactions and subtransactions will have its own copy.
129 public static final String CLIENT_IP_ADDRESS = "ClientIPAddress";
132 * Process Key Both transactions and subtransactions will have its own copy.
134 public static final String PROCESS_KEY = "ProcessKey";
137 * Remote Host Both transactions and subtransactions will have its own copy.
139 public static final String REMOTE_HOST = "RemoteHost";
142 * Target Virtual Entity Both transactions and subtransactions will have its own copy.
144 public static final String TARGET_VIRTUAL_ENTITY = "TargetVirtualEntity";
149 public static final String CUSTOM_FIELD1 = "CustomField1";
154 public static final String CUSTOM_FIELD2 = "CustomField2";
159 public static final String CUSTOM_FIELD3 = "CustomField3";
164 public static final String CUSTOM_FIELD4 = "CustomField4";
167 * Default Service Name.
169 public static final String DEFAULT_SERVICE_NAME = "PDP-D";
174 public static final String DEFAULT_HOSTNAME = NetworkUtil.getHostname();
179 public static final String DEFAULT_HOSTIP = NetworkUtil.getHostIp();
182 * Status Code Complete.
184 public static final String STATUS_CODE_COMPLETE = "COMPLETE";
189 public static final String STATUS_CODE_FAILURE = "ERROR";
191 private MdcTransactionConstants() {