posthog-ruby 3.9.3 → 3.9.4
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 +4 -4
- data/lib/posthog/client.rb +11 -1
- data/lib/posthog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fa0374a1bdfa7b8d76b8f2ffeee64e868883148c50ab714ed3072db48862ee42
|
|
4
|
+
data.tar.gz: b2729eb5375aea69389ff2fb7ba012a5644e60723fda3b2bc60647161cca11b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7287da0e6624013013c6bddc1565791be27486cfdb9bf7f196c0fc5663fd5f963375d1d3d7f5b8b6cf6e2f57c515991cf605c9abf44dba197a4f85f8f0e352af
|
|
7
|
+
data.tar.gz: 7e16531f9ca40884c42ef54eff1507efec2b64c09b0f9cd09da7e16186d9e337846699fde96792b4d1ed75c403d95222e37a8de5ec768b8fbd1f16882ecb2225
|
data/lib/posthog/client.rb
CHANGED
|
@@ -106,7 +106,9 @@ module PostHog
|
|
|
106
106
|
@feature_flags_poller = nil
|
|
107
107
|
@personal_api_key = opts[:personal_api_key]
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
if @disabled && !opts[:silence_disabled_client_error]
|
|
110
|
+
logger.error('api_key is missing or empty after trimming whitespace; check your project API key')
|
|
111
|
+
end
|
|
110
112
|
|
|
111
113
|
# Warn when multiple clients are created with the same API key (can cause dropped events)
|
|
112
114
|
unless @disabled || opts[:test_mode] || opts[:disable_singleton_warning]
|
|
@@ -284,6 +286,8 @@ module PostHog
|
|
|
284
286
|
# same `$feature/<key>` and `$active_feature_flags` properties as the snapshot.
|
|
285
287
|
# @return [Boolean, nil] Whether the exception event was queued or sent, or nil if the input could not be parsed.
|
|
286
288
|
def capture_exception(exception, distinct_id = nil, additional_properties = {}, flags: nil)
|
|
289
|
+
return false if @disabled
|
|
290
|
+
|
|
287
291
|
exception_info = ExceptionCapture.build_parsed_exception(exception)
|
|
288
292
|
|
|
289
293
|
return if exception_info.nil?
|
|
@@ -310,6 +314,8 @@ module PostHog
|
|
|
310
314
|
# @return [Boolean] Whether the identify event was queued or sent.
|
|
311
315
|
# @macro common_attrs
|
|
312
316
|
def identify(attrs)
|
|
317
|
+
return false if @disabled
|
|
318
|
+
|
|
313
319
|
symbolize_keys! attrs
|
|
314
320
|
enqueue(FieldParser.parse_for_identify(attrs))
|
|
315
321
|
end
|
|
@@ -325,6 +331,8 @@ module PostHog
|
|
|
325
331
|
# @return [Boolean] Whether the group identify event was queued or sent.
|
|
326
332
|
# @macro common_attrs
|
|
327
333
|
def group_identify(attrs)
|
|
334
|
+
return false if @disabled
|
|
335
|
+
|
|
328
336
|
symbolize_keys! attrs
|
|
329
337
|
enqueue(FieldParser.parse_for_group_identify(attrs))
|
|
330
338
|
end
|
|
@@ -337,6 +345,8 @@ module PostHog
|
|
|
337
345
|
# @return [Boolean] Whether the alias event was queued or sent.
|
|
338
346
|
# @macro common_attrs
|
|
339
347
|
def alias(attrs)
|
|
348
|
+
return false if @disabled
|
|
349
|
+
|
|
340
350
|
symbolize_keys! attrs
|
|
341
351
|
enqueue(FieldParser.parse_for_alias(attrs))
|
|
342
352
|
end
|
data/lib/posthog/version.rb
CHANGED