dylibso / dylibso/observe-sdk

take options by reference wherever possible

Open
#99 2 comments 0 reactions 1 assignee Claimed by @wikiwong View on GitHub
Dominant language
TypeScript
Stars
188
Forks
8
PR merge metrics
No merged PRs in 30d

Description

In the updated `adapter.start` calls or wherever we're passing in options, we should take the value by reference vs. expecting to own it. particularly in Rust, currently each trace context _must_ make its own new Options, or if cloneable, copy it from elsewhere.

e.g.
```patch
- let trace_ctx = adapter.start(_, _, options);
+ let trace_ctx = adapter.start(_, _, &options);
```

It could also be done in Go so the value isn't copied around, but that's more of a performance/resource optimization than a pesky DX as it is in Rust.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.