activerabbit-ai 0.1.0 → 0.1.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 +17 -17
- data/lib/active_rabbit/client/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: 0b8f8ac811420383d702d6afd1b06bea0266006e2f3e68b0fe0873ecd328f526
|
|
4
|
+
data.tar.gz: 52a687ed3adcf2b019eb0755c9dfc25fec336e18635213b4172229bc9cc7480c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 882c69b7b28eb76cb7665901c37d06d87251b619583becceb017a3f026cc56b36023b804246a86c19f178212c5e87fa1b0a071aac897759f1d2b8d05ddc3f27e
|
|
7
|
+
data.tar.gz: d334d8e3a69efd944a8f987d0043ad6cde91482bb82fa7effca1570cc18b1fa3b903747b386161fc5b18c534cd4439da83b34c4553e226320f83727922e0dd87
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# ActiveRabbit
|
|
1
|
+
# ActiveRabbit AI Client
|
|
2
2
|
|
|
3
|
-
Ruby client library for ActiveRabbit application monitoring and error tracking. This gem provides comprehensive monitoring capabilities including error tracking, performance monitoring, N+1 query detection, and more for Ruby applications, with special focus on Rails integration.
|
|
3
|
+
Ruby client library for ActiveRabbit.ai application monitoring and error tracking. This gem provides comprehensive monitoring capabilities including error tracking, performance monitoring, N+1 query detection, and more for Ruby applications, with special focus on Rails integration.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ Ruby client library for ActiveRabbit application monitoring and error tracking.
|
|
|
18
18
|
Add this line to your application's Gemfile:
|
|
19
19
|
|
|
20
20
|
```ruby
|
|
21
|
-
gem '
|
|
21
|
+
gem 'activerabbit-ai'
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
And then execute:
|
|
@@ -27,18 +27,18 @@ And then execute:
|
|
|
27
27
|
|
|
28
28
|
Or install it yourself as:
|
|
29
29
|
|
|
30
|
-
$ gem install
|
|
30
|
+
$ gem install activerabbit-ai
|
|
31
31
|
|
|
32
32
|
## Quick Start
|
|
33
33
|
|
|
34
34
|
### Basic Configuration
|
|
35
35
|
|
|
36
36
|
```ruby
|
|
37
|
-
# config/initializers/
|
|
37
|
+
# config/initializers/activerabbit.rb
|
|
38
38
|
ActiveRabbit::Client.configure do |config|
|
|
39
|
-
config.api_key = ENV['
|
|
40
|
-
config.project_id = ENV['
|
|
41
|
-
config.api_url = ENV.fetch('
|
|
39
|
+
config.api_key = ENV['ACTIVERABBIT_API_KEY']
|
|
40
|
+
config.project_id = ENV['ACTIVERABBIT_PROJECT_ID']
|
|
41
|
+
config.api_url = ENV.fetch('ACTIVERABBIT_API_URL', 'https://api.activerabbit.ai')
|
|
42
42
|
config.environment = Rails.env
|
|
43
43
|
end
|
|
44
44
|
```
|
|
@@ -48,10 +48,10 @@ end
|
|
|
48
48
|
You can also configure the client using environment variables:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
51
|
+
export ACTIVERABBIT_API_KEY="your-api-key"
|
|
52
|
+
export ACTIVERABBIT_PROJECT_ID="your-project-id"
|
|
53
|
+
export ACTIVERABBIT_API_URL="https://app.activerabbit.ai"
|
|
54
|
+
export ACTIVERABBIT_ENVIRONMENT="production"
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## Usage
|
|
@@ -138,14 +138,14 @@ The gem automatically integrates with Rails when detected:
|
|
|
138
138
|
|
|
139
139
|
```ruby
|
|
140
140
|
class ApplicationController < ActionController::Base
|
|
141
|
-
before_action :
|
|
141
|
+
before_action :set_activerabbit_context
|
|
142
142
|
|
|
143
143
|
private
|
|
144
144
|
|
|
145
|
-
def
|
|
145
|
+
def set_activerabbit_context
|
|
146
146
|
# Additional context can be added to all requests
|
|
147
|
-
Thread.current[:
|
|
148
|
-
Thread.current[:
|
|
147
|
+
Thread.current[:activerabbit_request_context] ||= {}
|
|
148
|
+
Thread.current[:activerabbit_request_context][:user_id] = current_user&.id
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
```
|
|
@@ -310,7 +310,7 @@ bundle exec rspec spec/active_rabbit/client_spec.rb
|
|
|
310
310
|
|
|
311
311
|
## Contributing
|
|
312
312
|
|
|
313
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
313
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bugrabbit/active_rabbit-client.
|
|
314
314
|
|
|
315
315
|
## License
|
|
316
316
|
|