-
- Downloads
chore(telemetry): automagically instrument HTTP clients
As part of #621, we want to have insight across everything `dmd` does. To automagically instrument our HTTP calls, we can use `otelhttp`'s inbuilt automagic `http.Transport` for this. This also improves the duplication by calling out to a central method for creating our HTTP client.
Showing
- cmd/dmd/cmd/db_generate_advisories.go 1 addition, 2 deletionscmd/dmd/cmd/db_generate_advisories.go
- cmd/dmd/cmd/db_generate_dependencyhealth.go 1 addition, 2 deletionscmd/dmd/cmd/db_generate_dependencyhealth.go
- cmd/dmd/cmd/db_generate_libyear.go 1 addition, 2 deletionscmd/dmd/cmd/db_generate_libyear.go
- cmd/dmd/cmd/db_generate_missingdata.go 1 addition, 2 deletionscmd/dmd/cmd/db_generate_missingdata.go
- cmd/dmd/cmd/import_scorecard.go 1 addition, 1 deletioncmd/dmd/cmd/import_scorecard.go
- cmd/dmd/cmd/report_hacktoberfest.go 1 addition, 2 deletionscmd/dmd/cmd/report_hacktoberfest.go
- go.mod 2 additions, 0 deletionsgo.mod
- internal/tracing/http.go 13 additions, 0 deletionsinternal/tracing/http.go
... | ... | @@ -26,6 +26,7 @@ require ( |
github.com/xanzy/go-gitlab v0.106.0 | ||
gitlab.com/tanna.dev/cobra-doc-template v0.0.0-20231221133114-8f5f0e77db94 | ||
gitlab.com/tanna.dev/endoflife-checker v0.7.0 | ||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 | ||
go.opentelemetry.io/otel v1.32.0 | ||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 | ||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 | ||
... | ... | @@ -58,6 +59,7 @@ require ( |
github.com/cespare/xxhash/v2 v2.3.0 // indirect | ||
github.com/charmbracelet/lipgloss v0.10.0 // indirect | ||
github.com/dustin/go-humanize v1.0.1 // indirect | ||
github.com/felixge/httpsnoop v1.0.4 // indirect | ||
github.com/go-ini/ini v1.67.0 // indirect | ||
github.com/go-logfmt/logfmt v0.6.0 // indirect | ||
github.com/go-logr/logr v1.4.2 // indirect | ||
... | ... |
internal/tracing/http.go
0 → 100644
Please register or sign in to comment