Skip to content

Commit

Permalink
v0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Aug 15, 2023
1 parent 8bcd913 commit 4cc8399
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
type_fusion (0.0.3)
type_fusion (0.0.4)
lhc (~> 15.2)
litejob (~> 0.2.3)

Expand Down
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion lib/type_fusion/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module TypeFusion
VERSION = "0.0.3"
VERSION = "0.0.4"
end

0 comments on commit 4cc8399

Please sign in to comment.