-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Challenge] Add OpenTelemetry logging #365
Comments
@juntao Can you please provide an example of logging and tracing calls in the WasmEdge codebase. I have got the idea that I have to replace logging and tracing statements with the OpenTelemetry agent. But I am unable to locate the statements. |
Run a WasmEdge app and you will see logs printed in the console. You can
locate in the source code where they are. Thanks.
Cheers
Michael
On Fri, Aug 20, 2021 at 7:46 AM Ashutosh Sharma ***@***.***> wrote:
@juntao <https://github.com/juntao> Can you please provide an example of
logging and tracing calls in the WasmEdge codebase. I have got the idea
that I have to replace logging and tracing statements with the
OpenTelemetry agent. But I am unable to locate the statements.
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#365 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACUNVWLVS36LM67U3RWBLT5ZFDHANCNFSM5CPG5WLA>
.
--
Michael Yuan, PhD
Fast, safe, portable and serverless
Rust programs on Node.js, or as a FaaS
http://SecondState.io
http://cloud.secondstate.io
|
@juntao I have found that log statements are defined in log.cpp and we are using spdlog tag. I was running this simple command ./wasmedge --reactor examples/fibonacci.wasm fib 10 10. To find where are the log statements when FunctionType doesnot match located. I was able to find that the error tag is: MismatchCategory::FunctionType. But can you please point me to the file where the types are actuallly matched. I have used grep command as well and went through the returned files but it didn't work. |
@spider0061 This is a coding challenge. You are supposed to figure out how WasmEdge works with logging today. ;) That said, you do not have to replace existing logging statements. You can use OpenTelemetry to demonstrate how to add new logging capabilities to this project. |
Hi, My repo link: https://github.com/CruxBox/WasmEdge And the screenshot I took after I ran the example 'add.wasm' program: As part of the challenege I had to build OpenTelemetry, build WasmEdge, link them so I could use the OTel library, and make appropriate changes in the interpreter code. Thanks, |
Hi, I have compiled and installed open-telemetry and WasmEdge successfully today. I have done some code to experiment with the feasibility of embedding a C++ agent into WasmEdge. Although the code is not perfect, Uphold the "Release early, release often" philosophy, the following is my GitHub link. There is a screenshot of the logging messages in the img folder. https://github.com/William-Mou/WasmEdge/tree/mou/dev I learned a lot from these two Cloud Native projects. Thank You! |
Hi, I think I understad the log system. The main file for log is But I have spand one entirely day to try install opentelemetry-cpp. I try use cmake's FetchContent_Declare to pull it as an git submodule, but it just error at benchmark.cmake generate(follow INSTALL.md. I finially install it success by off the cmake option about opentelemetry-cpp test(-DBUILD_TESTING=OFF). However, FetchContent_Declare work not as same as the spdlog I copied (I'm not familiar with cmake before). Finally I have to Durning this try, I leran a lot knowledge about cmake. And also have a understand about WasmEdge's log system. I don't know if the apply time pass when I finish issue, but it's still a happy journey about learn. |
Hi, I guess the main task in this challenge is how to embed a tool/agent into WasmEdge. https://github.com/XingZYu/WasmEdge Thanks, |
Hi WasmEdge team, I embedded an opentelemetry logging into wasmedger.cpp. Specifically inside the code path of reactor mode. Therefore, it will log whenever wasmedge CLI is called with reactor mode. It might not be the most elegant way to do it, but I managed to do the challenge with the minimum change to the code base. github link: https://github.com/st9540808/WasmEdge |
Hi, The link to my repo: WasmedgeLogging Attached is a picture showing the logging when add.wasm is executed: |
Hi, Thank you , Have a good day |
No matter what I do , this is always present when linked against opentelemetry
Complete Traceback Edit: The problem is in opentelemetry-cpp cmake pkg-config
|
I have been facing the exact error since 5 days and it is not resolved yet. I have tried a lot of solutions but none of them worked. |
Instead of using whatever is given in opentelemetry-cpp docs try the following after installing opentelemetry-cpp
|
To be more generic |
Hello Mentors, For the past few days I was facing error in linking opentelemetry with wasmedge. I even contacted the opentelemetry team regarding this as none of the other developers was facing the inevitable error 2. I was finally able to resolve it and here is the screenshot of the changes that I made: Thanks and Regards |
hi here's the coding challenge solution on GitHub link: https://github.com/vaibhavarora102/WasmEdge it was indeed very refreshing, and warming up the task. Looking forward to mentors' guidance in the LFX mentorship program. |
Hi, I've spent a few days in linking opentelemetry with wasmedge and building opentelemetry from source, a lot of problems occurred during compiling. I even started a issue in Repo: https://github.com/OliverShang/WasmEdge Thanks, |
Hi,
SET URL INSTEAD
UNSET
My RepoMy ScreenShot |
Hi, could you tell me your name or email when you signed up for the LFX mentorship? I tried to search by your GitHub name and your university. However, I couldn't find you through the applications. Thanks. |
In case Anyone is eager to help as the challenge seems to be over already here are my logs which tells me that I haven't installed protobuf,nlohmann-json,libcurl,grpc
|
Hi, |
GitHub link - https://github.com/SAtacker/WasmEdge/tree/satacker |
Finally, I succeeded in here |
Hi, |
Hello Mentors, |
I am closing this issue due to outdated. |
Please fork this repo and complete the challenge in your own repo. Once you are done, post your repo’s github link, as well as a screenshot demonstrating the logging messages, as a comment under this issue.
OpenTelemetry is a new standard for cloud native application logging, tracing, and monitoring. It has agent SDKs in mainstream programming languages, including C++.
https://opentelemetry.io/docs/
This coding challenge is to embed a C++ agent into WasmEdge. The agent logs messages from WasmEdge to STDOUT. You could use OpenTelemetry agent to replace existing logging calls in the code. You do NOT to replace logging for the entire project. Just do it in a few places, either to replace existing logging or add new logging, to demonstrate that you know how to do it.
Examples:
https://github.com/open-telemetry/opentelemetry-cpp/tree/main/examples/simple
https://github.com/open-telemetry/opentelemetry-cpp/tree/main/examples/metrics_simple
Good luck!
Related to #290
The text was updated successfully, but these errors were encountered: