From b2a2e7e23045a69d5dee8d2ff64a70d7718b15de Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2026 20:55:40 +0000 Subject: [PATCH] feat(stackdriver)!: Replace the stackdriver gem with a tombstone --- stackdriver/.gitignore | 9 - stackdriver/.repo-metadata.json | 8 - stackdriver/.rubocop.yml | 13 -- stackdriver/.toys.rb | 26 --- stackdriver/.yardopts | 12 +- stackdriver/CHANGELOG.md | 170 ---------------- stackdriver/CODE_OF_CONDUCT.md | 40 ---- stackdriver/CONTRIBUTING.md | 128 ------------ stackdriver/Gemfile | 22 -- stackdriver/INSTRUMENTATION_CONFIGURATION.md | 98 --------- stackdriver/LICENSE | 201 ------------------- stackdriver/LICENSE.md | 201 +++++++++++++++++++ stackdriver/OVERVIEW.md | 31 --- stackdriver/README.md | 147 +------------- stackdriver/Rakefile | 151 -------------- stackdriver/lib/stackdriver.rb | 61 ------ stackdriver/lib/stackdriver/version.rb | 7 +- stackdriver/stackdriver.gemspec | 35 ++-- stackdriver/test/helper.rb | 22 -- stackdriver/test/stackdriver/version_test.rb | 22 -- stackdriver/test/stackdriver_test.rb | 38 ---- 21 files changed, 229 insertions(+), 1213 deletions(-) delete mode 100644 stackdriver/.gitignore delete mode 100644 stackdriver/.repo-metadata.json delete mode 100644 stackdriver/.rubocop.yml delete mode 100644 stackdriver/.toys.rb delete mode 100644 stackdriver/CHANGELOG.md delete mode 100644 stackdriver/CODE_OF_CONDUCT.md delete mode 100644 stackdriver/CONTRIBUTING.md delete mode 100644 stackdriver/Gemfile delete mode 100644 stackdriver/INSTRUMENTATION_CONFIGURATION.md delete mode 100644 stackdriver/LICENSE create mode 100644 stackdriver/LICENSE.md delete mode 100644 stackdriver/OVERVIEW.md delete mode 100644 stackdriver/Rakefile delete mode 100644 stackdriver/lib/stackdriver.rb delete mode 100644 stackdriver/test/helper.rb delete mode 100644 stackdriver/test/stackdriver/version_test.rb delete mode 100644 stackdriver/test/stackdriver_test.rb diff --git a/stackdriver/.gitignore b/stackdriver/.gitignore deleted file mode 100644 index a4b33f9c5623..000000000000 --- a/stackdriver/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -Gemfile.lock -coverage/* -doc/* -pkg/* -html/* -jsondoc/* - -# Ignore YARD stuffs -.yardoc diff --git a/stackdriver/.repo-metadata.json b/stackdriver/.repo-metadata.json deleted file mode 100644 index 29b6958f7f4b..000000000000 --- a/stackdriver/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "stackdriver", - "language": "ruby", - "distribution_name": "stackdriver", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/stackdriver/latest", - "release_level": "preview", - "library_type": "INTEGRATION" -} diff --git a/stackdriver/.rubocop.yml b/stackdriver/.rubocop.yml deleted file mode 100644 index 2635685a3c95..000000000000 --- a/stackdriver/.rubocop.yml +++ /dev/null @@ -1,13 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "test/**/*" - -Documentation: - Enabled: false -Metrics/BlockLength: - Exclude: - - "Rakefile" - - "*.gemspec" diff --git a/stackdriver/.toys.rb b/stackdriver/.toys.rb deleted file mode 100644 index da8af3ecccb7..000000000000 --- a/stackdriver/.toys.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/stackdriver/.yardopts b/stackdriver/.yardopts index 658df40ad09d..1124c771ea5d 100644 --- a/stackdriver/.yardopts +++ b/stackdriver/.yardopts @@ -1,15 +1,9 @@ --no-private ---title=Stackdriver +--title="Obsolete Gem stackdriver" --markup markdown --markup-provider redcarpet ---exclude ./lib/legacy_stackdriver.rb ---main OVERVIEW.md ./lib/**/*.rb - -OVERVIEW.md -INSTRUMENTATION_CONFIGURATION.md -CONTRIBUTING.md -CHANGELOG.md -CODE_OF_CONDUCT.md -LICENSE +README.md +LICENSE.md diff --git a/stackdriver/CHANGELOG.md b/stackdriver/CHANGELOG.md deleted file mode 100644 index b18dc401bb2d..000000000000 --- a/stackdriver/CHANGELOG.md +++ /dev/null @@ -1,170 +0,0 @@ -# Release History - -### 0.24.0 (2026-03-31) - -#### Features - -* Upgrade dependencies for Ruby v4.0 and drop Ruby v3.1 support - -### 0.23.0 (2025-03-04) - -#### Features - -* Update minimum Ruby version to 3.0 ([#29261](https://github.com/googleapis/google-cloud-ruby/issues/29261)) - -### 0.22.0 (2024-03-07) - -#### Features - -* Update minimum supported Ruby version to 2.7 ([#25298](https://github.com/googleapis/google-cloud-ruby/issues/25298)) - -### 0.21.1 / 2021-05-18 - -#### Documentation - -* Remove Debugger description from the readmes - -### 0.21.0 / 2021-03-10 - -#### Features - -* Drop support for Ruby 2.4 and add support for Ruby 3.0 - -### 0.20.1 / 2020-12-02 - -#### Bug Fixes - -* Remove debugger references completely - -### 0.20.0 / 2020-12-02 - -* BREAKING CHANGE: Removed google-cloud-debugger from the standard suite of stackdriver agents. If you are using the debugger, include the google-cloud-debugger gem explicitly. -* Update to version 2.x of google-cloud-logging -* Update to version 0.41 of google-cloud-error_reporting -* Update to version 0.40 of google-cloud-trace - -### 0.16.1 / 2019-12-18 - -#### Documentation - -* update use_logging description - -### 0.16.0 / 2019-11-06 - -#### Other - -* Update Ruby dependency to minimum of 2.4 - -### 0.15.5 / 2019-08-23 - -#### Documentation - -* Update documentation - -### 0.15.4 / 2019-06-13 - -* Fix Logging example in INSTRUMENTATION_CONFIGURATION.md - -### 0.15.3 / 2018-09-20 - -* Update documentation. - * Change documentation URL to googleapis GitHub org. - -### 0.15.2 / 2018-09-12 - -* Add missing documentation files to package. - -### 0.15.1 / 2018-09-10 - -* Update documentation. - -### 0.15.0 / 2018-05-24 - -* Debugger 0.32.0 -* Trace 0.33.0 - -### 0.14.0 / 2018-02-27 - -* Debugger 0.31.0 - * Use Google Cloud Shared Configuration. - * Fix for mutation detection using Ruby 2.5. - * Support disabling mutation detection in debugger evaluation. -* Error Reporting 0.30.0 - * Use Google Cloud Shared Configuration. -* Logging 1.5.0 - * Use Google Cloud Shared Configuration. - * Deprecated Logging Sink attributes. -* Trace 0.31.0 - * Use Google Cloud Shared Configuration. - * Update authentication documentation. - -### 0.13.0 / 2017-12-19 - -* Trace 0.30.0 release. - -### 0.12.0 / 2017-12-19 - -* Debugger 0.30.0 release. -* Error Reporting 0.29.0 release. -* Logging 1.4.0 release. -* Trace 0.29.0 release. - -### 0.11.0 / 2017-11-14 - -* Debugger 0.29.0 release. -* Error Reporting 0.28.0 release. -* Logging 1.3.0 release. -* Trace 0.28.0 release. - -### 0.10.0 / 2017-09-08 - -* Error Reporting 0.27.0 release. - -### 0.9.0 / 2017-08-25 - -* Debugger 0.28.0 release. - -### 0.8.0 / 2017-08-07 - -* Debugger 0.27.0 release. -* Trace 0.27.0 release. - -### 0.7.0 / 2017-07-11 - -* Debugger 0.26.0 release. -* Error Reporting 0.26.0 release. -* Logging 1.2.0 release. -* Trace 0.26.0 release. - -### 0.6.0 / 2017-05-25 - -* Debugger 0.25.0 release. -* Error Reporting 0.25.0 release. -* Logging 1.1.0 release. -* Trace 0.25.0 release. -* Remove `google-cloud-monitoring` from this umbrella gem. - -### 0.5.0 / 2017-03-31 - -* Logging 1.0 release -* Updated dependencies on all other gems - -### 0.4.1 / 2017-02-27 - -* Set version constraints on the gem dependencies for individual stackdriver services. Current versions are: - * **google-cloud-logging** `~> 0.24.0` - * **google-cloud-error_reporting** `~> 0.23.1` - * **google-cloud-monitoring** `~> 0.23.0` - * **google-cloud-trace** `~> 0.23.0` - -### 0.4.0 / 2016-12-22 - -* Now provides Stackdriver Trace instrumentation by including google-cloud-trace. - -### 0.3.0 / 2016-11-07 - -This gem is an umbrella gem that serves as the single drop-in gem for users interested in using the Stackdriver services from their Ruby applications. - -The initial release of stackdriver gem includes the following Stackdriver gems to be used in Ruby applications: -* google-cloud-logging -* google-cloud-error_reporting diff --git a/stackdriver/CODE_OF_CONDUCT.md b/stackdriver/CODE_OF_CONDUCT.md deleted file mode 100644 index bc5a589ca9d7..000000000000 --- a/stackdriver/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,40 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, and in the interest of -fostering an open and welcoming community, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating -documentation, submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free -experience for everyone, regardless of level of experience, gender, gender -identity and expression, sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, such as physical or electronic - addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct. By adopting this Code of Conduct, project -maintainers commit themselves to fairly and consistently applying these -principles to every aspect of managing this project. Project maintainers who do -not follow or enforce the Code of Conduct may be permanently removed from the -project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by opening an issue or contacting one or more of the project -maintainers. - -This Code of Conduct is adapted from the [Contributor -Covenant](http://contributor-covenant.org), version 1.2.0, available at -[http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/stackdriver/CONTRIBUTING.md b/stackdriver/CONTRIBUTING.md deleted file mode 100644 index 36198136b5ed..000000000000 --- a/stackdriver/CONTRIBUTING.md +++ /dev/null @@ -1,128 +0,0 @@ -# Contributing to Google Cloud Stackdriver - -1. **Sign one of the contributor license agreements below.** -2. Fork the repo, develop and test your code changes. -3. Send a pull request. - -## Contributor License Agreements - -Before we can accept your pull requests you'll need to sign a Contributor -License Agreement (CLA): - -- **If you are an individual writing original source code** and **you own the - intellectual property**, then you'll need to sign an [individual - CLA](https://developers.google.com/open-source/cla/individual). -- **If you work for a company that wants to allow you to contribute your work**, - then you'll need to sign a [corporate - CLA](https://developers.google.com/open-source/cla/corporate). - -You can sign these electronically (just scroll to the bottom). After that, we'll -be able to accept your pull requests. - -## Setup - -In order to use the stackdriver console and run the project's tests, -there is a small amount of setup: - -1. Install Ruby. stackdriver requires Ruby 2.5+. You may choose to - manage your Ruby and gem installations with [RVM](https://rvm.io/), - [rbenv](https://github.com/rbenv/rbenv), or - [chruby](https://github.com/postmodern/chruby). - -2. Install [Bundler](http://bundler.io/). - - ```sh - $ gem install bundler - ``` - -3. Install the top-level project dependencies. - - ```sh - $ bundle install - ``` - -4. Install the Stackdriver dependencies. - - ```sh - $ cd stackdriver/ - $ bundle install - ``` - -## Stackdriver Tests - -Tests are very important part of stackdriver. All contributions -should include tests that ensure the contributed code behaves as expected. - -To run the unit tests, documentation tests, and code style checks together for a -package: - -``` sh -$ cd stackdriver/ -$ bundle exec rake ci -``` - -To run the command above, plus all acceptance tests, use `rake ci:acceptance` or -its handy alias, `rake ci:a`. - -### Stackdriver Unit Tests - - -The project uses the [minitest](https://github.com/seattlerb/minitest) library, -including [specs](https://github.com/seattlerb/minitest#specs), -[mocks](https://github.com/seattlerb/minitest#mocks) and -[minitest-autotest](https://github.com/seattlerb/minitest-autotest). - -To run the Stackdriver unit tests: - -``` sh -$ cd stackdriver/ -$ bundle exec rake test -``` - -### Stackdriver Documentation Tests - -The project tests the code examples in the gem's -[YARD](https://github.com/lsegal/yard)-based documentation. - -The example testing functions in a way that is very similar to unit testing, and -in fact the library providing it, -[yard-doctest](https://github.com/p0deje/yard-doctest), is based on the -project's unit test library, [minitest](https://github.com/seattlerb/minitest). - -To run the Stackdriver documentation tests: - -``` sh -$ cd stackdriver/ -$ bundle exec rake doctest -``` - -If you add, remove or modify documentation examples when working on a pull -request, you may need to update the setup for the tests. The stubs and mocks -required to run the tests are located in `support/doctest_helper.rb`. Please -note that much of the setup is matched by the title of the -[`@example`](http://www.rubydoc.info/gems/yard/file/docs/Tags.md#example) tag. -If you alter an example's title, you may encounter breaking tests. - -## Coding Style - -Please follow the established coding style in the library. The style is is -largely based on [The Ruby Style -Guide](https://github.com/bbatsov/ruby-style-guide) with a few exceptions based -on seattle-style: - -* Avoid parenthesis when possible, including in method definitions. -* Always use double quotes strings. ([Option - B](https://github.com/bbatsov/ruby-style-guide#strings)) - -You can check your code against these rules by running Rubocop like so: - -```sh -$ cd stackdriver/ -$ bundle exec rake rubocop -``` - -## Code of Conduct - -Please note that this project is released with a Contributor Code of Conduct. By -participating in this project you agree to abide by its terms. See -{file:CODE_OF_CONDUCT.md Code of Conduct} for more information. diff --git a/stackdriver/Gemfile b/stackdriver/Gemfile deleted file mode 100644 index ea7b428206df..000000000000 --- a/stackdriver/Gemfile +++ /dev/null @@ -1,22 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "autotest-suffix", "~> 1.1" -gem "google-cloud-core", path: "../google-cloud-core" -gem "google-cloud-error_reporting", path: "../google-cloud-error_reporting" -gem "google-cloud-errors", path: "../google-cloud-errors" -gem "google-cloud-logging", path: "../google-cloud-logging" -gem "google-cloud-trace", path: "../google-cloud-trace" -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.14" -gem "minitest-autotest", "~> 1.0" -gem "minitest-focus", "~> 1.1" -gem "minitest-rg", "~> 5.2" -gem "railties", ">= 5.0", "< 8.1.4" -gem "rake" -gem "redcarpet", "~> 3.0" -gem "simplecov", "~> 0.9" -gem "stackdriver-core", path: "../stackdriver-core" -gem "yard", "~> 0.9" -gem "yard-doctest", "~> 0.1.6" diff --git a/stackdriver/INSTRUMENTATION_CONFIGURATION.md b/stackdriver/INSTRUMENTATION_CONFIGURATION.md deleted file mode 100644 index b71b02979eae..000000000000 --- a/stackdriver/INSTRUMENTATION_CONFIGURATION.md +++ /dev/null @@ -1,98 +0,0 @@ -# Stackdriver Instrumentation Configuration - -Stackdriver instrumentation libraries are fully integrated with Rails -configuration interface. You can provide all the configuration parameters in -your `config/environments/*.rb` files: - -```ruby -Rails.application.configure do |config| - # Shared project_id and keyfile - config.google_cloud.project_id = "my-project" - config.google_cloud.keyfile = "/path/to/key.json" - - # Library specific configurations - config.google_cloud.error_reporting.project_id = "error-reporting-project" - config.google_cloud.logging.log_name = "my-app-logname" - config.google_cloud.trace.capture_stack = true -end -``` - -Other Rack-based applications can also configure all the Stackdriver -instrumentation libraries through a similar configuration interface in Ruby: - -```ruby -Google::Cloud.configure do |config| - # Shared project_id and keyfile - config.project_id = "my-project" - config.keyfile = "/path/to/key.json" - - # Library specific configurations - config.error_reporting.project_id = "error-reporting-project" - config.logging.log_name = "my-app-log" - config.trace.capture_stack = true -end -``` - -Individual libraries can be configured separately: - -```ruby -# Error Reporting specific configurations -Google::Cloud::ErrorReporting.configure do |config| - config.project_id = "error-reporting-project" - config.service_name = "my-service" -end - -# Logging specific configurations -Google::Cloud::Logging.configure do |config| - config.project_id = "error-reporting-project" - config.log_name = "my-app-log" - config.labels = { - "my-static-label" => "static-label-value", - "my-dynamic-label" => ->(rack_env) { rack_env["HTTP_X_MY_HEADER"] } - } -end - -# Trace specific configurations -Google::Cloud::Trace.configure do |config| - config.project_id = "error-reporting-project" - config.capture_stack = true -end -``` - -## Configuration Options - -#### Shared - -* `project_id`: [`String`] Shared Google Cloud Platform Project identifier. Self discovered on GCP. -* `credentials`: [`String`] Path to shared service account JSON keyfile. Self discovered on GCP. -* `use_error_reporting`: [`Boolean`] Explicitly enable or disable Error Reporting features. Default: `Rails.env.production?` -* `use_logging`: [`Boolean`] Explicitly enable or disable Logging middleware. Default: `Rails.env.production?` -* `use_trace`: [`Boolean`] Explicitly enable or disable Trace features. Default: `Rails.env.production?` - -#### Error Reporting - -* `error_reporting.project_id`: [`String`] Google Cloud Platform Project identifier just for Error Reporting. Self discovered on GCP. -* `error_reporting.credentials`: [`String`] Path to service account JSON keyfile. Self discovered on GCP. -* `error_reporting.service_name`: [`String`] Identifier to running service. Self discovered on GCP. Default: `"ruby"` -* `error_reporting.service_version`: [`String`] Version identifier to running service. Self discovered on GCP. -* `error_reporting.ignore_classes`: [`Array`] An Array of Exception classes to ignore. Default: `[]` - -#### Logging - -* `logging.project_id`: [`String`] Google Cloud Platform Project identifier just for Logging. Self discovered on GCP. -* `logging.credentials`: [`String`] Path to service account JSON keyfile. Self discovered on GCP. -* `logging.log_name`: [`String`] Name of the application log file. Default: `"ruby_app_log"` -* `logging.log_name_map`: [`Hash`] Map specific request routes to other log. Default: `{ "/_ah/health" => "ruby_health_check_log" }` -* `logging.monitored_resource.type`: [`String`] Resource type name. See [full list](https://cloud.google.com/logging/docs/api/v2/resource-list). Self discovered on GCP. -* `logging.monitored_resource.labels`: [`Hash`] Resource labels. See [full list](https://cloud.google.com/logging/docs/api/v2/resource-list). Self discovered on GCP. -* `logging.labels`: [`Hash`] User defined labels. A `Hash` of label names to string label values or callables/`Proc` which are functions of the Rack environment. - -#### Trace - -* `trace.project_id`: [`String`] Google Cloud Platform Project identifier just for Trace. Self discovered on GCP. -* `trace.credentials`: [`String`] Path to service account JSON keyfile. Self discovered on GCP. -* `trace.capture_stack`: [`Boolean`] Whether to capture stack traces for each span. Default: `false` -* `trace.sampler`: [`Proc`] A sampler Proc makes the decision whether to record a trace for each request. Default: `Google::Cloud::Trace::TimeSampler` -* `trace.span_id_generator`: [`Proc`] A generator Proc that generates the name String for new TraceRecord. Default: `random numbers` -* `trace.notifications`: [`Array`] An array of ActiveSupport notification types to include in traces. Rails-only option. Default: `Google::Cloud::Trace::Railtie::DEFAULT_NOTIFICATIONS` -* `trace.max_data_length`: [`Integer`] The maximum length of span properties recorded with ActiveSupport notification events. Rails-only option. Default: `Google::Cloud::Trace::Notifications::DEFAULT_MAX_DATA_LENGTH` diff --git a/stackdriver/LICENSE b/stackdriver/LICENSE deleted file mode 100644 index 20e4bd85661f..000000000000 --- a/stackdriver/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/stackdriver/LICENSE.md b/stackdriver/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/stackdriver/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/stackdriver/OVERVIEW.md b/stackdriver/OVERVIEW.md deleted file mode 100644 index b37920f67b0d..000000000000 --- a/stackdriver/OVERVIEW.md +++ /dev/null @@ -1,31 +0,0 @@ -# Stackdriver - -The stackdriver gem instruments a Ruby web application for Stackdriver -diagnostics. When loaded, it integrates with Rails, Sinatra, or other Rack-based -web frameworks to collect application diagnostic and monitoring information for -your application. - -Specifically, this gem is a convenience package that loads the following gems: - -- [google-cloud-debugger](https://googleapis.dev/ruby/google-cloud-debugger/latest -- [google-cloud-error_reporting](https://googleapis.dev/ruby/google-cloud-error_reporting/latest -- [google-cloud-logging](https://googleapis.dev/ruby/google-cloud-logging/latest -- [google-cloud-trace](https://googleapis.dev/ruby/google-cloud-trace/latest - -On top of that, stackdriver gem automatically activates the following -instrumentation features: - -- [google-cloud-debugger instrumentation](https://googleapis.dev/ruby/google-cloud-debugger/latest/file.INSTRUMENTATION.html -- [google-cloud-error_reporting strumentation](https://googleapis.dev/ruby/google-cloud-error_reporting/latest/file.INSTRUMENTATION.html -- [google-cloud-logging instrumentation](https://googleapis.dev/ruby/google-cloud-logging/latest/file.INSTRUMENTATION.html -- [google-cloud-trace instrumentation](https://googleapis.dev/ruby/google-cloud-trace/latest/file.INSTRUMENTATION.html - -## Usage - -Instead of requiring multiple Stackdriver client library gems and explicitly -load each built-in Railtie classes, now users can achieve all these through -requiring this single **stackdriver** umbrella gem. - -```ruby -require "stackdriver" -``` diff --git a/stackdriver/README.md b/stackdriver/README.md index db5580637482..1edf801f580d 100644 --- a/stackdriver/README.md +++ b/stackdriver/README.md @@ -1,145 +1,4 @@ -# stackdriver +# Tombstone for Ruby gem stackdriver -This gem instruments a Ruby web application for Stackdriver diagnostics. When -loaded, it integrates with Rails, Sinatra, or other Rack-based web frameworks -to collect application diagnostic and monitoring information for your -application. - -Specifically, this gem is a convenience package that loads and automatically -activates the instrumentation features of the following gems: - -* [google-cloud-error_reporting](https://googleapis.dev/ruby/google-cloud-error_reporting/latest) which - reports unhandled exceptions and other errors to - [Stackdriver Error Reporting](https://cloud.google.com/error-reporting/) -* [google-cloud-logging](https://googleapis.dev/ruby/google-cloud-logging/latest) which collects application - logs in [Stackdriver logging](https://cloud.google.com/logging/) -* [google-cloud-trace](https://googleapis.dev/ruby/google-cloud-trace/latest) which reports distributed - latency traces to [Stackdriver Trace](https://cloud.google.com/trace/) - -## Quick Start - -### Install the gem - -Add the `stackdriver` gem to your Gemfile: - -```ruby -gem "stackdriver" -``` - -### Instrument your code - -#### Using Ruby on Rails - -If you are running Ruby on Rails, the `stackdriver` gem will automatically -install Railties that will instrument your application for basic diagnostics. -In most applications, the gem will initialize itself, and you will not need to -write any additional code. - -If your Rails application has removed the `Bundler.require` line in the -`application.rb` initialization file, then you might need to require the gem -explicitly with: - -```ruby -# In application.rb -require "stackdriver" -``` - -#### Other Rack-based frameworks - -If you are running another Rack-based framework, such as Sinatra, you should -install the Rack Middleware provided by each library you want to use: - -```ruby -# In your Rack middleware configuration code. -require "stackdriver" -use Google::Cloud::Logging::Middleware -use Google::Cloud::ErrorReporting::Middleware -use Google::Cloud::Trace::Middleware -``` - -#### Advanced instrumentation - -See the individual gem documentation for each gem for information on how to -customize the instrumentation, e.g. how to manually report errors or add custom -spans to latency traces. - -### Viewing diagnostic reports - -Logs, errors, traces, and other reports can be viewed on the Google Cloud -Console. If your app is hosted on Google Cloud (such as on Google App Engine, -Google Kubernetes Engine, or Google Compute Engine), you can use the same -project. Otherwise, if your application is hosted elsewhere, create a new -project on [Google Cloud](https://console.cloud.google.com/). - -Make sure the [Stackdriver Error Reporting -API](https://console.cloud.google.com/apis/library/clouderrorreporting.googleapis.com) -is enabled on your Google Cloud project. (The other service APIs---debugging, -logging, and tracing---are enabled by default on all new projects.) - -#### Authentication - -Your app also needs to authenticate with the Stackdriver services in order to -send data. - -* If you are running on **Google App Engine**, authentication happens - automatically. You do not need to do anything. -* If you are running on **Google Kubernetes Engine**, you must explicitly add - `https://www.googleapis.com/auth/cloud-platform` to the API access scopes - when creating the cluster. Authentication will then happen automatically. -* If you are running on **Google Compute Engine**, you must explicitly add - `https://www.googleapis.com/auth/cloud-platform` to the API access scopes - when creating the VM. Authentication will then happen automatically. -* If you are not running on a Google Cloud hosting environment, you must set - up a service account, and provide the Stackdriver library with the ID of - your Google Cloud project, and the service account credentials. - - ```ruby - # In your app initialization code - Google::Cloud.configure do |config| - config.project_id = "your-project-id" - config.credentials = "/path/to/servce-account-keyfile.json" - end - ``` - -See the gem documentation for each individual gem for more information. - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -This library follows [Semantic Versioning](http://semver.org/). It is currently -in major version zero (0.y.z), which means that anything may change at any time -and the public API should not be considered stable. - -## Contributing - -Contributions to this library are always welcome and highly encouraged. - -See the [Contributing -Guide](https://googleapis.dev/ruby/stackdriver/latest/file.CONTRIBUTING.html) -for more information on how to get started. - -Please note that this project is released with a Contributor Code of Conduct. By -participating in this project you agree to abide by its terms. See [Code of -Conduct](https://googleapis.dev/ruby/stackdriver/latest/file.CODE_OF_CONDUCT.html) -for more information. - -## License - -This library is licensed under Apache 2.0. Full license text is available in -[LICENSE](LICENSE). - -## Support - -Please [report bugs at the project on -Github](https://github.com/googleapis/google-cloud-ruby/issues). Don't -hesitate to [ask -questions](http://stackoverflow.com/questions/tagged/google-cloud-ruby) about -the client or APIs on [StackOverflow](http://stackoverflow.com). +This gem is obsolete because the related Google backend is turned down. +For more information, see https://cloud.google.com/terms/deprecation. diff --git a/stackdriver/Rakefile b/stackdriver/Rakefile deleted file mode 100644 index d4a0dd457462..000000000000 --- a/stackdriver/Rakefile +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 2016 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -namespace :test do - desc "Run tests with coverage." - task :coverage do - require "simplecov" - SimpleCov.start do - command_name "stackdriver" - track_files "lib/**/*.rb" - add_filter "test/" - end - - Rake::Task[:test].invoke - end -end - -desc "Run acceptance tests." -task :acceptance do - puts "The stackdriver gem does not have acceptance tests." -end - -namespace :acceptance do - task :run do - puts "This gem does not have acceptance tests." - end - - desc "Run acceptance cleanup." - task :cleanup do - # Do nothing - end -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The stackdriver gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The stackdriver gem has no samples to test." - end - end -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The stackdriver gem does not have doctest tests." -end - -desc "Start an interactive shell." -task :console do - require "irb" - require "irb/completion" - - $LOAD_PATH.unshift "lib" - - require "google/cloud" - Bundler.require # load all the gems defined in the Gemfile - def gcloud - @gcloud ||= Google::Cloud.new - end - - ARGV.clear - IRB.start -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run the CI build" -task :ci do - header "stackdriver rubocop", "*" - Rake::Task[:rubocop].invoke - header "stackdriver yard", "*" - Rake::Task[:yard].invoke - header "stackdriver doctest", "*" - Rake::Task[:doctest].invoke - header "stackdriver test", "*" - Rake::Task[:test].invoke -end -namespace :ci do - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "stackdriver acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/stackdriver/lib/stackdriver.rb b/stackdriver/lib/stackdriver.rb deleted file mode 100644 index e2493e615a91..000000000000 --- a/stackdriver/lib/stackdriver.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2016 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -gem "google-cloud-error_reporting" -gem "google-cloud-logging" -gem "google-cloud-trace" - -require "google/cloud/error_reporting" -require "google/cloud/logging" -require "google/cloud/trace" - -if defined? ::Rails::Railtie - require "google/cloud/error_reporting/rails" - require "google/cloud/logging/rails" - require "google/cloud/trace/rails" -end - -## -# # Stackdriver -# -# The stackdriver gem instruments a Ruby web application for Stackdriver -# diagnostics. When loaded, it integrates with Rails, Sinatra, or other -# Rack-based web frameworks to collect application diagnostic and monitoring -# information for your application. -# -# Specifically, this gem is a convenience package that loads the following gems: -# -# - [google-cloud-debugger](https://googleapis.dev/ruby/google-cloud-debugger/latest) -# - [google-cloud-error_reporting](https://googleapis.dev/ruby/google-cloud-error_reporting/latest) -# - [google-cloud-logging](https://googleapis.dev/ruby/google-cloud-logging/latest) -# - [google-cloud-trace](https://googleapis.dev/ruby/google-cloud-trace/latest) -# -# On top of that, stackdriver gem automatically activates the following -# instrumentation features: -# -# - [google-cloud-debugger instrumentation](https://googleapis.dev/ruby/google-cloud-debugger/latest/file.INSTRUMENTATION.html) -# - [google-cloud-error_reporting instrumentation](https://googleapis.dev/ruby/google-cloud-error_reporting/latest/file.INSTRUMENTATION.html) -# - [google-cloud-logging instrumentation](https://googleapis.dev/ruby/google-cloud-logging/latest/file.INSTRUMENTATION.html) -# - [google-cloud-trace instrumentation](https://googleapis.dev/ruby/google-cloud-trace/latest/file.INSTRUMENTATION.html) -# -# ## Usage -# -# Instead of requiring multiple Stackdriver client library gems and explicitly -# load each built-in Railtie classes, now users can achieve all these through -# requiring this single **stackdriver** umbrella gem. -# @example -# require "stackdriver" -module Stackdriver -end diff --git a/stackdriver/lib/stackdriver/version.rb b/stackdriver/lib/stackdriver/version.rb index 6112f554ac6d..8a97ea19c93e 100644 --- a/stackdriver/lib/stackdriver/version.rb +++ b/stackdriver/lib/stackdriver/version.rb @@ -1,10 +1,10 @@ -# Copyright 2016 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# https://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - module Stackdriver - VERSION = "0.24.0".freeze + VERSION = "1.0.0" end diff --git a/stackdriver/stackdriver.gemspec b/stackdriver/stackdriver.gemspec index 1f2d1232fb97..dfdde04b1e1b 100644 --- a/stackdriver/stackdriver.gemspec +++ b/stackdriver/stackdriver.gemspec @@ -1,24 +1,27 @@ require File.expand_path("lib/stackdriver/version", __dir__) Gem::Specification.new do |gem| - gem.name = "stackdriver" - gem.version = Stackdriver::VERSION + gem.name = "stackdriver" + gem.version = Stackdriver::VERSION + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = + "This gem is obsolete because the related Google backend is turned down. " \ + "For more information, see https://cloud.google.com/terms/deprecation." + gem.summary = "This gem is obsolete because the related backend is turned down." + gem.post_install_message = <<~MESSAGE - gem.authors = ["Heng Xiong"] - gem.email = ["hxiong388@gmail.com"] - gem.description = "stackdriver is the official library for Google Stackdriver APIs." - gem.summary = "API Client library for Google Stackdriver" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby/tree/master/stackdriver" - gem.license = "Apache-2.0" + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + The stackdriver gem is OBSOLETE. + For more information, see: + https://cloud.google.com/terms/deprecation + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - gem.files = `git ls-files -- lib/*`.split("\n") + - ["OVERVIEW.md", "INSTRUMENTATION_CONFIGURATION.md", "CONTRIBUTING.md", "CHANGELOG.md", - "CODE_OF_CONDUCT.md", "LICENSE", ".yardopts"] + MESSAGE + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + gem.platform = Gem::Platform::RUBY + gem.files = ["README.md", "LICENSE.md", ".yardopts", "lib/stackdriver/version.rb"] gem.require_paths = ["lib"] - gem.required_ruby_version = ">= 3.0" - - gem.add_runtime_dependency "google-cloud-error_reporting", "~> 0.41" - gem.add_runtime_dependency "google-cloud-logging", "~> 2.1" - gem.add_runtime_dependency "google-cloud-trace", "~> 0.40" end diff --git a/stackdriver/test/helper.rb b/stackdriver/test/helper.rb deleted file mode 100644 index e45ed65121c1..000000000000 --- a/stackdriver/test/helper.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2016 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require "simplecov" - -gem "minitest" -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" -require "rails/railtie" -require "stackdriver" diff --git a/stackdriver/test/stackdriver/version_test.rb b/stackdriver/test/stackdriver/version_test.rb deleted file mode 100644 index 4841b3b53377..000000000000 --- a/stackdriver/test/stackdriver/version_test.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2016 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require "helper" -require "stackdriver/version" - -describe Stackdriver do - it "has a version" do - _(Stackdriver::VERSION).wont_be_nil - end -end diff --git a/stackdriver/test/stackdriver_test.rb b/stackdriver/test/stackdriver_test.rb deleted file mode 100644 index 17b5b279acf3..000000000000 --- a/stackdriver/test/stackdriver_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2016 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -require "helper" - -describe Stackdriver do - it "requires google-cloud-error_reporting" do - _(defined?(Google::Cloud::ErrorReporting)).wont_be_nil - end - - it "requires google-cloud-logging" do - _(defined?(Google::Cloud::Logging)).wont_be_nil - end - - it "requires google-cloud-error_reporting rails module" do - _(defined?(Google::Cloud::ErrorReporting::Railtie)).wont_be_nil - end - - it "requires google-cloud-logging rails module" do - _(defined?(Google::Cloud::Logging::Railtie)).wont_be_nil - end - - it "requires google-cloud-trace rails module" do - _(defined?(Google::Cloud::Trace::Railtie)).wont_be_nil - end -end