posthog-rails 3.15.2 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1469a7d108ba7ac00e7d923f8bb0f644f2d9e5b01991d67c3e8f0bd66d2eb47
4
- data.tar.gz: c42b711e532bca3b5bf60dafaa33be7c23d1d93d8337d9649d2d798873fe12e0
3
+ metadata.gz: 3c51754943601dbb009cc9716c8c12da1efa7e363d69518c7e416315113f92bc
4
+ data.tar.gz: c50976aa271a002b8a24f7bf1cb905d5f8fcfe2f00fda0eb1ff9009142b525ec
5
5
  SHA512:
6
- metadata.gz: 74c2f00a68ae12c7c059b34067f208e51f8e48e5e14c6dbb8c50479633724c156a009909bac4a235913baa9efc33f2e12597fe5e0604b8f64621209be894d7eb
7
- data.tar.gz: 29ad15165253ca46b51a405065f1e262a5fd58e0387ff007f0c805c4283e12c19756ed3006f8b6fc9b7a17205447ebd234d23bcd4e52dfc3f599dc024de7bdea
6
+ metadata.gz: 5c7a7e3fe38ff16dcdfe1ececce1928d3c9d79825180c922c15f9ab047df8b81e5fd338367095160ee8960d3725ca9ff30e7b83fad12957ae6d00720f3a3680e
7
+ data.tar.gz: f174fd1bd044c1b681afbb1e06d3521ccc4c129c2bb6b4ae9d5feb86f0e818d88fee1b50c4fff9c5ceaca0b0c52e7f1f1e4469bfb0324e6d8f0829f9bf072953
@@ -64,7 +64,12 @@ module PostHog
64
64
  # Add serialized job arguments (be careful with sensitive data)
65
65
  properties['$job_arguments'] = sanitize_job_arguments(arguments) if arguments.present?
66
66
 
67
- PostHog.capture_exception(exception, distinct_id, properties)
67
+ PostHog.capture_exception(
68
+ exception,
69
+ distinct_id,
70
+ properties,
71
+ mechanism: { 'type' => 'active_job', 'handled' => false }
72
+ )
68
73
  rescue StandardError => e
69
74
  # Don't let PostHog errors break job processing
70
75
  PostHog::Logging.logger.error("Failed to capture job exception: #{e.message}")
@@ -60,7 +60,12 @@ module PostHog
60
60
  distinct_id = extract_distinct_id(env)
61
61
  additional_properties = build_properties(request, env)
62
62
 
63
- PostHog.capture_exception(exception, distinct_id, additional_properties)
63
+ PostHog.capture_exception(
64
+ exception,
65
+ distinct_id,
66
+ additional_properties,
67
+ mechanism: { 'type' => 'rails', 'handled' => false }
68
+ )
64
69
  rescue StandardError => e
65
70
  PostHog::Logging.logger.error("Failed to capture exception: #{e.message}")
66
71
  PostHog::Logging.logger.error("Backtrace: #{e.backtrace&.first(5)&.join("\n")}")
@@ -41,7 +41,12 @@ module PostHog
41
41
  end
42
42
  end
43
43
 
44
- PostHog.capture_exception(error, distinct_id, properties)
44
+ PostHog.capture_exception(
45
+ error,
46
+ distinct_id,
47
+ properties,
48
+ mechanism: { 'type' => 'rails_error_reporter', 'handled' => handled }
49
+ )
45
50
  rescue StandardError => e
46
51
  PostHog::Logging.logger.error("Failed to report error via subscriber: #{e.message}")
47
52
  PostHog::Logging.logger.error("Backtrace: #{e.backtrace&.first(5)&.join("\n")}")
@@ -2,6 +2,6 @@
2
2
 
3
3
  module PostHog
4
4
  module Rails
5
- VERSION = '3.15.2'
5
+ VERSION = '3.16.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posthog-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.15.2
4
+ version: 3.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PostHog
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - '='
31
31
  - !ruby/object:Gem::Version
32
- version: 3.15.3
32
+ version: 3.16.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 3.15.3
39
+ version: 3.16.0
40
40
  description: Automatic exception tracking and instrumentation for Ruby on Rails applications
41
41
  using PostHog
42
42
  email: engineering@posthog.com