You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: oteps/profiles/4947-thread-ctx.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ The following values are stored:
41
41
* Note: Beyond evolution of the format, having the type of the schema allows the application to e.g. signal that it's a go application and thus context should be read from [go pprof labels and not the thread-local](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/tree/main/design-docs/00002-custom-labels) or from a different offset for [node.js](https://www.polarsignals.com/blog/posts/2025/11/19/custom-labels-for-node-js). (Such alternative schemas would be subject of separate documents)
42
42
*`threadlocal.attribute_key_map` - provides a mapping from **key indexes** (uint8 maximum) to **attribute names** (string). The thread local storage itself will then use these key indexes in place of the **attribute names**.
43
43
44
-
The exact format used will be the protobuf structure standardised in OTEP-4719. A stringified representation of this showing the usage of the elements of that schema along with some example values:
44
+
The exact format used will be the protobuf structure standardized in OTEP-4719. A stringified representation of this showing the usage of the elements of that schema along with some example values:
45
45
46
46
```yaml
47
47
key: "threadlocal.schema_version"
@@ -196,7 +196,7 @@ The OpenTelemetry eBPF profiler, by design, has the necessary permissions and op
196
196
197
197
Creating TLSDESC variables and ensuring they end up in the processes `dynsym` table adds complexity to SDK implementations.
198
198
199
-
**Mitigation:** We've created an extension of the existing PolarSignals [custom-labels](http://polarsignals/custom-labels) work, providing a reference implementation in C and bindings in Rust.
199
+
**Mitigation:** We've created an extension of the existing PolarSignals [custom-labels](https://github.com/polarsignals/custom-labels) work, providing a reference implementation in C and bindings in Rust.
200
200
201
201
### Complexity for End Users building from source
202
202
@@ -215,8 +215,8 @@ As requirements evolve, we may need to extend the payload format.
215
215
216
216
By separating frequently changing **Thread Local Context Record** data from static, process-wide **Context Reference Data**, we ensure that:
217
217
218
-
* Overhead of repeating attribute key names is minimised with indexing scheme
219
-
* Memory overhead of TLS context reads is reduced, minimising the time a thread must be kept suspended, and reducing the impact on the CPU cache
218
+
* Overhead of repeating attribute key names is minimized with indexing scheme
219
+
* Memory overhead of TLS context reads is reduced, minimizing the time a thread must be kept suspended, and reducing the impact on the CPU cache
220
220
221
221
### Trace Sampling
222
222
@@ -232,7 +232,7 @@ So far, we've looked at a number of runtimes/languages and we list below what we
232
232
This section is not intended to constrain implementers of the specification (nor to mandate that SDKs adopt this feature if they have no interest on it), but rather to indicate how likely we currently believe this is to fit with those languages/runtimes:
233
233
234
234
* **C/C++:** Full support
235
-
* **Rust**: Full support. Requires linking against a native library in order to ensure the TLS symbol is exposed correctly (see [here](https://github.com/rust-lang/rust/pull/132480Z))
235
+
* **Rust**: Full support. Requires linking against a native library in order to ensure the TLS symbol is exposed correctly (see [here](https://github.com/rust-lang/rust/pull/132480))
236
236
* **Java**: Full support. Requires calling into native library (e.g. via JNI or equivalent API)
237
237
* **Dotnet:** Full support via FFI bindings to native library
238
238
* **Python:** Full support using native library. Tracers running on Python >= 3.14 can use [PyContext_WatchCallback](https://docs.python.org/3/c-api/contextvars.html#c.PyContext_WatchCallback) to track context activation; older versions must monkey-patch the runtime
@@ -241,7 +241,7 @@ This section is not intended to constrain implementers of the specification (nor
241
241
We believe these two runtimes are not going to be supported by this proposal:
242
242
243
243
* **Golang:** We foresee golang readers will continue to use the [pprof labels](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/blob/main/design-docs/00002-custom-labels/README.md) due to its fine-grained goroutine based concurrency model and relative cost of calling across an FFI
244
-
* **NodeJS**: We expect nodeJS readers are more likely to read the NodeJS runtime internals directly due to the threading model and performance impact of using an NPAPI/native TLS approach.This adds complexity to the reader but reduces the performance impact, and is already the approached used in [Polarsignal's profiler](https://www.polarsignals.com/blog/posts/2025/11/19/custom-labels-for-node-js).
244
+
* **NodeJS**: We expect nodeJS readers are more likely to read the NodeJS runtime internals directly due to the threading model and performance impact of using a Node-API/native TLS approach.This adds complexity to the reader but reduces the performance impact, and is already the approached used in [Polarsignal's profiler](https://www.polarsignals.com/blog/posts/2025/11/19/custom-labels-for-node-js).
0 commit comments