diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f2e595..d536bb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ ## [Unreleased] +## [0.0.4] - 2023-08-16 + +- Implement sample collection by sending samples to gem.sh endpoint +- Introduce Litejob to enqueue samples to be collected async +- Updates to `SampleCall` + - Split up `gem_and_version` to `gem` and `version` in `SampleCall` + - Also collect `application_name` and `type_fusion_version` with `SampleCall` + - Change `Tracepoint` API from `:call` to `:return` to also collect `return_value` in `SampleCall` +- Introduce `endpoint` and `application_name` configs + ## [0.0.3] - 2023-08-13 - Introduce `TypeFusion::Middleware` to allow type-sampling in Rack-powered apps diff --git a/Gemfile.lock b/Gemfile.lock index c2c1b68..2064d50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - type_fusion (0.0.3) + type_fusion (0.0.4) lhc (~> 15.2) litejob (~> 0.2.3) diff --git a/README.md b/README.md index fa5c569..a8637f9 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,27 @@ require "type_fusion" TypeFusion.config do |config| + # === application_name + # + # Set application_name to a string which is used to know where the samples + # came from. Set application_name to an empty string if you wish to not + # send the application name alongside the samples. + # + # Default: "TypeFusion" + # Default when using Rails: Rails.application.class.module_parent_name + # + # config.application_name = "YourApplication" + + + # === endpoint + # + # Set endpoint to an URL where TypeFusion should send the samples to. + # + # Default: "https://gem.sh/api/v1/types/samples" + # + # config.endpoint = "https://your-domain.com/api/v1/types/samples" + + # === type_sample_request # # Set type_sample_request to a lambda which resolves to true/false @@ -54,13 +75,16 @@ TypeFusion.config do |config| # to true/false to check if a tracepoint_path should be sampled # or not. # - # This can be useful when you only want to sample method calls for + # This can be useful when you want to only sample method calls for # certain gems or want to exclude a gem from being sampled. # # Example: # config.type_sample_tracepoint_path = ->(tracepoint_path) { - # # only sample calls for the Nokogiri gem - # tracepoint_path.include?("nokogiri") + # return false if tracepoint_path.include?("activerecord") + # return false if tracepoint_path.include?("sprockets") + # return false if tracepoint_path.include?("some-private-gem") + # + # true # } # # Default: ->(tracepoint_path) { true } diff --git a/lib/type_fusion/version.rb b/lib/type_fusion/version.rb index d1d0182..fd0dc63 100644 --- a/lib/type_fusion/version.rb +++ b/lib/type_fusion/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module TypeFusion - VERSION = "0.0.3" + VERSION = "0.0.4" end