feat(sdk): Add Rust SDK by mogery · Pull Request #7578 · highlight/highlight · GitHub
Skip to content

feat(sdk): Add Rust SDK - #7578

Merged
Vadman97 merged 34 commits into
highlight:mainfrom
mogery:mog/rust-sdk
Mar 7, 2024
Merged

Vadman97 merged 34 commits into
highlight:mainfrom
mogery:mog/rust-sdk

Conversation

@mogery

@mogery mogery commented Jan 25, 2024 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #6756
/claim #6756

This PR adds two new Rust SDK crates, highlightio and highlightio-actix, for capturing logs and errors & instrumenting Rust code. These depend heavily on the various opentelemetry libraries.

To-do

  • write bare library with no framework support
  • write examples for bare library
  • write library for integrating into actix
  • write examples for actix library
  • write docs, finalise v1 crate structure

Known issues

  • logging is not shown on stdout, only sent to the server

How did you test this change?

I wrote examples in sdk/highlight-rust/*/examples and validated them using my highlight.io profile.

Are there any deployment considerations?

You need to publish the crates in sdk/highlight-rust.

@changeset-bot

changeset-bot Bot commented Jan 25, 2024 •

Copy link
Copy Markdown

@Vadman97
Vadman97 requested review from a team, Vadman97 and ccschmitz and removed request for a team January 25, 2024 07:27
@mogery

mogery commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

This is a WIP, no need to review yet, I'll un-draft the PR when it's ready :)

@mogery
mogery marked this pull request as ready for review January 27, 2024 16:55
@mogery

mogery commented Jan 27, 2024

Copy link
Copy Markdown
Contributor Author

@Vadman97 @ccschmitz This is ready to go :) I mainly focused on writing docs for the highlight site, so our docs.rs site might not look the best, but that is fine in my opinion.

@Vadman97 Vadman97 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks for all the hard work @mogery, and for the thorough testing in the youtube video!

would appreciate your thoughts on how we should publish the packages as rust cargo. once we have that figured out, this will be ready to merge!

@mogery

mogery commented Feb 18, 2024

Copy link
Copy Markdown
Contributor Author

looks great, thanks for all the hard work @mogery, and for the thorough testing in the youtube video!

would appreciate your thoughts on how we should publish the packages as rust cargo. once we have that figured out, this will be ready to merge!

awesome! been having some super busy days. will get the cargo info to you on tuesday though. are we looking for a CI automated option or just manual is fine?

@Vadman97

Copy link
Copy Markdown
Member

looks great, thanks for all the hard work @mogery, and for the thorough testing in the youtube video!
would appreciate your thoughts on how we should publish the packages as rust cargo. once we have that figured out, this will be ready to merge!

awesome! been having some super busy days. will get the cargo info to you on tuesday though. are we looking for a CI automated option or just manual is fine?

CI automated would be ideal. i can help with testing it though via a branch to validate the secrets needed etc.

@Vadman97

Copy link
Copy Markdown
Member

friendly bump here @mogery

@mogery

mogery commented Feb 26, 2024

Copy link
Copy Markdown
Contributor Author

sorry @Vadman97! been super busy lately. i've got another thing's deadline tonight, will 100% get on this tomorrow.

@mogery

mogery commented Mar 6, 2024 •

Copy link
Copy Markdown
Contributor Author

Seems like we'll need to publish the crate manually first, and then we can use this action to automatically detect changes and publish new versions. Could we coordinate this first push over Discord or some other real-time chat? I can walk you through it so that you get the publish token & ownership.

@Vadman97

Vadman97 commented Mar 6, 2024

Copy link
Copy Markdown
Member

another bump here @mogery . if you think this is in a close spot, i can pull the CI work into a new ticket

@mogery

mogery commented Mar 6, 2024

Copy link
Copy Markdown
Contributor Author

another bump here @mogery . if you think this is in a close spot, i can pull the CI work into a new ticket

I can work on this now, I posted a comment with info 4 hours ago.

@mogery

mogery commented Mar 6, 2024

Copy link
Copy Markdown
Contributor Author

Added the READMEs and the GitHub Action. Not sure how to make the action actually run in this PR though. Maybe it only runs once merged.

@Vadman97

Vadman97 commented Mar 6, 2024

Copy link
Copy Markdown
Member

Run katyo/publish-crates@v2
Searching cargo packages at '.'
/home/runner/.cargo/bin/cargo metadata --no-deps --format-version 1 --manifest-path Cargo.toml
error: manifest path Cargo.toml does not exist
Error: Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101

looks like the current working directory isn't set right?

@mogery

mogery commented Mar 6, 2024

Copy link
Copy Markdown
Contributor Author

Run katyo/publish-crates@v2
Searching cargo packages at '.'
/home/runner/.cargo/bin/cargo metadata --no-deps --format-version 1 --manifest-path Cargo.toml
error: manifest path Cargo.toml does not exist
Error: Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101

looks like the current working directory isn't set right?

oops! pushed a fix 🤞

@Vadman97 Vadman97 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet! thanks for getting the CI done as part of this too 🙏

Comment thread .github/workflows/rust-sdk.yml
@Vadman97
Vadman97 merged commit 6229bcf into highlight:main Mar 7, 2024
@SpennyNDaJets

Copy link
Copy Markdown
Contributor

@all-contributors please add @mogery for code

@allcontributors

Copy link
Copy Markdown
Contributor

SpennyNDaJets pushed a commit that referenced this pull request Mar 7, 2024
Adds @mogery as a contributor for code.

This was requested by SpennyNDaJets [in this
comment](#7578 (comment))

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

This branch was successfully deployed

2 active deployments
Preview – highlight-landing — d56cf230 Deployed Mar 6, 2024 by vercel[bot]
Preview — d56cf230 Deployed Mar 6, 2024 by reflame[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Rust among our SDKs

4 participants