/**
 * Copyright 2016-2017 The OpenTracing Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package io.opentracing.tag;

/**
 * The following span tags are recommended for instrumentors who are trying to capture more
 * semantic information about the spans. Tracers may expose additional features based on these
 * standardized data points. Tag names follow a general structure of namespacing.
 *
 * @see <a href="https://github.com/opentracing/specification/blob/master/data_conventions.yaml">https://github.com/opentracing/specification/blob/master/data_conventions.yaml</a>
 */

public final class Tags {
    private Tags(){}

    /**
    * A constant for setting the span kind to indicate that it represents a server span.
    */
    public static final String SPAN_KIND_SERVER = "server";

    /**
     * A constant for setting the span kind to indicate that it represents a client span.
     */
    public static final String SPAN_KIND_CLIENT = "client";

    /**
     *  HTTP_URL records the url of the incoming request.
     */
    public static final StringTag HTTP_URL = new StringTag("http.url");

    /**
     *  HTTP_STATUS records the http status code of the response.
     */
    public static final IntTag HTTP_STATUS = new IntTag("http.status_code");

    /**
     *  HTTP_METHOD records the http method. Case-insensitive.
     */
    public static final StringTag HTTP_METHOD = new StringTag("http.method");

    /**
     *  PEER_HOST_IPV4 records IPv4 host address of the peer.
     */
    public static final IntTag PEER_HOST_IPV4 = new IntTag("peer.ipv4");

    /**
     *  PEER_HOST_IPV6 records the IPv6 host address of the peer.
     */
    public static final StringTag PEER_HOST_IPV6 = new StringTag("peer.ipv6");

    /**
     *  PEER_SERVICE records the service name of the peer.
     */
    public static final StringTag PEER_SERVICE = new StringTag("peer.service");

    /**
     * PEER_HOSTNAME records the host name of the peer.
     */
    public static final StringTag PEER_HOSTNAME = new StringTag("peer.hostname");

    /**
     *  PEER_PORT records the port number of the peer.
     */
    public static final ShortTag PEER_PORT = new ShortTag("peer.port");

    /**
     *  SAMPLING_PRIORITY determines the priority of sampling this Span.
     */
    public static final ShortTag SAMPLING_PRIORITY = new ShortTag("sampling.priority");

    /**
     *  SPAN_KIND hints at the relationship between spans, e.g. client/server.
     */
    public static final StringTag SPAN_KIND = new StringTag("span.kind");

    /**
     *  COMPONENT is a low-cardinality identifier of the module, library, or package that is instrumented.
     */
    public static final StringTag COMPONENT  = new StringTag("component");

    /**
     * ERROR indicates whether a Span ended in an error state.
     */
    public static final BooleanTag ERROR = new BooleanTag("error");
}

@@ -1130,17 +1130,23 @@
 e Tags()
-%7B
+ %7B%0A    
 %7D%0A%0A    /
@@ -1144,24 +1144,25 @@
  %7D%0A%0A    /**%0A
+ 
     * A cons
@@ -1234,24 +1234,25 @@
 erver span.%0A
+ 
     */%0A    p
@@ -1484,25 +1484,24 @@
   /**%0A     *
- 
  HTTP_URL re
@@ -1630,25 +1630,24 @@
   /**%0A     *
- 
  HTTP_STATUS
@@ -1793,17 +1793,16 @@
 *%0A     *
- 
  HTTP_ME
@@ -1942,33 +1942,32 @@
 %0A%0A    /**%0A     *
- 
  PEER_HOST_IPV4 
@@ -2097,25 +2097,24 @@
   /**%0A     *
- 
  PEER_HOST_I
@@ -2258,25 +2258,24 @@
   /**%0A     *
- 
  PEER_SERVIC
@@ -2572,17 +2572,16 @@
 *%0A     *
- 
  PEER_PO
@@ -2715,17 +2715,16 @@
 *%0A     *
- 
  SAMPLIN
@@ -2892,17 +2892,16 @@
 *%0A     *
- 
  SPAN_KI
@@ -3061,17 +3061,16 @@
 *%0A     *
- 
  COMPONE
@@ -3213,17 +3213,16 @@
 MPONENT 
- 
 = new St
@@ -3390,11 +3390,967 @@
 error%22);
+%0A%0A    /**%0A     * DB_TYPE indicates the type of Database.%0A     * For any SQL database, %22sql%22. For others, the lower-case database category, e.g. %22cassandra%22, %22hbase%22, or %22redis%22%0A     */%0A    public static final StringTag DB_TYPE = new StringTag(%22db.type%22);%0A%0A    /**%0A     * DB_INSTANCE indicates the instance name of Database.%0A     * If the jdbc.url=%22jdbc:mysql://127.0.0.1:3306/customers%22, instance name is %22customers%22.%0A     */%0A    public static final StringTag DB_INSTANCE = new StringTag(%22db.instance%22);%0A%0A    /**%0A     * DB_USER indicates the user name of Database, e.g. %22readonly_user%22 or %22reporting_user%22%0A     */%0A    public static final StringTag DB_USER = new StringTag(%22db.user%22);%0A%0A    /**%0A     * DB_STATEMENT records a database statement for the given database type.%0A     * For db.type=%22SQL%22, %22SELECT * FROM wuser_table%22. For db.type=%22redis%22, %22SET mykey %22WuValue%22.%0A     */%0A    public static final StringTag DB_STATEMENT = new StringTag(%22db.statement%22);
 %0A%7D%0A

Add new tags based on OT spec update. (#103)