Skip to content

Commit

Permalink
Switch HTTP client to not use external memory for header injection (#705
Browse files Browse the repository at this point in the history
)

* WIP: Switch writing HTTP Traceparent without external memory

* Remove old code, optional probes

* update offsets

* remove prints, add dependents probe filtering

* Add changelog statement

* add manager tests

* add license to manager tests

* format new test file

* Address PR feedback

* Update offsets

* simplify the changed code, since we don't need to count probes now

* atomic writes for traceparent

* add dependents validation and tests

* apply pr feedback
  • Loading branch information
grcevski authored Apr 24, 2024
1 parent ef8f679 commit 47a32e4
Show file tree
Hide file tree
Showing 16 changed files with 1,062 additions and 125 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ OpenTelemetry Go Automatic Instrumentation adheres to [Semantic Versioning](http
- Base Dockerfile and build caching ([#683](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/683))
- Add `server.address`, `server.port` and `network.protocol.version` to HTTP client spans ([#696](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/696))
- Update http server attributes to latest semantic conventions ([#708](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/708))
- Don't use external memory for http client header injection ([#705](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/705))

### Fixed

Expand Down
328 changes: 328 additions & 0 deletions internal/pkg/inject/offset_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,334 @@
{
"module": "std",
"packages": [
{
"package": "bufio",
"structs": [
{
"struct": "Writer",
"fields": [
{
"field": "buf",
"offsets": [
{
"offset": 16,
"versions": [
"1.12.0",
"1.12.1",
"1.12.2",
"1.12.3",
"1.12.4",
"1.12.5",
"1.12.6",
"1.12.7",
"1.12.8",
"1.12.9",
"1.12.10",
"1.12.11",
"1.12.12",
"1.12.13",
"1.12.14",
"1.12.15",
"1.12.16",
"1.12.17",
"1.13.0",
"1.13.1",
"1.13.2",
"1.13.3",
"1.13.4",
"1.13.5",
"1.13.6",
"1.13.7",
"1.13.8",
"1.13.9",
"1.13.10",
"1.13.11",
"1.13.12",
"1.13.13",
"1.13.14",
"1.13.15",
"1.14.0",
"1.14.1",
"1.14.2",
"1.14.3",
"1.14.4",
"1.14.5",
"1.14.6",
"1.14.7",
"1.14.8",
"1.14.9",
"1.14.10",
"1.14.11",
"1.14.12",
"1.14.13",
"1.14.14",
"1.14.15",
"1.15.0",
"1.15.1",
"1.15.2",
"1.15.3",
"1.15.4",
"1.15.5",
"1.15.6",
"1.15.7",
"1.15.8",
"1.15.9",
"1.15.10",
"1.15.11",
"1.15.12",
"1.15.13",
"1.15.14",
"1.15.15",
"1.16.0",
"1.16.1",
"1.16.2",
"1.16.3",
"1.16.4",
"1.16.5",
"1.16.6",
"1.16.7",
"1.16.8",
"1.16.9",
"1.16.10",
"1.16.11",
"1.16.12",
"1.16.13",
"1.16.14",
"1.16.15",
"1.17.0",
"1.17.1",
"1.17.2",
"1.17.3",
"1.17.4",
"1.17.5",
"1.17.6",
"1.17.7",
"1.17.8",
"1.17.9",
"1.17.10",
"1.17.11",
"1.17.12",
"1.17.13",
"1.18.0",
"1.18.1",
"1.18.2",
"1.18.3",
"1.18.4",
"1.18.5",
"1.18.6",
"1.18.7",
"1.18.8",
"1.18.9",
"1.18.10",
"1.19.0",
"1.19.1",
"1.19.2",
"1.19.3",
"1.19.4",
"1.19.5",
"1.19.6",
"1.19.7",
"1.19.8",
"1.19.9",
"1.19.10",
"1.19.11",
"1.19.12",
"1.19.13",
"1.20.0",
"1.20.1",
"1.20.2",
"1.20.3",
"1.20.4",
"1.20.5",
"1.20.6",
"1.20.7",
"1.20.8",
"1.20.9",
"1.20.10",
"1.20.11",
"1.20.12",
"1.20.13",
"1.20.14",
"1.21.0",
"1.21.1",
"1.21.2",
"1.21.3",
"1.21.4",
"1.21.5",
"1.21.6",
"1.21.7",
"1.21.8",
"1.21.9",
"1.22.0",
"1.22.1",
"1.22.2"
]
}
]
},
{
"field": "n",
"offsets": [
{
"offset": 40,
"versions": [
"1.12.0",
"1.12.1",
"1.12.2",
"1.12.3",
"1.12.4",
"1.12.5",
"1.12.6",
"1.12.7",
"1.12.8",
"1.12.9",
"1.12.10",
"1.12.11",
"1.12.12",
"1.12.13",
"1.12.14",
"1.12.15",
"1.12.16",
"1.12.17",
"1.13.0",
"1.13.1",
"1.13.2",
"1.13.3",
"1.13.4",
"1.13.5",
"1.13.6",
"1.13.7",
"1.13.8",
"1.13.9",
"1.13.10",
"1.13.11",
"1.13.12",
"1.13.13",
"1.13.14",
"1.13.15",
"1.14.0",
"1.14.1",
"1.14.2",
"1.14.3",
"1.14.4",
"1.14.5",
"1.14.6",
"1.14.7",
"1.14.8",
"1.14.9",
"1.14.10",
"1.14.11",
"1.14.12",
"1.14.13",
"1.14.14",
"1.14.15",
"1.15.0",
"1.15.1",
"1.15.2",
"1.15.3",
"1.15.4",
"1.15.5",
"1.15.6",
"1.15.7",
"1.15.8",
"1.15.9",
"1.15.10",
"1.15.11",
"1.15.12",
"1.15.13",
"1.15.14",
"1.15.15",
"1.16.0",
"1.16.1",
"1.16.2",
"1.16.3",
"1.16.4",
"1.16.5",
"1.16.6",
"1.16.7",
"1.16.8",
"1.16.9",
"1.16.10",
"1.16.11",
"1.16.12",
"1.16.13",
"1.16.14",
"1.16.15",
"1.17.0",
"1.17.1",
"1.17.2",
"1.17.3",
"1.17.4",
"1.17.5",
"1.17.6",
"1.17.7",
"1.17.8",
"1.17.9",
"1.17.10",
"1.17.11",
"1.17.12",
"1.17.13",
"1.18.0",
"1.18.1",
"1.18.2",
"1.18.3",
"1.18.4",
"1.18.5",
"1.18.6",
"1.18.7",
"1.18.8",
"1.18.9",
"1.18.10",
"1.19.0",
"1.19.1",
"1.19.2",
"1.19.3",
"1.19.4",
"1.19.5",
"1.19.6",
"1.19.7",
"1.19.8",
"1.19.9",
"1.19.10",
"1.19.11",
"1.19.12",
"1.19.13",
"1.20.0",
"1.20.1",
"1.20.2",
"1.20.3",
"1.20.4",
"1.20.5",
"1.20.6",
"1.20.7",
"1.20.8",
"1.20.9",
"1.20.10",
"1.20.11",
"1.20.12",
"1.20.13",
"1.20.14",
"1.21.0",
"1.21.1",
"1.21.2",
"1.21.3",
"1.21.4",
"1.21.5",
"1.21.6",
"1.21.7",
"1.21.8",
"1.21.9",
"1.22.0",
"1.22.1",
"1.22.2"
]
}
]
}
]
}
]
},
{
"package": "net/http",
"structs": [
Expand Down
Loading

0 comments on commit 47a32e4

Please sign in to comment.