Skip to content

Commit

Permalink
Merge branch 'master' into w3c-trace-context-test
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Jan 21, 2021
2 parents 462181b + a9ca938 commit 4cade93
Show file tree
Hide file tree
Showing 69 changed files with 2,525 additions and 287 deletions.
78 changes: 72 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
cmake_test:
name: CMake test
name: CMake test (without otlp-exporter)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,10 +18,8 @@ jobs:
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_ci_environment.sh
- name: run tests
- name: run cmake tests (without otlp-exporter)
run: ./ci/do_ci.sh cmake.test
- name: run prometheus exporter tests
run: ./ci/do_ci.sh cmake.exporter.prometheus.test

cmake_gcc_48_test:
name: CMake gcc 4.8
Expand Down Expand Up @@ -58,7 +56,7 @@ jobs:
run: ./ci/do_ci.sh cmake.c++20.test

cmake_otprotocol_test:
name: CMake otprotocol test
name: CMake test (with otlp-exporter)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -87,13 +85,20 @@ jobs:
- name: run tests
run: ./ci/do_ci.sh cmake.test_example_plugin

gcc_48_test:
bazel_gcc_48_test:
name: Bazel gcc 4.8
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_gcc_48_test
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
Expand All @@ -111,6 +116,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_test
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
Expand All @@ -125,6 +137,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_valgrind
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
Expand All @@ -139,6 +158,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_noexcept
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
Expand All @@ -153,6 +179,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_asan
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
Expand All @@ -167,6 +200,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_tsan
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
Expand All @@ -181,6 +221,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /Users/runner/.cache/bazel
key: bazel_osx
- name: run tests
run: ./ci/do_ci.sh bazel.test

Expand All @@ -191,6 +238,13 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Mount Bazel Cache
uses: actions/cache@v2
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_benchmark
- name: setup
run: |
sudo ./ci/setup_ci_environment.sh
Expand Down Expand Up @@ -277,6 +331,18 @@ jobs:
with:
file: /home/runner/build/coverage.info

misspell:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: install misspell
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
- name: run misspell
run: ./bin/misspell -error .

docfx_check:
name: DocFX check
runs-on: windows-latest
Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ option(WITH_ELASTICSEARCH
"Whether to include the Elasticsearch Client in the SDK" OFF)

option(BUILD_TESTING "Whether to enable tests" ON)
if(WIN32)
option(WITH_ETW "Whether to include the ETW Exporter in the SDK" ON)
if(WITH_ETW)
add_definitions(-DHAVE_MSGPACK)
# Option below will be removed once we donate the TraceLoggingDynamic.h to
# OSS
add_definitions(-DHAVE_NO_TLD)
endif(WITH_ETW)
endif(WIN32)

option(WITH_EXAMPLES "Whether to build examples" ON)

find_package(Threads)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ A PR is considered to be **ready to merge** when:
* Trivial changes (typo, cosmetic, doc, etc.) don't have to wait for one day.
* Urgent fixes can take exceptions as long as it has been actively communicated.

Any Maintainer can merge the PR once it is **ready to merge**.
Any Maintainer can merge the PR once it is **ready to merge**. Maintainer can make conscious judgement to merge pull requests which have not strictly met above mentioned requirements.

If a PR has been stuck (e.g. there are lots of debates and people couldn't agree on each other), the owner should try to get people aligned by:

Expand Down
2 changes: 1 addition & 1 deletion Versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Refer to the [ABI Policy](./docs/abi-policy.md) for more details. To summarise
The guidelines in creating feature flag would be:
- Naming:

- `ENABLE_<SIGNAL>_PREVIEW` : For experimetal release of signal api/sdks eg, `METRICS_PREVIEW`, `LOGGING_PREVIEW`,
- `ENABLE_<SIGNAL>_PREVIEW` : For experimental release of signal api/sdks eg, `METRICS_PREVIEW`, `LOGGING_PREVIEW`,

- `ENABLE_<SIGNAL>_<FEATURE_NAME>_PREVIEW` : For experimental release for any feature within stable signal. For example, `TRACING_JAEGER_PREVIEW` to release the experimental Jaeger exporter for tracing.

Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/common/spin_lock_mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SpinLockMutex
* Blocks until a lock can be obtained for the current thread.
*
* This mutex will spin the current CPU waiting for the lock to be available. This can have
* decent performance in scenarios where there is low lock contention and lock-holders acheive
* decent performance in scenarios where there is low lock contention and lock-holders achieve
* their work quickly. It degrades in scenarios where locked tasks take a long time.
*/
void lock() noexcept
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/metrics/instrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Instrument
* @param description explains what the metric captures
* @param unit specifies the data type held in the instrument
* @param enabled determines if the metric is currently capturing data
* @return Instrument type with the specified attirbutes
* @return Instrument type with the specified attributes
*/
Instrument(nostd::string_view name,
nostd::string_view description,
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/trace/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct StartSpanOptions
core::SystemTimestamp start_system_time;
core::SteadyTimestamp start_steady_time;

// Explicitely set the parent of a Span.
// Explicitly set the parent of a Span.
//
// This defaults to an invalid span context. In this case, the Span is
// automatically parented to the currently active span.
Expand Down
7 changes: 3 additions & 4 deletions api/include/opentelemetry/trace/trace_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/nostd/unique_ptr.h"

namespace opentelemetry
{
OPENTELEMETRY_BEGIN_NAMESPACE
namespace trace
{

Expand Down Expand Up @@ -117,7 +116,7 @@ class TraceState
}

// Creates an Entry for the key-value pair and adds it to entries. Returns true if pair was added
// succesfully, false otherwise. If value is null or entries_ is full, this function is a no-op.
// successfully, false otherwise. If value is null or entries_ is full, this function is a no-op.
bool Set(nostd::string_view key, nostd::string_view value) noexcept
{
if (value.empty() || num_entries_ >= kMaxKeyValuePairs)
Expand Down Expand Up @@ -193,4 +192,4 @@ class TraceState
};

} // namespace trace
} // namespace opentelemetry
OPENTELEMETRY_END_NAMESPACE
2 changes: 1 addition & 1 deletion api/test/common/spinlock_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void BM_ThreadYieldSpinLockThrashing(benchmark::State &s)
[](std::atomic<bool> &l) { l.store(false, std::memory_order_release); });
}

// Run the benchamrks at 2x thread/core and measure the amount of time to thrash around.
// Run the benchmarks at 2x thread/core and measure the amount of time to thrash around.
BENCHMARK(BM_SpinLockThrashing)
->RangeMultiplier(2)
->Range(1, std::thread::hardware_concurrency())
Expand Down
16 changes: 12 additions & 4 deletions bazel/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ def opentelemetry_cpp_deps():
# GoogleTest framework.
# Only needed for tests, not to build the OpenTelemetry library.
maybe(
native.local_repository,
http_archive,
name = "com_google_googletest",
path = "third_party/googletest",
sha256 = "a03a7b24b3a0766dc823c9008dd32c56a1183889c04f084653266af22289ab0c",
strip_prefix = "googletest-a6dfd3aca7f2f91f95fc7ab650c95a48420d513d",
urls = [
"https://github.com/google/googletest/archive/a6dfd3aca7f2f91f95fc7ab650c95a48420d513d.tar.gz",
],
)

# Load gRPC dependency
Expand Down Expand Up @@ -60,9 +64,13 @@ def opentelemetry_cpp_deps():

# C++ Prometheus Client library.
maybe(
native.local_repository,
http_archive,
name = "com_github_jupp0r_prometheus_cpp",
path = "third_party/prometheus-cpp",
sha256 = "aab4ef8342319f631969e01b8c41e355704847cbe76131cb1dd5ea1862000bda",
strip_prefix = "prometheus-cpp-0.11.0",
urls = [
"https://github.com/jupp0r/prometheus-cpp/archive/v0.11.0.tar.gz",
],
)

# libcurl (optional)
Expand Down
Loading

0 comments on commit 4cade93

Please sign in to comment.