Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ migration](https://github.com/open-telemetry/semantic-conventions/blob/main/docs
The `code.namespace` attribute is no longer added. (#6870)
- The `code.function` attribute emitted by `go.opentelemetry.io/contrib/bridges/otelzap` now stores the package path-qualified function name instead of just the function name.
The `code.namespace` attribute is no longer added. (#6870)
- Improve performance by reducing allocations for common request protocols in the modules below. (#6845)
- `go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful`
- `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`
- `go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux`
- `go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho`
- `go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace`
- `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ func serverClientIP(xForwardedFor string) string {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ func splitHostPort(hostport string) (host string, port int) {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ func serverClientIP(xForwardedFor string) string {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ func splitHostPort(hostport string) (host string, port int) {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ func serverClientIP(xForwardedFor string) string {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ func splitHostPort(hostport string) (host string, port int) {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ func splitHostPort(hostport string) (host string, port int) {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ func serverClientIP(xForwardedFor string) string {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ func splitHostPort(hostport string) (host string, port int) {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}
11 changes: 10 additions & 1 deletion instrumentation/net/http/otelhttp/internal/semconv/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ func serverClientIP(xForwardedFor string) string {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ func splitHostPort(hostport string) (host string, port int) {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}
11 changes: 10 additions & 1 deletion internal/shared/semconv/util.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ func serverClientIP(xForwardedFor string) string {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}

Expand Down
11 changes: 10 additions & 1 deletion internal/shared/semconvutil/netconv.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ func splitHostPort(hostport string) (host string, port int) {

func netProtocol(proto string) (name string, version string) {
name, version, _ = strings.Cut(proto, "/")
name = strings.ToLower(name)
switch name {
case "HTTP":
name = "http"
case "QUIC":
name = "quic"
case "SPDY":
name = "spdy"
default:
name = strings.ToLower(name)
}
return name, version
}