Add license header.
diff --git a/tracing-core/src/context.rs b/tracing-core/src/context.rs
index 0a03203..5817110 100644
--- a/tracing-core/src/context.rs
+++ b/tracing-core/src/context.rs
@@ -1,3 +1,18 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
use crate::{ContextListener, ID, Span};
use crate::id::IDGenerator;
use crate::span::TracingSpan;
diff --git a/tracing-core/src/context_carrier.rs b/tracing-core/src/context_carrier.rs
new file mode 100644
index 0000000..b56a2c3
--- /dev/null
+++ b/tracing-core/src/context_carrier.rs
@@ -0,0 +1,23 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/// The Injectable implementation supports inject the give key/value for further propagation,
+/// especially in across process propagation.
+/// Such as putting a key/value into the HTTP header.
+pub trait Injectable {
+ /// Inject the given key/value into the implementation.
+ /// The way of injection is determined by the implementation, no panic! should happens even injection fails.
+ fn inject(key: String, value: String);
+}
\ No newline at end of file
diff --git a/tracing-core/src/context_listener.rs b/tracing-core/src/context_listener.rs
index 73cfbad..9eab7f3 100644
--- a/tracing-core/src/context_listener.rs
+++ b/tracing-core/src/context_listener.rs
@@ -1,3 +1,18 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
use crate::TracingContext;
///Report bridge defines the traits for the skywalking-report
diff --git a/tracing-core/src/id.rs b/tracing-core/src/id.rs
index afc5c40..7f31724 100644
--- a/tracing-core/src/id.rs
+++ b/tracing-core/src/id.rs
@@ -1,3 +1,18 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
use std::hash::Hash;
use std::time::SystemTime;
use rand::RngCore;
diff --git a/tracing-core/src/lib.rs b/tracing-core/src/lib.rs
index 789c12a..457c326 100644
--- a/tracing-core/src/lib.rs
+++ b/tracing-core/src/lib.rs
@@ -1,7 +1,24 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
pub use context::Context;
pub use context::TracingContext;
pub use context_listener::ContextListener;
pub use id::ID;
+pub use log::EventField;
+pub use log::LogEvent;
pub use span::Span;
pub use tag::Tag;
@@ -11,4 +28,5 @@
pub mod id;
pub mod context_listener;
pub mod log;
+pub mod context_carrier;
diff --git a/tracing-core/src/log.rs b/tracing-core/src/log.rs
index aa14245..a8d3c9a 100644
--- a/tracing-core/src/log.rs
+++ b/tracing-core/src/log.rs
@@ -1,3 +1,18 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/// Log represents an event happened during the span duration.
/// It is much heavier than tag. Usually this is only used in the error case to log the detailed error message.
/// Log Entity is a creation once object. Can't be change once it is created.
diff --git a/tracing-core/src/span.rs b/tracing-core/src/span.rs
index 47f1bae..9829d7d 100644
--- a/tracing-core/src/span.rs
+++ b/tracing-core/src/span.rs
@@ -1,3 +1,18 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
use std::time::SystemTime;
use crate::log::LogEvent;
@@ -27,6 +42,7 @@
/// End just means sealing the end time, still need to call Context::finish_span to officially finish span and archive it for further reporting.
fn end_with_timestamp(&mut self, timestamp: SystemTime);
+
/// All following are status reading methods.
/// Return true if the span has been set end time
diff --git a/tracing-core/src/tag.rs b/tracing-core/src/tag.rs
index 45f668c..aab0e0c 100644
--- a/tracing-core/src/tag.rs
+++ b/tracing-core/src/tag.rs
@@ -1,3 +1,18 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/// Tag is a key value pair to represent an supplementary instruction for the span.
/// Common and most widely used tags could be found here,
/// https://github.com/apache/skywalking/blob/master/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java.