-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(otel): Add native OpenTelemetry Transport module #3938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(otel): Add native OpenTelemetry Transport module #3938
Conversation
Adds a warning to the `NewClient` function documentation to inform developers that the default `http.Client` (created when passing `nil`) has no timeout, which can be a security risk in production environments.
…rovement-10999790790030565127 Add security warning to NewClient documentation
- Replaces expensive `fmt.Fprintf` with direct `bytes.Buffer` writes in `Stringify` for the string case, resulting in ~2x performance improvement. - Adds a documentation warning to `NewClient` about the lack of timeout when using the default HTTP client.
…rovement-10999790790030565127 perf: Optimize Stringify for strings and add NewClient warning
- Implement a buffer pool for `Stringify` to reduce memory allocations. - Replace `fmt.Fprintf` with `strconv` for primitive types (Bool, Int, Uint, Float) to avoid reflection overhead. - Ensure correct `bitSize` for `float32` and `float64` to prevent precision artifacts. - Adds a documentation warning to `NewClient` about the lack of timeout when using the default HTTP client.
…rovement-10999790790030565127 perf: Optimize Stringify with sync.Pool and strconv
…ent safety - Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts.
- Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts. - Include benchmark test file `strings_benchmark_test.go` to verify performance and correctness.
…rovement-10999790790030565127 Bolt sentinel client improvement 10999790790030565127
- Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts. - Include benchmark test file `strings_benchmark_test.go` to verify performance and correctness. - Include table-driven test `TestStringify_Primitives` in `strings_test.go` to verify all primitive type code paths.
…rovement-10999790790030565127 perf: Optimize Stringify with sync.Pool and strconv
…ent safety - Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts. - Include benchmark test file `strings_benchmark_test.go` to verify performance. - Add table-driven tests in `strings_test.go` covering all primitive types, edge cases (min/max), and precision.
…rovement-10999790790030565127 perf: Optimize Stringify allocations (~2x faster) and document NewCli…
…ent safety - Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts. - Include benchmark test file `strings_benchmark_test.go` to verify performance. - Add table-driven tests in `strings_test.go` covering all primitive types, edge cases (min/max), and precision.
- Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts. - Include benchmark test file `strings_benchmark_test.go` to verify performance. - Add comprehensive table-driven tests in `strings_test.go` verifying correctness for all primitive types, edge cases (min/max), precision, and concurrency safety. - Fix all linting issues (parallel tests, error formatting, range loops).
…rovement-10999790790030565127 Bolt sentinel client improvement 10999790790030565127
…ent safety - Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts. - Include benchmark test file `strings_benchmark_test.go` to verify performance. - Add table-driven tests in `strings_test.go` covering all primitive types, edge cases (min/max), precision, and concurrency safety. - Fix all linting issues (parallel tests, error formatting, range loops).
…rovement-10999790790030565127 perf: Optimize Stringify allocations (~2x faster) and document NewCli…
…ent safety - Implement sync.Pool for bytes.Buffer reuse in Stringify. - Replace fmt.Fprintf with zero-allocation strconv calls for primitives. - Fix float32/float64 formatting precision. - Add security warning to NewClient regarding default client timeouts. - Include benchmark test file `strings_benchmark_test.go` using idiomatic Go 1.24 features. - Add comprehensive table-driven tests in `strings_test.go` verifying correctness for all primitive types, edge cases (min/max), precision, and concurrency safety. - Fix all linting issues (parallel tests, error formatting, range loops, b.Loop).
…rovement-10999790790030565127 perf: Optimize Stringify allocations (~2x faster) and document NewCli…
…provement-10999790790030565127-15006340757148053698 Revert a89c0a6 from bolt branch
|
@gmlewis - Surprise! Haha. Please review. |
|
@merchantmoh-debug - I'm starting to think I'm talking to a bot. |
|
@gmlewis - Yeah. My bad. It's on my local disk set up. I use antigravity heavily. It likely made an error. I'll fix it. |
1d9b307 to
4536640
Compare
A bot that codes 3x performance boosts to stringify? Can I get access to that bot please? |
Adds a new optional module
github.com/google/go-github/v81/otelwhich provides anhttp.RoundTripperinstrumented with OpenTelemetry.Features
github/GET).X-RateLimit-*) and records them as Span Attributes (github.rate_limit.remaining,github.rate_limit.reset).X-Github-Request-Idfor easy debugging with GitHub Support.Verification
Validated with
otel/exampleapp against the live API.Dependencies are isolated in a nested module to avoid bloating core
go-github.