pub struct StdTag;Expand description
[Standard span tags][tags]. [tags]: https://github.com/opentracing/specification/blob/master/semantic_conventions.md#span-tags-table
Implementations§
Source§impl StdTag
impl StdTag
Sourcepub fn component<V>(value: V) -> Tag
pub fn component<V>(value: V) -> Tag
Makes a "component" tag.
It indicates the software package, framework, library,
or module that generated the associated Span.
E.g., "grpc", "django", "JDBI".
Sourcepub fn db_instance<V>(value: V) -> Tag
pub fn db_instance<V>(value: V) -> Tag
Makes a "db.instance" tag.
It indicates database instance name.
E.g., In java, if the jdbc.url="jdbc:mysql://127.0.0.1:3306/customers",
the instance name is "customers".
Sourcepub fn db_statement<V>(value: V) -> Tag
pub fn db_statement<V>(value: V) -> Tag
Makes a "db.statement" tag.
It indicates a database statement for the given database type.
E.g.,
for db.type="sql", "SELECT * FROM wuser_table";
for db.type="redis", "SET mykey 'WuValue'".
Sourcepub fn db_type<V>(value: V) -> Tag
pub fn db_type<V>(value: V) -> Tag
Makes a "db.type" tag.
It indicates database type.
For any SQL database, "sql".
For others, the lower-case database category, e.g. "cassandra", "hbase", or "redis".
Sourcepub fn db_user<V>(value: V) -> Tag
pub fn db_user<V>(value: V) -> Tag
Makes a "db.user" tag.
It indicates username for accessing database.
E.g., "readonly_user" or "reporting_user"
Sourcepub fn error() -> Tag
pub fn error() -> Tag
Makes a "error" tag that has the value true.
It indicates the application considers the operation represented by the Span to have failed.
Sourcepub fn http_method<V>(value: V) -> Tag
pub fn http_method<V>(value: V) -> Tag
Makes a "http.method" tag.
It indicates HTTP method of the request for the associated Span.
E.g., "GET", "POST"
Sourcepub fn http_status_code(value: u16) -> Tag
pub fn http_status_code(value: u16) -> Tag
Makes a "http.status_code" tag.
It indicates HTTP response status code for the associated Span.
E.g., 200, 503, 404
Sourcepub fn http_url<V>(value: V) -> Tag
pub fn http_url<V>(value: V) -> Tag
Makes a "http.url" tag.
It indicates URL of the request being handled in this segment of the trace, in standard URI format.
E.g., "https://domain.net/path/to?resource=here"
Sourcepub fn message_bus_destination<V>(value: V) -> Tag
pub fn message_bus_destination<V>(value: V) -> Tag
Makes a `“message_bus.destination” tag.
It indicates an address at which messages can be exchanged.
E.g. A Kafka record has an associated "topic name" that can be extracted by
the instrumented producer or consumer and stored using this tag.
Sourcepub fn peer_address<V>(value: V) -> Tag
pub fn peer_address<V>(value: V) -> Tag
Makes a "peer.address" tag.
It indicates remote “address”, suitable for use in a networking client library.
This may be a "ip:port", a bare "hostname", a FQDN,
or even a JDBC substring like "mysql://prod-db:3306".
Sourcepub fn peer_hostname<V>(value: V) -> Tag
pub fn peer_hostname<V>(value: V) -> Tag
Makes a "peer.hostname" tag.
It indicates remote hostname.
E.g., "opentracing.io", "internal.dns.name"
Sourcepub fn peer_addr(value: SocketAddr) -> Vec<Tag>
pub fn peer_addr(value: SocketAddr) -> Vec<Tag>
Makes a "peer.ipXX" and "peer.port" tags.
Sourcepub fn peer_ip(value: IpAddr) -> Tag
pub fn peer_ip(value: IpAddr) -> Tag
Makes a tag which has the name either "peer.ipv4" or "peer.ipv6" depending on the value.
It indicates remote IP address.
E.g., "127.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
Sourcepub fn peer_port(value: u16) -> Tag
pub fn peer_port(value: u16) -> Tag
Makes a "peer.port" tag.
It indicates remote port.
E.g., 80
Sourcepub fn peer_service<V>(value: V) -> Tag
pub fn peer_service<V>(value: V) -> Tag
Makes a "peer.service" tag.
It indicates remote service name (for some unspecified definition of "service").
E.g., "elasticsearch", "a_custom_microservice", "memcache"
Sourcepub fn sampling_priority(value: u32) -> Tag
pub fn sampling_priority(value: u32) -> Tag
Makes a "samplingpriority" tag.
If greater than 0, a hint to the Tracer to do its best to capture the trace.
If 0, a hint to the trace to not-capture the trace.
If absent, the Tracer should use its default sampling mechanism.