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

Rename crate name skywalking_rust to skywalking? #23

Merged
merged 2 commits into from
Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#

[package]
name = "skywalking_rust"
version = "0.1.0"
name = "skywalking"
version = "0.2.0"
authors = ["Apache SkyWalking Developers (dev@skywalking.apache.org)"]
edition = "2021"
description = "Apache SkyWalking Rust Agent"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ context after the span finished.
# Example

```rust
use skywalking_rust::context::trace_context::TracingContext;
use skywalking_rust::reporter::grpc::Reporter;
use skywalking::context::trace_context::TracingContext;
use skywalking::reporter::grpc::Reporter;
Comment on lines +36 to +37
Copy link
Member

Choose a reason for hiding this comment

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

The compiling doc in the readme is still skywalking-rust, I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

Compiling doc is means the doc generated by cargo doc? With 0.2.0 released, the skywalking will be a new crate and the name is skywalking in docs.rs.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I didn't mean this is wrong. I mean https://github.com/apache/skywalking-rust#how-to-compile doesn't match here.

use tokio;

async fn handle_request(reporter: ContextReporter) {
Expand Down Expand Up @@ -69,10 +69,10 @@ async fn main() {
```

# How to compile?
If you have `skywalking-rust-(VERSION).crate`, you can unpack it with the way as follows:
If you have `skywalking-(VERSION).crate`, you can unpack it with the way as follows:

```
tar -xvzf skywalking-rust-(VERSION).crate
tar -xvzf skywalking-(VERSION).crate
```

Using `cargo build` generates a library. If you'd like to verify the behavior, we recommend to use `cargo run --example simple_trace_report`
Expand Down
8 changes: 4 additions & 4 deletions e2e/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
#
[package]
name = "e2e"
version = "0.1.0"
version = "0.2.0"
authors = ["Shikugawa <Shikugawa@gmail.com>"]
edition = "2021"
publish = false

[dependencies]
skywalking_rust = { path = ".." }
skywalking = { path = ".." }
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1", features = ["full"] }
structopt = "0.3"
10 changes: 5 additions & 5 deletions e2e/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
use hyper::client::HttpConnector;
use hyper::service::{make_service_fn, service_fn};
use hyper::{Body, Client, Method, Request, Response, Server, StatusCode};
use skywalking_rust::context::propagation::context::SKYWALKING_HTTP_CONTEXT_HEADER_KEY;
use skywalking_rust::context::propagation::decoder::decode_propagation;
use skywalking_rust::context::propagation::encoder::encode_propagation;
use skywalking_rust::context::trace_context::TracingContext;
use skywalking_rust::reporter::grpc::Reporter;
use skywalking::context::propagation::context::SKYWALKING_HTTP_CONTEXT_HEADER_KEY;
use skywalking::context::propagation::decoder::decode_propagation;
use skywalking::context::propagation::encoder::encode_propagation;
use skywalking::context::trace_context::TracingContext;
use skywalking::reporter::grpc::Reporter;
use std::convert::Infallible;
use std::error::Error;
use std::net::SocketAddr;
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_trace_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//
use std::error::Error;

use skywalking_rust::context::trace_context::TracingContext;
use skywalking_rust::reporter::grpc::Reporter;
use skywalking::context::trace_context::TracingContext;
use skywalking::reporter::grpc::Reporter;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
Expand Down
4 changes: 2 additions & 2 deletions src/context/trace_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use super::system_time::UnixTimeStampFetcher;
/// # Example
///
/// ```
/// use skywalking_rust::context::trace_context::TracingContext;
/// use skywalking::context::trace_context::TracingContext;
///
/// async fn handle_request() {
/// let mut ctx = TracingContext::default("svc", "ins");
Expand Down Expand Up @@ -206,7 +206,7 @@ impl TracingContext {

/// Generate a new trace context using the propagated context.
/// They should be propagated on `sw8` header in HTTP request with encoded form.
/// You can retrieve decoded context with `skywalking_rust::context::propagation::encoder::encode_propagation`
/// You can retrieve decoded context with `skywalking::context::propagation::encoder::encode_propagation`
pub fn from_propagation_context(
service_name: &str,
instance_name: &str,
Expand Down
4 changes: 2 additions & 2 deletions src/reporter/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ impl Reporter {
///
/// use tokio;
///
/// use skywalking_rust::context::trace_context::TracingContext;
/// use skywalking_rust::reporter::grpc::Reporter;
/// use skywalking::context::trace_context::TracingContext;
/// use skywalking::reporter::grpc::Reporter;
///
/// #[tokio::main]
/// async fn main () -> Result<(), Box<dyn Error>> {
Expand Down
10 changes: 5 additions & 5 deletions tests/propagation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
//

#![allow(unused_imports)]
use skywalking_rust::common::time::TimeFetcher;
use skywalking_rust::context::propagation::context::PropagationContext;
use skywalking_rust::context::propagation::decoder::decode_propagation;
use skywalking_rust::context::propagation::encoder::encode_propagation;
use skywalking_rust::context::trace_context::TracingContext;
use skywalking::common::time::TimeFetcher;
use skywalking::context::propagation::context::PropagationContext;
use skywalking::context::propagation::decoder::decode_propagation;
use skywalking::context::propagation::encoder::encode_propagation;
use skywalking::context::trace_context::TracingContext;
use std::sync::Arc;

struct MockTimeFetcher {}
Expand Down
12 changes: 6 additions & 6 deletions tests/trace_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#![allow(unused_imports)]

use prost::Message;
use skywalking_rust::common::time::TimeFetcher;
use skywalking_rust::context::propagation::context::PropagationContext;
use skywalking_rust::context::propagation::decoder::decode_propagation;
use skywalking_rust::context::propagation::encoder::encode_propagation;
use skywalking_rust::context::trace_context::TracingContext;
use skywalking_rust::skywalking_proto::v3::{
use skywalking::common::time::TimeFetcher;
use skywalking::context::propagation::context::PropagationContext;
use skywalking::context::propagation::decoder::decode_propagation;
use skywalking::context::propagation::encoder::encode_propagation;
use skywalking::context::trace_context::TracingContext;
use skywalking::skywalking_proto::v3::{
KeyStringValuePair, Log, RefType, SegmentObject, SegmentReference, SpanLayer, SpanObject,
SpanType,
};
Expand Down