Compare commits

..

6 Commits

Author SHA1 Message Date
pakrym-stripe
8c4c4d7668
Merge pull request #1143 from stripe/richardm-next-major
Bring sdk-release/next-major up to date
2022-11-07 08:48:21 -08:00
Richard Marmorstein
7f4fe2120e Merge branch 'master' into richardm-next-major 2022-11-04 16:01:32 -07:00
anniel-stripe
6dc009579d
Disable AsciiComments rule (#1142) 2022-11-02 16:31:55 -07:00
Kamil Pajdzik
c2bb4dbceb
Codegen for openapi v204 (#1138) 2022-11-02 13:21:34 -07:00
anniel-stripe
46eca72f79
Do not run Coveralls if secret token is not available (#1137) 2022-10-24 14:34:46 -07:00
Bart de Water
2dec63e6b0
Update request_end instrumentation example (#1095)
* Update request_end instrumentation example in README.md
2022-10-14 16:40:20 -07:00
4 changed files with 8 additions and 6 deletions

View File

@ -45,9 +45,7 @@ Style/AccessModifierDeclarations:
EnforcedStyle: inline
Style/AsciiComments:
AllowedChars:
-
-
Enabled: false
Style/FrozenStringLiteralComment:
EnforcedStyle: always

View File

@ -1 +1 @@
v184
v204

View File

@ -261,9 +261,13 @@ For example:
```ruby
Stripe::Instrumentation.subscribe(:request_end) do |request_event|
# Filter out high-cardinality ids from `path`
path_parts = event.path.split("/").drop(2)
resource = path_parts.map { |part| part.match?(/\A[a-z_]+\z/) ? part : ":id" }.join("/")
tags = {
method: request_event.method,
resource: request_event.path.split('/')[2],
resource: resource,
code: request_event.http_status,
retries: request_event.num_retries
}

View File

@ -3,7 +3,7 @@
# Report test coverage to coveralls for only one Ruby version to avoid
# repeated builds. This also accounts for coveralls_reborn requiring
# RUBY_VERSION >= 2.5.
if RUBY_VERSION.start_with?("3.1.")
if ENV.key?("COVERALLS_REPO_TOKEN") && RUBY_VERSION.start_with?("3.1.")
require "coveralls"
Coveralls.wear!
end