Skip to content

Commit

Permalink
Automatically generate semantic conventions from the spec (open-telem…
Browse files Browse the repository at this point in the history
…etry#873)

Fixed markdown format.

Added code to troubleshoot build failure.
  • Loading branch information
marcalff committed Jul 15, 2022
1 parent ffc1798 commit 2923ef0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 5 additions & 8 deletions docs/semantic-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ For example, tag v1.12.0

### Use latest specifications

Set the `SEMCONV_VERSION` number in the [generate.sh](/buildscripts/semantic-convention/generate.sh) script.
Set the `SEMCONV_VERSION` number in the
[generate.sh](/buildscripts/semantic-convention/generate.sh) script.

For example,

```
```shell
SEMCONV_VERSION=1.12.0
```


### Generate code

Run the generate.sh script.
Expand All @@ -53,27 +53,24 @@ to verify they were updated (check the version number in SCHEMA_URL).

For example,

```
```cpp
static constexpr const char *SCHEMA_URL = "https://opentelemetry.io/schemas/1.12.0";
```


### Format code

Apply clang-format.


### Update CHANGELOG

Add a `CHANGELOG` entry for the semantic conventions.

For example,

```
```md
* [SEMANTIC CONVENTIONS] Upgrade to version 1.12.0
```


### Commit

Commit and file a PR.
Expand Down
7 changes: 7 additions & 0 deletions examples/http/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

#include "server.h"
#include "opentelemetry/trace/context.h"

// DEBUG: investigating build break

#ifdef DELETE
#error "Someone broke semantic_conventions"
#endif

#include "opentelemetry/trace/semantic_conventions.h"
#include "tracer_common.h"

Expand Down

0 comments on commit 2923ef0

Please sign in to comment.