Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Opentracing-cpp Redux #6

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ded4c0c
StringRef, BaggageRef, BaggageIterator drafted
Jan 5, 2017
3381ca1
Testing everything, at least a little
Jan 5, 2017
70d1545
Remove bad example
invalid-email-address Jan 5, 2017
06ff151
Some documentation, StringRefWide
Jan 6, 2017
2f37155
Solving the wide baggage problem
Jan 6, 2017
b45a540
Adding noop, Baggage/BaggageWide, StringRefWide, and docs
Jan 6, 2017
94227b4
Adding No-op implementation
Jan 6, 2017
1ee01dc
Minor formatting
Jan 6, 2017
419580e
Updating tests, adding spanoptions, consistently documented
Jan 9, 2017
d42770a
Updating documentation
Jan 9, 2017
c8d422c
Adding guards, updating documentation and tests
Jan 9, 2017
47a9047
Adding constants.h
Jan 9, 2017
d35931b
Update usage
Jan 9, 2017
3b86ccf
Adding log/tags/baggage usage
Jan 9, 2017
9656c0b
Adding iterator behaviors
Jan 9, 2017
63ff455
Updating docs
Jan 9, 2017
1f77d05
formatting
Jan 9, 2017
59e565f
formatting
Jan 9, 2017
8f1025e
formatting never ends
Jan 9, 2017
9f1daca
formatting never ends
Jan 9, 2017
b5e5486
Update examples
Jan 9, 2017
05f3bf3
Example compiler problem
Jan 9, 2017
eeb6fa3
typo
Jan 9, 2017
5ff6015
Review feedback, removing guards, updated docs
Jan 10, 2017
5e3885a
Merge pull request #2 from jquinn1/changes
Jan 10, 2017
a8b9017
Moving noop into its own package, updated tests
Jan 10, 2017
88e1e8b
Merge branch 'master' of https://bbgithub.dev.bloomberg.com/jquinn1/o…
Jan 10, 2017
ef885ee
Update reqs for tracerimps
invalid-email-address Jan 10, 2017
bde3545
Clean up build system, ability to turn off no-op, integrate tests
invalid-email-address Jan 11, 2017
1120bb0
Merge pull request #3 from jquinn1/noop-shift
Jan 11, 2017
963d016
Cmake, removing unused template functionality, ditching config.h for now
Jan 11, 2017
a83c752
Merge branch 'master' of https://bbgithub.dev.bloomberg.com/jquinn1/o…
Jan 11, 2017
29e1285
Remove cmake makefile
Jan 11, 2017
f18e949
Remove default contructors and handle side effects
Jan 11, 2017
35ea881
Update AUTHORS and ChangeLog
Jan 11, 2017
2c205bd
Removing mutable baggage constructs, fixing installs
Jan 11, 2017
99e64e3
appropriate refs
Jan 11, 2017
d89904d
updating authors
Jan 11, 2017
4cb5325
Cmake tweaks
Jan 12, 2017
013629a
Adding tags to span options, update tests
Jan 12, 2017
90b232d
SpanRelationship -> SpanReferenceType
Jan 12, 2017
be4f005
Spec SpanContext immutability
Jan 13, 2017
abd02a1
Doc changes
Jan 13, 2017
c0441da
Avoid unnecessary copies in BinaryWriters
Jan 14, 2017
2108eaa
Update usage
Jan 14, 2017
3a1c1f8
Accessory inject method to avoid context copies
Jan 15, 2017
a62cb0b
Simplify inject/extract interface
Jan 17, 2017
0c8a1a9
Reduce noop inject/extract code
Jan 17, 2017
eb428cc
Documentation update
Jan 18, 2017
fd65b66
Remove static from generictracer interface, use const consistently
Jan 21, 2017
56eeeb1
Reformat constants
Jan 21, 2017
3e8d73c
Updating usage
Jan 21, 2017
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
46 changes: 46 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
Language : Cpp
BasedOnStyle : Google
AccessModifierOffset: -2
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignOperands: true
AllowShortIfStatementsOnASingleLine: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakAfterDefinitionReturnType: true
AlwaysBreakAfterReturnType: None
BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializersBeforeComma: true
BraceWrapping:
AfterClass: false
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
BreakBeforeBraces: Custom

ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 0
IndentCaseLabels: true
IndentWidth: 4
MaxEmptyLinesToKeep: 1
PointerAlignment: Left
SpaceAfterCStyleCast: true
SpaceBeforeParens: ControlStatements
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 4
UseTab: Never
...
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
*.o
*.a
*.so
config.h
config.h.in
*.m4
Makefile
Makefile.in
config.*
*/.deps/*
stamp-h1
*/.dirstamp
INSTALL
autom4te.cache/*
compile
configure
depcomp
install-sh
libtool
ltmain.sh
missing
CMakeFiles
*.cmake
bin/
build/
test/unittest
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "thirdparty/googletest"]
path = thirdparty/googletest
url = https://github.com/google/googletest
5 changes: 3 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AUTHORS
-------


OpenTracing Developers

Dmitrios Kouzis-Loukas : dkouzislouka AT bloomberg DOT net
James Wells : jwells31 AT bloomberg DOT net
Jim Quinn : jquinn47 AT bloomberg DOT net
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required (VERSION 2.8)
set(PROJECT_NAME "opentracing")
project (${PROJECT_NAME})

set(lib_major_version "2")
set(lib_minor_version "0")
set(lib_patch_version "0")
set(opentracing_version "${lib_major_version}.${lib_minor_version}.${lib_patch_version}")
set(opentracing_url "https://github.com/opentracing/opentracing-cpp")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

option(enable_noop "Build noop tracer." OFF)
option(enable_tests "Build unit tests." OFF)

add_subdirectory(opentracing)

if(enable_tests)
enable_testing()
add_subdirectory(thirdparty/googletest/googletest)
add_subdirectory(test)
endif()
50 changes: 46 additions & 4 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@

opentracing-cpp ChangeLog

* initial release
f18e949 (HEAD -> master, jq/cmake-fun) Remove default contructors and handle side effects
29e1285 Remove cmake makefile
a83c752 Merge branch 'master' of https://bbgithub.dev.bloomberg.com/jquinn1/opentracing-cpp
963d016 Cmake, removing unused template functionality, ditching config.h for now
1120bb0 (jq/master) Merge pull request #3 from jquinn1/noop-shift
bde3545 Clean up build system, ability to turn off no-op, integrate tests
ef885ee (jq/noop-shift) Update reqs for tracerimps
88e1e8b Merge branch 'master' of https://bbgithub.dev.bloomberg.com/jquinn1/opentracing-cpp
a8b9017 Moving noop into its own package, updated tests
5e3885a Merge pull request #2 from jquinn1/changes
5ff6015 (jq/changes) Review feedback, removing guards, updated docs
eeb6fa3 typo
05f3bf3 Example compiler problem
b5e5486 Update examples
9f1daca formatting never ends
8f1025e formatting never ends
59e565f formatting
1f77d05 formatting
63ff455 Updating docs
9656c0b Adding iterator behaviors
3b86ccf Adding log/tags/baggage usage
d35931b Update usage
47a9047 Adding constants.h
c8d422c Adding guards, updating documentation and tests
d42770a Updating documentation
419580e Updating tests, adding spanoptions, consistently documented
1ee01dc Minor formatting
94227b4 Adding No-op implementation
b45a540 Adding noop, Baggage/BaggageWide, StringRefWide, and docs
2f37155 Solving the wide baggage problem
06ff151 Some documentation, StringRefWide
70d1545 Remove bad example
3381ca1 Testing everything, at least a little
ded4c0c StringRef, BaggageRef, BaggageIterator drafted
efadeda (origin/master, origin/HEAD) keep gcc specific flags specific to a gcc build (#5)
012743c Update configure.ac
3933120 Update configure.ac
6623183 Update ChangeLog
e1c9ea6 Update AUTHORS
7fecd71 a clarification (#4)
e0ea9eb Converting TextMapReader callback to functor (#2)
8b1efd1 Initial opentracing C++ version
368f2cd Merge pull request #1 from gitter-badger/gitter-badge
574ef91 Add Gitter badge
9ec9136 Update README.md
bfb0b74 Initial commit
19 changes: 0 additions & 19 deletions Makefile.am

This file was deleted.

52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,57 @@ C++ implementation of the OpenTracing API http://opentracing.io

[![Join the chat at https://gitter.im/opentracing/opentracing-cpp](https://badges.gitter.im/opentracing/opentracing-cpp.svg)](https://gitter.im/opentracing/opentracing-cpp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)


## Required Reading

In order to understand the C++ platform API, one must first be familiar with the
[OpenTracing project](http://opentracing.io) and
[terminology](http://opentracing.io/spec/) more generally. This is a C++98 API that
is used as a "common denominator". Ît's up to implementors to choose the C++ level
they are going to use for their implementations:
In order to understand the C++ platform API, one must first be familiar with the [OpenTracing project](http://opentracing.io) and
[terminology](http://opentracing.io/spec/) more generally. This is a C++98 API that is used as a "common denominator".
Ît is up to implementors to choose the C++ level they are going to use for their implementations:

![stack of libraries](img/stack-of-libraries.png "Stack of Libraries")

## Compile and install

The default package is a header-only library. It can be installed as such

```
libtoolize # or glibtoolize
./autogen.sh
./configure
sudo make install
mkdir build
cd build
cmake ..
make install
```

To test (requires gtest - see [here for OS X](http://stackoverflow.com/questions/20746232/how-to-properly-setup-googletest-on-os-x-aside-from-xcode), [here for ubuntu](http://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/) and [here for Red Hat](http://stackoverflow.com/questions/13513905/how-to-setup-googletest-as-a-shared-library-on-linux)/for Red Hat note also [this](http://stackoverflow.com/questions/4743233/is-usr-local-lib-searched-for-shared-libraries)):
If you would like to include the NoopTracer, a static library is created in addition to the headers.

```
cd test
mkdir build
cd build
cmake -Denable_noop=ON ..
make install
```

#### Tests

Testing requires the use of `gtest`. The `gtest` library is added as a submodule to this repository.
To build all of the tests, from the root repository:

```
git submodule init
git submodule update
mkdir build
cd build
cmake -Denable_tests=ON ..
make
./test
./bin/unittest
```

If you're using the `NoopTracer`, you would want to add `-Denable_noop=ON` as well.

## API overview for those adding instrumentation

Everyday consumers of this `opentracing` package really only need to worry
about a couple of key abstractions: the `StartSpan` function, the `Span`
interface, and binding a `Tracer` at `main()`-time.
Clients of this `OpenTracing` only need to understand the key abstractions:
* Installing a Tracer
* Using the Global `Tracer` to create `Spans` and `SpanContexts`
* Adding tags, logs, or baggage to `Spans`

See the detailed [usage](./docs/usage.md) documentation for details.
5 changes: 0 additions & 5 deletions autogen.sh

This file was deleted.

29 changes: 0 additions & 29 deletions configure.ac

This file was deleted.

Loading