semconv

package
v0.0.0-...-ac6f71b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package semconv provides utilities for working with OpenTelemetry semantic conventions related to HTTP and network operations.

Index

Constants

View Source
const (
	// HistogramMeasureUnitSeconds represents the unit (UCUM) convention for
	// measuring durations in seconds.
	HistogramMeasureUnitSeconds = "s"
	// ClientRequestDuration is the key representing the histogram unit for
	// outbound request durations in seconds.
	ClientRequestDuration = "http.client.duration"
)

Variables

This section is empty.

Functions

func ClientRequest

func ClientRequest(req *http.Request) []attribute.KeyValue

ClientRequest returns trace attributes for an HTTP request made by a client. It always includes "http.request.method" and optionally the "server.address".

func ClientResponse

func ClientResponse(res *http.Response) []attribute.KeyValue

ClientResponse returns attributes for an HTTP response received by a client from a server. It includes the "http.response.status_code" attribute if the response status code is defined.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL