Skip to content
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

Add serialize attributes for SpanData #58

Closed
jodh-intel opened this issue Jan 20, 2020 · 5 comments · Fixed by #59
Closed

Add serialize attributes for SpanData #58

jodh-intel opened this issue Jan 20, 2020 · 5 comments · Fixed by #59

Comments

@jodh-intel
Copy link
Contributor

I'd like to be able to serialise and deserialise the public SpanData [1]. Since all of its fields are public I could do that manually or even use the magic "remote derive" feature of serde [2]. However, from a safety and usability perspective adding the standard #[derive(Serialize, Deserialize)] to SpanData would allow standard serde semantics.


[1] - kata-containers/kata-containers#60
[2] - https://serde.rs/remote-derive.html

@jodh-intel
Copy link
Contributor Author

btw, do you have any thoughts on when you plan to update the crate version (since SpanData isn't available in the latest 0.1.5 release on crates.io)?

@MikeGoldsmith
Copy link
Member

Hi @jodh-intel

We don't have a set date for our next release to crates.io, though it has been a while and there have been a lot of changes since the last release (including moving github org).

@jodh-intel
Copy link
Contributor Author

Thanks @MikeGoldsmith - I've tried using the latest git repo version but it got messy due to other deps (and their particular versioned deps) so would be great to be able to consume direct from crates.io ideally.

@jtescher - do you think adding these serialisation options is reasonable?

@jtescher
Copy link
Member

@jodh-intel yeah SpanData being serialize/deserialize seems reasonable to me. Want to do the PR? (always good to have more committers 😃)

As far as a release, once the current open PR's land we can likely get a release ready. The current issues around how current span tracking works with futures is the real meat of the outstanding work to be done.

jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 27, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@jodh-intel
Copy link
Contributor Author

Thanks @jtescher - here you go: #59 😄

jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 29, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 29, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 29, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 29, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 29, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 30, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 30, 2020
Added `Serialize` and `Deserialize` attributes to allow `SpanData` to be
serialized and deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 30, 2020
Added optional `serialize` feature that allows `SpanData` to be
serialized/deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` to test serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 30, 2020
Added optional `serialize` feature that allows `SpanData` to be
serialized/deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` to test serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/opentelemetry-rust that referenced this issue Jan 31, 2020
Added optional `serialize` feature that allows `SpanData` to be
serialized/deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` to test serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jtescher pushed a commit that referenced this issue Jan 31, 2020
Added optional `serialize` feature that allows `SpanData` to be
serialized/deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` to test serialization and
deserialization.

Fixes: #58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Monkeyanator pushed a commit to Monkeyanator/opentelemetry-rust that referenced this issue Mar 3, 2020
Added optional `serialize` feature that allows `SpanData` to be
serialized/deserialized using the `serde` crate.

Also added a basic unit test for `SpanData` to test serialization and
deserialization.

Fixes: open-telemetry#58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants