-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(observe api): seperate c++ bindings from c bindings, add c++ spa…
…n end function (#168) * feat(observe api): seperate c++ bindings from c bindings * feat: optional .end function to end spans, destruction still ends if not ended
- Loading branch information
Showing
8 changed files
with
79 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#define OBSERVE_API_CPP_IMPLEMENTATION | ||
#include "observe_api.hpp" | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string> | ||
#include <vector> | ||
|
||
void run() { | ||
observe_api::span_enter("printf"); | ||
observe_api::statsd("ok:aaaaa"); | ||
observe_api::log(DO_LL_INFO, "bbbbb"); | ||
observe_api::span_tags("abbc:def,(another:tag"); | ||
std::vector<std::string> tags = {"taga:one", "tagb:two"}; | ||
observe_api::span_tags(tags); | ||
printf("Hello from Wasm!\n"); | ||
observe_api::span_exit(); | ||
} | ||
|
||
int main(int argc, char *argv[]) { | ||
observe_api::span_enter("run"); | ||
run(); | ||
observe_api::span_exit(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.