Just arrived in the US for #KCDC. Don't miss my talk on #DistributedTracing with #OpenTelemetry on Wednesday morning in the #DevOps Day room!
We will see how a simple Hello World demo works
Just arrived in the US for #KCDC. Don't miss my talk on #DistributedTracing with #OpenTelemetry on Wednesday morning in the #DevOps Day room!
We will see how a simple Hello World demo works
#Grafana 12 is here with major upgrades!
Now Generally Available: Git Sync, dynamic dashboards, improvements to Drilldown which gives code-free point-and-click insights into data, and a Cloud Migration assistant.
Explore what's new: https://bit.ly/4dyu3cB
I continue to work on my #OpenTelemetry demo. Its main idea is to showcase traces across various technology stacks, including #asynchronous communication via an #MQTT queue. This week, I added a couple of components and changed the #architecture. Here are some noteworthy learnings; note that some of them might not be entirely connected to @opentelemetry
https://blog.frankel.ch/even-more-opentelemetry/
#Observability #DistributedTracing #ApacheAPISIX @graalvm #Golang #Ruby
This weekend I was frustrated with my debugging, and just not up to digging in and carefully, meticulously analyzing what was happening. So … I took a left turn (at Alburquerque) and decided to explore an older idea to see if it was interesting and/or useful. My challenging debugging was all about network code, for a collaborative, peer to peer sharing thing; more about that effort some other time.
A bit of back story
A number of years ago when I was working with a solar energy manufacturer, I was living and breathing events, APIs, and running very distributed, sometimes over crap network connections, systems. One of the experiments I did (that worked out extremely well) was to enable distributed tracing across the all the software components, collecting and analyzing traces to support integration testing. Distributed tracing, and the now-popular CNCF OpenTelemetry project weren’t a big thing, but they were around – kind of getting started. The folks (Yuri Shkuro, at least) at Uber had released Jaeger, an open-source trace collector with web-based visualization, which was enough to get started. I wrote about that work back in 2019 (that post still gets some recurring traffic from search engines, although it’s pretty dated now and not entirely useful).
We spun up our services, enabled tracing, and ran integration tests on the whole system. After which, we had the traces available for visual review. It was useful enough that we ended up evolving it so that a single developer could stand up most of their pieces locally (with a sufficiently beefy machine), and capture and view the traces locally. That provided a great feedback loop as they could see performance and flows in the system while they were developing fixes, updates and features. I wanted to see, this time with an iOS/macOS focused library, how far I could get trying to replicate that idea (time boxed to the weekend).
The Experiment!
I’ve been loosely following the server-side swift distributed tracing efforts since it started, and it looked pretty clear that I could use it directly. Moritz Lang publishes swift-otel, which is a Swift native, concurrency supported library. With his examples, it was super quick to hack into my test setup. The library is set up to run with service-lifecycle pieces over SwiftNIO, so there’s a pile of dependencies that come in with it. To add to my library, I’d be a little hesitant, but an integration test thing, I’m totally good with that. There were some quirks to using it with XCTest, most of which I hacked around by shoving the tracer setup into a global actor and exposing an idempotent bootstrap
call. With that in place, I added explicit traces into my tests, and then started adding more and more, including into my library, and could see the results in a locally running instance of Jaeger (running Jaeger using Docker).
Some Results
The following image is an overview of the traces generated by a single test (testCreate
):
The code I’m working with is all pushing events over web sockets, so inside of the individual spans (which are async closures in my test) I’ve dropped in some span events, one of which is shown in detail below:
In a lot of respects, this is akin to dropping in os_signposts that you might view in Instruments, but it’s external to Xcode infrastructure. Don’t get me wrong, I love Instruments and what it does – it’s been amazing and really the gold standard in tooling for me for years – but I was curious how far this approach would get me.
Choices and Challenges
Using something like this in production – with live-running iOS or macOS apps – would be another great end-to-end scenario. More so if the infrastructure your app was working from also used tracing. There’s a separate tracing project at CNCF – OpenTelemetry Swift – that looks oriented towards doing just that. I seriously considered using it, but I didn’t see a way to use that package to instrument my library and not bring in the whole pile of dependencies. With the swift-distributed-tracing library, it’s an easy (and small) dependency add – and you only need to take the hit of the extra dependencies when you want to use the tracing.
And I’ll just “casually” mention that if you pair this with server-side swift efforts, the Hummingbird project has support for distributed tracing currently built in. I expect Vapor support isn’t too far off, and it’s a continued focus to add more distributed tracing support for a number of prevalent server-side swift libraries over this coming summer.
See for Yourself (under construction/YMMV/etc)
I’ve tossed up my hack-job of a wrapper for tracing during testing with iOS and macOS – DistributedTracer, if you want to experiment with this kind of thing yourself. Feel free to use it, although if you’re amazed with the results – ALL credit should go to Moritz, the contributors to his package and the contributors to swift-distributed-tracing, since they did the heavy lifting. The swift-otel library itself is undergoing some major API surface changes – so if you go looking, I worked from the current main
branch rather than the latest release. Moritz shared with me that while the API was not completely solid yet, this is more of the pattern he wants to expose for an upcoming 1.0 release.
Onward from here
I might push the DistributedTracer package further in the future. I think there’s real potential there, but it is not without pitfalls. Some of the challenges stem from constantly exporting data from an iOS app, so there’s a privacy (and privacy manifest) bit that needs to be seriously considered. There are also challenges with collecting enough data (but not too much), related choices in sampling so that it aligns with traces generated from infrastructure, as well as how to reliably transfer it from device to an endpoint. Nothing that can’t be overcome, but it’s not a small amount of work either.
Weekend hacking complete, I’m calling this a successful experiment. Okay, now back to actually debugging my library…
https://rhonabwy.com/2024/04/02/distributed-tracing-with-testing-on-ios-and-macos/
We've been asked whether this was achievable at all using #eBPF, and now we have finally shipped it!
This is an insane super-power: Viewing all CPU-time of a request all in one flamegraph/iciclegraph! No other profiling tool can do this infrastructure-wide!
#opensource #opentelemetry #profiling #distributedtracing #tracing
https://www.polarsignals.com/blog/posts/2024/03/05/correlating-tracing-with-profiling-using-ebpf
Last year, I wrote a post on @opentelemetry #DistributedTracing to understand more about the subject. I also created a demo around it. I’ve recently improved the demo to deepen my understanding and want to share my learning.
#Tracing avec #Opentelemetry: pourquoi c'est le futur (et pourquoi ça remplacera les logs)
Kelemetry is a #opensource tracing tool for #Kubernetes control plane.
A fascinating use case for applying #DistributedTracing on async systems. similar to #kspan, it represents the k8s object as the span and the events on it as child spans.
https://cncf.io/blog/2023/07/27/kelemetry-global-tracing-for-kubernetes-control-plane/
#devops #cncf
#DistributedTracing - Past, Present and Future https://www.zerok.ai/post/distributed-tracing-past-present-future
Hey Did you know that with #MicrometerIO Tracing 1.1 you can use annotations to create your spans?
Well, now you know! You also know that I definitely should stick to programming rather than graphic design
That's my first "designed" template for posting interesting snippets - don't hesitate to tell me how "great" job I did in the comments below
#DistributedTracing #Java #Observability
Hey Who is going to #DevoxxPL next week? My presentation is on the first day at 11:20 in Room 2. Join me if you want to listen about #DistributedTracing #Observability cc #MicrometerIO #Java #SpringBoot
Hey #dou has published an article with me
If you're
or want to learn
or know how to use a translator check it out here https://dou.eu/community/posts/how-to-create-tools-open-source?from=mp&utm_content=buffer32df1&utm_medium=social&utm_source=bufferapp.com&utm_campaign=buffer #SpringFramework #SpringBoot #SpringCloud #DistributedTracing
Hey I'm past #SpringIo23 and I can't get over it
It was fantastic to see my friends and the community. Regardless, we need to go back to our work! If you're using #SpringCloud Sleuth, do you know that there's a migration guide to migrate to #MicrometerIo Tracing? Check the link in the comment
#Java #DistributedTracing
And that's a wrap! Thank you for joining me and @TommyLudwig us to listen about #DistributedTracing #MicrometerIo! Hopefully you enjoyed it! #java
About to start my journey to #SpringIO Barcelona! Can't wait to discuss #Java #DistributedTracing #ContractTesting #SpringCloud #MicrometerIo with the community! Hold the conference and wait for me!
Wondering how to propagate ThreadLocal values ? We've got you covered! With #MicrometerIo context-propagation library you can store your thread locals, restore them in a scoped fashion and then reset them! #Java #ContextPropagation #DistributedTracing