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 +4 -4
- data/README.md +10 -4
- data/lib/apidepth/collector.rb +10 -3
- data/lib/apidepth/railtie.rb +3 -2
- data/lib/apidepth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3226f968bffa6535e9444dbbec3cd494d0e457138fd288d54f9f48df1e6d6166
|
|
4
|
+
data.tar.gz: cffca712b07f6501d020ecc54cac0f811dfea18c89c959a778ed048dd4f12d4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53b8a62f5c91b8998dd13d06c41c64d5922a228f6022534320766fe080b7b9f9c45cb96d93de16cfb542a9709bb10c771e72514671195bde8349562b86dcba58
|
|
7
|
+
data.tar.gz: 558c43465398f9963d6254ca90167b63b0d7db5ce00735cdb42e900eb37cfa2df4a3b543a2b58ad816191dbad07929c4cb451ea7589e8fe980d6c3040cb16ade
|
data/README.md
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
# apidepth
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
19
|
+
**Rate limit intelligence.** Apidepth tracks 429 patterns and projects quota burn-down before you hit the ceiling — with a burn-down card showing time-to-throttle at current request rate.
|
|
14
20
|
|
|
15
21
|
---
|
|
16
22
|
|
data/lib/apidepth/collector.rb
CHANGED
|
@@ -234,9 +234,16 @@ module Apidepth
|
|
|
234
234
|
return if events.empty?
|
|
235
235
|
|
|
236
236
|
key = Apidepth.configuration.api_key
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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
|
|
data/lib/apidepth/railtie.rb
CHANGED
|
@@ -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
|
|
12
|
-
"
|
|
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
|
data/lib/apidepth/version.rb
CHANGED
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.
|
|
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.
|
|
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: []
|