yabeda-http_requests 0.2.1 → 0.3.0
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/.github/workflows/build-release.yml +8 -4
- data/.github/workflows/test.yml +7 -1
- data/CHANGELOG.md +7 -0
- data/Gemfile +2 -0
- data/README.md +8 -0
- data/lib/yabeda/http_requests/config.rb +14 -0
- data/lib/yabeda/http_requests/version.rb +1 -1
- data/lib/yabeda/http_requests.rb +8 -7
- data/yabeda-http_requests.gemspec +2 -0
- metadata +24 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8f271bf0386cf54dbf378d7332235480aaac16b2739370314ae8bca7c1135ff
|
|
4
|
+
data.tar.gz: fc92f8a329aae59608dad648e97a5bc44cfbbe4aa38b480c9ee2573a96115410
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f14ef60785c76dc6d1f1dd7129f5ef6cbbab2a7d07e19d2c6bda8968b3012314db9a067131bb75feade1fc93e5c0cf09b5247c70ebddc03476567267939cf40
|
|
7
|
+
data.tar.gz: a80a022901a4e7c6696f3aeb7aa4e5b5697c921bddb04420f6ae11bcdd2dac70e3280cfa86654ba673b36597ee4e42a4f92952cad9d8bba58fccf938f053b4d0
|
|
@@ -8,13 +8,17 @@ on:
|
|
|
8
8
|
jobs:
|
|
9
9
|
release:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
id-token: write
|
|
14
|
+
packages: write
|
|
11
15
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@v4
|
|
13
17
|
with:
|
|
14
18
|
fetch-depth: 0 # Fetch current tag as annotated. See https://github.com/actions/checkout/issues/290
|
|
15
19
|
- uses: ruby/setup-ruby@v1
|
|
16
20
|
with:
|
|
17
|
-
ruby-version:
|
|
21
|
+
ruby-version: "3.4"
|
|
18
22
|
- name: "Extract data from tag: version, message, body"
|
|
19
23
|
id: tag
|
|
20
24
|
run: |
|
|
@@ -75,8 +79,8 @@ jobs:
|
|
|
75
79
|
GEM_HOST_API_KEY: Bearer ${{ secrets.GITHUB_TOKEN }}
|
|
76
80
|
run: |
|
|
77
81
|
gem push yabeda-http_requests-${{ steps.tag.outputs.version }}.gem --host https://rubygems.pkg.github.com/${{ github.repository_owner }}
|
|
82
|
+
- name: Configure RubyGems Credentials
|
|
83
|
+
uses: rubygems/configure-rubygems-credentials@main
|
|
78
84
|
- name: Publish to RubyGems
|
|
79
|
-
env:
|
|
80
|
-
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_API_KEY }}"
|
|
81
85
|
run: |
|
|
82
86
|
gem push yabeda-http_requests-${{ steps.tag.outputs.version }}.gem
|
data/.github/workflows/test.yml
CHANGED
|
@@ -14,6 +14,7 @@ jobs:
|
|
|
14
14
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
|
|
15
15
|
name: 'Ruby ${{ matrix.ruby }}'
|
|
16
16
|
runs-on: ubuntu-latest
|
|
17
|
+
continue-on-error: ${{ matrix.optional || false }}
|
|
17
18
|
strategy:
|
|
18
19
|
fail-fast: false
|
|
19
20
|
matrix:
|
|
@@ -22,8 +23,13 @@ jobs:
|
|
|
22
23
|
- '3.0'
|
|
23
24
|
- '3.1'
|
|
24
25
|
- '3.2'
|
|
26
|
+
- '3.3'
|
|
27
|
+
- '3.4'
|
|
28
|
+
include:
|
|
29
|
+
- ruby: head
|
|
30
|
+
- optional: true
|
|
25
31
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
32
|
+
- uses: actions/checkout@v4
|
|
27
33
|
- uses: ruby/setup-ruby@v1
|
|
28
34
|
with:
|
|
29
35
|
ruby-version: ${{ matrix.ruby }}
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 0.3.0 - 2025-10-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Ability to configure histogram bucket sizes for the `response_duration` metric. [#10](https://github.com/yabeda-rb/yabeda-http_requests/pull/10) by [@ryan-dyer-sp][]
|
|
13
|
+
|
|
8
14
|
## 0.2.1 - 2023-12-14
|
|
9
15
|
|
|
10
16
|
### Fixed
|
|
@@ -43,3 +49,4 @@ Initial release.
|
|
|
43
49
|
[@danmarcab]: https://github.com/danmarcab "Daniel Marín"
|
|
44
50
|
[@Envek]: https://github.com/Envek "Andrey Novikov"
|
|
45
51
|
[@webmat]: https://github.com/webmat "Mathieu Martin"
|
|
52
|
+
[@ryan-dyer-sp]: https://github.com/ryan-dyer-sp "Ryan"
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -67,6 +67,14 @@ Follow the [yabeda-external-http-requests](http://localhost:3000/d/OGd-oEXWz/yab
|
|
|
67
67
|
Finally, after a couple of minutes when data collected you will see the following:
|
|
68
68
|

|
|
69
69
|
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
Configuration is handled by [anyway_config] gem. With it you can load settings from environment variables (upcased and prefixed with `YABEDA_HTTP_REQUESTS_`), YAML files, and other sources. See [anyway_config] docs for details.
|
|
73
|
+
|
|
74
|
+
| Config key | Type | Default | Description |
|
|
75
|
+
| -----------| ----- | ------- | ------------------------------------------- |
|
|
76
|
+
| `buckets` | array | [] | Set buckets to be used by histogram metrics |
|
|
77
|
+
|
|
70
78
|
## Development with Docker
|
|
71
79
|
|
|
72
80
|
Get local development environment working and tests running is very easy with docker-compose:
|
data/lib/yabeda/http_requests.rb
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require 'yabeda/http_requests/version'
|
|
4
4
|
require 'yabeda/http_requests/sniffer'
|
|
5
|
+
require 'yabeda/http_requests/config'
|
|
5
6
|
require 'yabeda'
|
|
6
7
|
require 'sniffer'
|
|
7
8
|
|
|
@@ -16,22 +17,22 @@ module Yabeda
|
|
|
16
17
|
].freeze
|
|
17
18
|
|
|
18
19
|
Yabeda.configure do
|
|
20
|
+
config = ::Yabeda::HttpRequests::Config.new
|
|
21
|
+
buckets = config.buckets || LONG_RUNNING_REQUEST_BUCKETS
|
|
22
|
+
|
|
19
23
|
group :http
|
|
20
24
|
|
|
21
25
|
counter :request_total,
|
|
22
|
-
comment: 'A counter of the total number of external HTTP
|
|
23
|
-
requests.',
|
|
26
|
+
comment: 'A counter of the total number of external HTTP requests.',
|
|
24
27
|
tags: %i[host port method]
|
|
25
28
|
counter :response_total,
|
|
26
|
-
comment: 'A counter of the total number of external HTTP
|
|
27
|
-
responses.',
|
|
29
|
+
comment: 'A counter of the total number of external HTTP responses.',
|
|
28
30
|
tags: %i[host port method status]
|
|
29
31
|
|
|
30
32
|
histogram :response_duration, tags: %i[host port method status],
|
|
31
33
|
unit: :milliseconds,
|
|
32
|
-
buckets:
|
|
33
|
-
comment:
|
|
34
|
-
duration (milliseconds)."
|
|
34
|
+
buckets: buckets,
|
|
35
|
+
comment: 'A histogram of the response duration (milliseconds).'
|
|
35
36
|
|
|
36
37
|
::Sniffer.config do |c|
|
|
37
38
|
c.enabled = true
|
|
@@ -26,6 +26,8 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
27
27
|
spec.require_paths = ['lib']
|
|
28
28
|
|
|
29
|
+
spec.add_dependency 'anyway_config', '>= 1.3', '< 3.0'
|
|
30
|
+
|
|
29
31
|
spec.add_runtime_dependency 'sniffer'
|
|
30
32
|
spec.add_runtime_dependency 'yabeda'
|
|
31
33
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yabeda-http_requests
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dmitry Salahutdinov
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: anyway_config
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '1.3'
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '3.0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '1.3'
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '3.0'
|
|
13
32
|
- !ruby/object:Gem::Dependency
|
|
14
33
|
name: sniffer
|
|
15
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -60,6 +79,7 @@ files:
|
|
|
60
79
|
- bin/setup
|
|
61
80
|
- docker-compose.yml
|
|
62
81
|
- lib/yabeda/http_requests.rb
|
|
82
|
+
- lib/yabeda/http_requests/config.rb
|
|
63
83
|
- lib/yabeda/http_requests/sniffer.rb
|
|
64
84
|
- lib/yabeda/http_requests/version.rb
|
|
65
85
|
- yabeda-http_requests-logo.png
|
|
@@ -70,7 +90,6 @@ licenses:
|
|
|
70
90
|
metadata:
|
|
71
91
|
homepage_uri: https://github.com/yabeda-rb/yabeda-http_requests
|
|
72
92
|
source_code_uri: https://github.com/yabeda-rb/yabeda-http_requests
|
|
73
|
-
post_install_message:
|
|
74
93
|
rdoc_options: []
|
|
75
94
|
require_paths:
|
|
76
95
|
- lib
|
|
@@ -85,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
85
104
|
- !ruby/object:Gem::Version
|
|
86
105
|
version: '0'
|
|
87
106
|
requirements: []
|
|
88
|
-
rubygems_version: 3.
|
|
89
|
-
signing_key:
|
|
107
|
+
rubygems_version: 3.6.9
|
|
90
108
|
specification_version: 4
|
|
91
109
|
summary: Monitoring of external services HTTP/HTTPS calls
|
|
92
110
|
test_files: []
|