dd-trace-rb
contracts.ruby
dd-trace-rb | contracts.ruby | |
---|---|---|
5 | 5 | |
304 | 1,441 | |
0.3% | - | |
10.0 | 4.6 | |
5 days ago | 15 days ago | |
Ruby | Ruby | |
GNU General Public License v3.0 or later | BSD 2-clause "Simplified" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dd-trace-rb
-
Integrating Datadog Instrumented Apps in your OpenTelemetry Stack
This action starts two Ruby on Rails APIs, one instrumented with ddtrace and another with OpenTelemetry SDK, both connecting to an OpenTelemetry Collector that sends data to Jaeger:
-
The end of "Useless Ruby sugar": On intuitions and evolutions
Thing is, once you have 1) and 2), the added complexity of bringing in, integrating, and writing for a different tool to achieve 3) begins to make little sense, when you can just go along and do it just as well in rspec anyway... It's a matter of balance and heavily depends on the project.
> if you're still at Datadog
As a matter of fact I am. Feel free to shoot me an email.
curl -s https://github.com/DataDog/dd-trace-rb/commit/176c642ca73679cabc5fa1a113bc9b600aa04dcd.patch | grep '^From:'
-
A few words on Ruby's type annotations state
> For myself, I'm fine with the typing being in a separate .rbs file
We type[0] by having one separate .rbs file per .rb file. Works really well with an editor's vertical splits: type outline on one side, code on the other. That, or use something like vim-projectionist[1].
[0]: (WIP: there's a huge codebase to type, but we're progressively getting there) https://github.com/DataDog/dd-trace-rb/tree/master/sig
[1]: https://github.com/tpope/vim-projectionist
-
Why Authorization Is Hard
Thanks! I'll pass it on to the team :D
I've got to say, the folks at Intercom made it particularly fun. They were sending us traces and graphs from their internal systems when we trying to figure out some issues with them (e.g. we ran into this datadog context problem: https://github.com/DataDog/dd-trace-rb/issues/1389)
contracts.ruby
-
A few words on Ruby's type annotations state
I had written a code contracts library for Ruby about 10 years ago [1]. I stopped working on it, mainly because it only provided runtime type checking, and I wanted static type checking. Nowadays my main language is typescript. I miss ruby, but can't give up the static typing that typescript provides. I really wish Ruby had a type system with the same level of support. VSCode has phenomenal TS support, and there's a community adding types to projects [2]. This is something I'd like for Ruby also.
> An integral part of this informality is relying on Matz’s taste and intuition for everything that affects the language’s core.
I think a more defined process would mean a better future for Ruby and Ruby developers.
- [1] https://github.com/egonschiele/contracts.ruby
- [2] https://github.com/DefinitelyTyped/DefinitelyTyped
-
Why I Stopped Using Sorbet in All My Ruby Projects
Contracts gem can be a nice middle-ground. It has a fairly readably syntax and only checks method inputs and outputs at runtime. We use it to annotate important core methods, while leaving the rest type-free.
-
Should gems support old Ruby versions like 2.4?
For example contracts gem needs to have a separate version/branch for ruby 3.x due to the breaking change above
-
Cells - Introduction
This gives me access to input values as long as I defined them via attr_reader. Oh what's the Contract XXX above attr_reader? They are from contracts.ruby and completely optional and won't be explained in this post. You can safely ignore those and maybe study that gem later.
What are some alternatives?
ffi - Ruby FFI
Fundamental Ruby - :books: Fundamental programming with ruby examples and references. It covers threads, SOLID principles, design patterns, data structures, algorithms. Books for reading. Repo for website https://github.com/khusnetdinov/betterdocs
cerbos - Cerbos is the open core, language-agnostic, scalable authorization solution that makes user permissions and authorization simple to implement and manage by writing context-aware access control policies for your application resources.
Ruby style guide - A community-driven Ruby coding style guide
Ory Keto - Open Source (Go) implementation of "Zanzibar: Google's Consistent, Global Authorization System". Ships gRPC, REST APIs, newSQL, and an easy and granular permission language. Supports ACL, RBAC, and other access models.
fast-ruby - :dash: Writing Fast Ruby :heart_eyes: -- Collect Common Ruby idioms.
casbin-server - Casbin as a Service (CaaS)
Rails style guide - A community-driven Ruby on Rails style guide
Rails Performance - Monitor performance of you Rails applications (self-hosted and free)
Best-Ruby - Ruby Tricks, Idiomatic Ruby, Refactoring and Best Practices
OPA (Open Policy Agent) - Open Policy Agent (OPA) is an open source, general-purpose policy engine.
RSpec style guide - RSpec Best Practices