apidepth 0.2.0 → 0.2.1

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: fe52fa09e05f825f4300ebb638df967a43087c59bbd833eead51101ad784e092
4
- data.tar.gz: 90b843525ebc7ee2e8124833593f6f13284baff8e20ba031a9df64abd6dd6867
3
+ metadata.gz: 3226f968bffa6535e9444dbbec3cd494d0e457138fd288d54f9f48df1e6d6166
4
+ data.tar.gz: cffca712b07f6501d020ecc54cac0f811dfea18c89c959a778ed048dd4f12d4c
5
5
  SHA512:
6
- metadata.gz: a570c48989e019f50c32e5c8d56de9b88eac99035bea44fdf2fa9abfd7021a1e4d86141d2837fdbacbf91435110572394cf0efd10139af83faee51f6eaf301bc
7
- data.tar.gz: afa912c7e24d9823d1eee500ba521981577df34e7a7dd3200b0d336d0e16a7674d8a26db5624ab2c8dd537c5ce45f92b8a1798a9fbb3e9b9e30013e01b9062ce
6
+ metadata.gz: 53b8a62f5c91b8998dd13d06c41c64d5922a228f6022534320766fe080b7b9f9c45cb96d93de16cfb542a9709bb10c771e72514671195bde8349562b86dcba58
7
+ data.tar.gz: 558c43465398f9963d6254ca90167b63b0d7db5ce00735cdb42e900eb37cfa2df4a3b543a2b58ad816191dbad07929c4cb451ea7589e8fe980d6c3040cb16ade
data/README.md CHANGED
@@ -1,16 +1,22 @@
1
1
  # apidepth
2
2
 
3
- Passive outbound API latency monitoring for Rails. Captures real production latency to third-party APIs — Stripe, OpenAI, Twilio, and others without synthetic probes, without payload capture, and without changes to your application code beyond a one-time initializer.
3
+ Most API monitoring tools measure latency from their servers to the vendor. That's not what your users feel. Apidepth instruments `Net::HTTP` directly every outbound call your app makes to Stripe, OpenAI, or Twilio is timed at the socket level, from your server. Then it benchmarks your numbers against anonymized fleet data, so when Stripe is slow you can tell if it's you or everyone.
4
+
5
+ No payload capture. No credentials touch our infrastructure. No changes to your application code beyond a one-time initializer.
4
6
 
5
7
  ---
6
8
 
7
9
  ## How it works
8
10
 
9
- Most API monitoring tools run scheduled probes from their own servers and measure latency to a vendor endpoint. That tells you how fast the vendor responds to *them*, from *their* location, to a test request. It doesn't tell you what your users are experiencing.
11
+ **Real traffic, not synthetic probes.** Every outbound HTTP call your application makes to a known vendor is timed at the socket level, tagged with outcome and environment metadata, and batched to the Apidepth collector in the background. The latency number in your dashboard is the number your users feel — not a probe running from a data center somewhere else.
12
+
13
+ **Fleet benchmarking.** Because Apidepth aggregates anonymized timing data across all customers, your dashboard shows not just "your Stripe p95 is 420ms" but "the fleet median is 280ms — you may have a regional routing issue." That comparison is only possible with real traffic from real deployments, which is why no synthetic probe tool can offer it.
14
+
15
+ **Proof of Innocence.** When all endpoints to a vendor spike simultaneously, Apidepth surfaces a verdict: *isolated* (the spike is yours alone — likely your code or infrastructure) or *tracking* (the fleet sees the same thing — vendor-side). The attribution card makes it fast to tell ops "it's Stripe, not us."
10
16
 
11
- Apidepth instruments `Net::HTTP` directly. Every outbound HTTP call your application makes to a known vendor is timed at the socket level, tagged with outcome and environment metadata, and batched to the Apidepth collector in the background. No payloads are captured. No credentials touch our infrastructure. The latency measurement is from your server to the vendor — the number your users feel.
17
+ **Alerts and weekly digest.** Apidepth fires alerts when vendor latency crosses your configured threshold and sends a weekly digest summarizing what changed. Monitoring without alerting is passive; this is working for you.
12
18
 
13
- The second differentiator is benchmarking. Because Apidepth aggregates anonymized timing data across all customers, your dashboard can show not just "your Stripe p95 is 420ms" but "the fleet median is 280ms you may have a regional routing issue." That comparison is only possible with real traffic from real deployments, which is why no synthetic probe tool can offer it.
19
+ **Rate limit intelligence.** Apidepth tracks 429 patterns and projects quota burn-down before you hit the ceilingwith a burn-down card showing time-to-throttle at current request rate.
14
20
 
15
21
  ---
16
22
 
@@ -234,9 +234,16 @@ module Apidepth
234
234
  return if events.empty?
235
235
 
236
236
  key = Apidepth.configuration.api_key
237
- # Nil or empty key: Railtie already warned at boot — skip silently rather
238
- # than sending a broken "Bearer " header and burning a failure increment.
239
- return if key.nil? || key.empty?
237
+ if key.nil? || key.empty?
238
+ unless @warned_no_key
239
+ @warned_no_key = true
240
+ Apidepth.logger&.warn(
241
+ "[Apidepth] No API key configured — events are being dropped. " \
242
+ "Visit www.apidepth.io to create an account and get your key."
243
+ )
244
+ end
245
+ return
246
+ end
240
247
 
241
248
  validate_api_key!(key)
242
249
 
@@ -8,8 +8,9 @@ module Apidepth
8
8
  initializer "apidepth.validate_config", after: :load_config_initializers do
9
9
  if Apidepth.configuration.api_key.nil?
10
10
  Rails.logger.warn(
11
- "[Apidepth] No api_key configured — events will not be delivered. " \
12
- "Add `config.api_key = ENV['APIDEPTH_API_KEY']` to config/initializers/apidepth.rb"
11
+ "[Apidepth] No API key configured — events will not be delivered. " \
12
+ "Visit www.apidepth.io to create an account and get your key, " \
13
+ "then add `config.api_key = ENV['APIDEPTH_API_KEY']` to config/initializers/apidepth.rb"
13
14
  )
14
15
  end
15
16
  end
@@ -1,5 +1,5 @@
1
1
  # lib/apidepth/version.rb
2
2
 
3
3
  module Apidepth
4
- VERSION = "0.2.0".freeze
4
+ VERSION = "0.2.1".freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apidepth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apidepth
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 4.0.10
141
+ rubygems_version: 4.0.11
142
142
  specification_version: 4
143
143
  summary: Passive outbound API latency monitoring for Rails applications
144
144
  test_files: []