-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add references to released logs gems * Test Rails 7.0 - 8.0 * Rubocop * Set gem version
- Loading branch information
1 parent
0f3df26
commit c9f47c6
Showing
13 changed files
with
37 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
# # Copyright The OpenTelemetry Authors | ||
# # | ||
# # SPDX-License-Identifier: Apache-2.0 | ||
|
||
# # TOOD: Re-enable before release, along with active_support_logger tests | ||
# # Appraisals wont work with gems installed by a branch, so we can't | ||
# # set this up until there's a release of the otel logs gems | ||
# # Only test Rails versions that are still in support | ||
|
||
# appraise 'rails-7.0' do | ||
# gem 'rails', '~> 7.0.0' | ||
# end | ||
|
||
# appraise 'rails-7.1' do | ||
# gem 'rails', '~> 7.1.0' | ||
# end | ||
|
||
# appraise 'rails-7.2' do | ||
# gem 'rails', '~> 7.2.0' | ||
# end | ||
# Copyright The OpenTelemetry Authors | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
%w[7.0.0 7.1.0].each do |version| | ||
appraise "rails-#{version}" do | ||
gem 'rails', "~> #{version}" | ||
end | ||
end | ||
|
||
appraise 'rails-latest' do | ||
gem 'rails' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
# frozen_string_literal: true | ||
# TODO: Test me once the logs API/SDK gems have been released | ||
# Since the gems aren't released, this is broken atm | ||
|
||
require 'bundler/inline' | ||
|
||
gemfile(true) do | ||
source 'https://rubygems.org' | ||
|
||
gem 'logger' | ||
gem 'opentelemetry-sdk' | ||
gem 'opentelemetry-logs-api' | ||
gem 'opentelemetry-logs-sdk' | ||
gem 'opentelemetry-instrumentation-logger', path: '../' | ||
end | ||
|
||
require 'opentelemetry/sdk' | ||
require 'opentelemetry-logs-sdk' | ||
require 'opentelemetry-instrumentation-logger' | ||
require 'logger' | ||
|
||
# Don't attempt to export traces, Logger instrumentation only emits logs. | ||
ENV['OTEL_TRACES_EXPORTER'] ||= 'none' | ||
ENV['OTEL_LOGS_EXPORTER'] ||= 'console' | ||
|
||
OpenTelemetry::SDK.configure do |c| | ||
c.use OpenTelemetry::Instrumentation::Logger | ||
c.use 'OpenTelemetry::Instrumentation::Logger' | ||
end | ||
|
||
at_exit do | ||
OpenTelemetry.logger_provider.shutdown | ||
end | ||
|
||
logger = Logger.new | ||
logger = Logger.new(STDOUT) | ||
logger.debug('emerald ash borer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters