callcounter 0.1.1 → 0.1.2
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 +46 -10
- data/lib/callcounter/capturer.rb +2 -0
- data/lib/callcounter/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: 694f83b9c21262d809ab3d266ff011d8f75c2a45b8260a6a6887ede4f1c360e5
|
4
|
+
data.tar.gz: 1e83328f50e2bd7e6bed1230fdee6e27cba10b6d28e7cebc8dda449835598867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b999f9fc145d1b6691d0ba32d1344f8396df52efaa53973d2953abf0a38d471238ad61c6b0c536a3a5bad814538bade3046a29b9569ee22cf7a9b727013a57f
|
7
|
+
data.tar.gz: 285d154f5da3904ccd4bf6750254061fe26e0c6ea8b9ef7a6ace9f2513e6eefcf94145c494a483f82a69645796e4bcfd916fe1af362fd95bd56d9d6c407bd2bb
|
data/README.md
CHANGED
@@ -2,18 +2,39 @@
|
|
2
2
|
|
3
3
|
# Callcounter Ruby integration gem
|
4
4
|
|
5
|
-
This gem can be used to gather API request & response data from Rack based applications.
|
5
|
+
This gem can be used to gather API request & response data from Rack based applications and send it to Callcounter.
|
6
|
+
|
7
|
+
Callcounter is an API analytics platform that collect information about requests (calls) to your API using so-called
|
8
|
+
integrations. Integrations come in the form of a Ruby gem, a Nuget package, a Pip module, etcetera. The integrations
|
9
|
+
can send the data to Callcounter using an API, which is described at: https://callcounter.eu/pages/api
|
10
|
+
|
11
|
+
After collection data, the web interface can then be used to view all kinds of metrics, giving you insight in the
|
12
|
+
(mis)usage of your API.
|
6
13
|
|
7
14
|
## Install
|
8
15
|
|
9
|
-
|
16
|
+
### Bundler
|
17
|
+
|
18
|
+
When using bundler, simply add the following line to your Gemfile and run `bundle`:
|
10
19
|
|
11
20
|
```ruby
|
12
21
|
gem 'callcounter'
|
13
22
|
```
|
14
23
|
|
15
|
-
|
16
|
-
|
24
|
+
### Other
|
25
|
+
|
26
|
+
Install the gem with: `gem install callcounter`. Next, add the following call to your entry file in order to activate
|
27
|
+
the Rack middleware:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
use Callcounter::Capturer
|
31
|
+
```
|
32
|
+
|
33
|
+
## Configure what to capture
|
34
|
+
|
35
|
+
Configure callcounter with the following code, this can be placed in a Rails initializer when using Ruby on Rails,
|
36
|
+
for example `config/initializers/callcounter.rb`, or somewhere in your entry point file when using Sinatra or other
|
37
|
+
Rack based frameworks:
|
17
38
|
|
18
39
|
```ruby
|
19
40
|
Callcounter.configure do |config|
|
@@ -21,13 +42,12 @@ Callcounter.configure do |config|
|
|
21
42
|
end
|
22
43
|
```
|
23
44
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
## Configure what to capture
|
45
|
+
This will capture any requests to the `api` subdomain and any request that has a path which starts with `/api`.
|
46
|
+
After deploying you should start seeing data in Callcounter. Note that this might take some time because this gems
|
47
|
+
only sends data every few requests or every few minutes.
|
28
48
|
|
29
|
-
|
30
|
-
For example, the default lambda
|
49
|
+
If you API doesn't match with the default matching rules, you can add a lambda that will be called for every request
|
50
|
+
to determine whether it was a request to your API. For example, you can custome the default lambda shown below:
|
31
51
|
|
32
52
|
```ruby
|
33
53
|
Callcounter.configure do |config|
|
@@ -38,6 +58,22 @@ Callcounter.configure do |config|
|
|
38
58
|
end
|
39
59
|
```
|
40
60
|
|
61
|
+
## Bug reporting
|
62
|
+
|
63
|
+
Bugs can be reported through the Sourcehut todo lists found at: https://todo.sr.ht/~webindie/callcounter-gem
|
64
|
+
If you don't want to sign up for an account, you can also contact us through https://callcounter.eu/contact
|
65
|
+
|
66
|
+
## Releasing
|
67
|
+
|
68
|
+
- Verify tests pass.
|
69
|
+
- Increment version number in: `lib/callcounter/version.rb`
|
70
|
+
- Run `bundle install`
|
71
|
+
- Commit all changes
|
72
|
+
- Create a git tag for the release.
|
73
|
+
- Push the git tag.
|
74
|
+
- Build the gem: `gem build callcounter.gemspec`
|
75
|
+
- Push the gem to rubygems.org: `gem push callcounter-?.?.?.gem`
|
76
|
+
|
41
77
|
## About Callcounter
|
42
78
|
|
43
79
|
[Callcounter](https://callcounter.eu) is a service built by [Webindie](https://webindie.nl) that
|
data/lib/callcounter/capturer.rb
CHANGED
data/lib/callcounter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: callcounter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Webindie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Callcounter is a service that helps API providers with debugging and
|
14
14
|
optimising the usage of their APIs.
|