middleware_apm_linux 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c3d4692277493b4553cb6bca5cb1bf4500fb7b986d4633081c835e4f95562441
4
+ data.tar.gz: 341da1a1d20fd6c64b0545ba16b0e280dd71cb401ca02f833e99e0ae8ada4334
5
+ SHA512:
6
+ metadata.gz: a23e501c68c393db545ba126702d694acc0d31519ffb769101cc5b1e4e475445008723ebd429e78c305043ef9f93be04693bfdf3edb844de7906cc2226a28e5e
7
+ data.tar.gz: d00fa6943725dd27d46f1a6bf98b881b3ae3cf0636238bc7c9700d6b2af41d7c8ea7f2c1bc9696a2d0805c11cee277d49e3a854ecb21ac05a432ba5fb2b3ab13
@@ -0,0 +1,75 @@
1
+ name: Build and Checks of Gem Package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ - '!master'
8
+
9
+ jobs:
10
+ build_and_checks_for_linux:
11
+ name: Build for Linux Environment
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout Repository
15
+ uses: actions/checkout@v2
16
+
17
+ - name: Set Up Ruby
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: 3.0
21
+
22
+ - name: Install Dependencies
23
+ run: |
24
+ gem install bundler
25
+ bundle install
26
+
27
+ - name: Build Gem Package
28
+ run: |
29
+ gem build middleware_rubygem.gemspec
30
+
31
+ build_and_checks_for_windows:
32
+ name: Build for Windows Environment
33
+ runs-on: windows-latest
34
+ steps:
35
+ - name: Checkout Repository
36
+ uses: actions/checkout@v2
37
+
38
+ - name: Set Up Ruby
39
+ uses: actions/setup-ruby@v1
40
+ with:
41
+ ruby-version: 3.0
42
+
43
+ - name: Install Dependencies
44
+ run: |
45
+ gem install bundler
46
+ bundle install
47
+
48
+ - name: Build Gem Package
49
+ run: |
50
+ gem build middleware_rubygem.gemspec
51
+
52
+ check-version-change:
53
+ name: Check for Version Change
54
+ runs-on: ubuntu-latest
55
+ needs:
56
+ - build_and_checks_for_linux
57
+ - build_and_checks_for_windows
58
+ steps:
59
+ - name: Checkout Repository
60
+ uses: actions/checkout@v2
61
+
62
+ - name: Check for Version Change
63
+ id: version_check
64
+ run: |
65
+ # Get the latest version from the main branch
66
+ LATEST_VERSION=$(git fetch origin master && git show origin/master:lib/middleware/ruby_gem/version.rb | grep 'VERSION =' | awk '{print $3}' | tr -d '"')
67
+
68
+ # Get the current version from the current commit
69
+ NEW_VERSION=$(git show HEAD:lib/middleware/ruby_gem/version.rb | grep 'VERSION =' | awk '{print $3}' | tr -d '"')
70
+
71
+ if [ "$LATEST_VERSION" != "$NEW_VERSION" ]; then
72
+ echo "Version changed from $LATEST_VERSION to $NEW_VERSION"
73
+ else
74
+ echo "::warning file=version.rb::Version remains unchanged"
75
+ fi
@@ -0,0 +1,106 @@
1
+ name: Release Gem Package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ release_gem_linux:
10
+ name: Release Gem for Linux
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout Repository
14
+ uses: actions/checkout@v2
15
+
16
+ - name: Set Up Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: 3.0
20
+
21
+ - name: Install Dependencies
22
+ run: |
23
+ gem install bundler
24
+ bundle install
25
+
26
+ - name: Build Gem Package
27
+ run: |
28
+ gem build middleware_rubygem.gemspec
29
+
30
+ - name: Publish Gem Package
31
+ env:
32
+ GEM_HOST_API_KEY: ${{ secrets.RUBY_GEMS_API_KEY }}
33
+ run: |
34
+ mkdir -p $HOME/.gem
35
+ touch $HOME/.gem/credentials
36
+ chmod 0600 $HOME/.gem/credentials
37
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
38
+ gem build *.gemspec
39
+ gem push *.gem
40
+
41
+ release_gem_windows:
42
+ name: Release Gem for Windows
43
+ runs-on: windows-latest
44
+
45
+ steps:
46
+ - name: Checkout Repository
47
+ uses: actions/checkout@v2
48
+
49
+ - name: Set Up Ruby
50
+ uses: actions/setup-ruby@v1
51
+ with:
52
+ ruby-version: 3.0
53
+
54
+ - name: Install Dependencies
55
+ shell: bash
56
+ run: |
57
+ gem install bundler
58
+ bundle install
59
+
60
+ - name: Build Gem Package
61
+ shell: bash
62
+ run: |
63
+ gem build middleware_rubygem.gemspec
64
+
65
+ - name: Publish Gem Package
66
+ shell: bash
67
+ env:
68
+ GEM_HOST_API_KEY: ${{ secrets.RUBY_GEMS_API_KEY }}
69
+ run: |
70
+ mkdir -p $HOME/.gem
71
+ touch $HOME/.gem/credentials
72
+ chmod 0600 $HOME/.gem/credentials
73
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
74
+ gem build *.gemspec
75
+ gem push *.gem
76
+
77
+ create_release:
78
+ name: Release the latest release
79
+ runs-on: ubuntu-latest
80
+ needs:
81
+ - release_gem_linux
82
+ - release_gem_windows
83
+ steps:
84
+ - name: Checkout Repository
85
+ uses: actions/checkout@v2
86
+
87
+ - name: Get the new Version
88
+ id: get_new_version
89
+ shell: bash
90
+ run: |
91
+ # Extract the new version from the commit
92
+ NEW_VERSION=$(git show HEAD:lib/middleware/ruby_gem/version.rb | grep 'VERSION =' | awk '{print $3}' | tr -d '"')
93
+ echo "::set-output name=version::$NEW_VERSION"
94
+
95
+ - name: Create Release
96
+ id: create_release
97
+ uses: actions/create-release@v1
98
+ env:
99
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100
+ with:
101
+ tag_name: v${{ steps.get_new_version.outputs.version }}
102
+ release_name: Release ${{ steps.get_new_version.outputs.version }}
103
+ body: |
104
+ Release ${{ steps.get_new_version.outputs.version }}
105
+ draft: false
106
+ prerelease: false
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ /**.gem
11
+ .idea
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-08-24
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders 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, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at parth@middleware.io. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
6
+
7
+ gem "rake", "~> 13.0"
8
+
9
+ gem "minitest", "~> 5.0"
10
+
11
+ gem 'opentelemetry-sdk'
12
+ gem 'opentelemetry-exporter-otlp'
13
+ gem 'opentelemetry-instrumentation-all'
14
+ gem "uri"
15
+ gem "net"
16
+
17
+ platforms :ruby do
18
+ gem "rubocop", "~> 1.7"
19
+ gem "pyroscope", "~> 0.5.10"
20
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 parth-dadhaniya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # Middleware::RubyGem
2
+
3
+ ---
4
+
5
+ ## Installation Steps
6
+
7
+ ### Build and Install Native Gem
8
+
9
+ - Clone the repository and navigate to the root directory of repository
10
+
11
+ - Install all the required gems
12
+ ```bash
13
+ bundle install
14
+ ```
15
+
16
+ - Build the native gem
17
+ ```bash
18
+ gem build
19
+ ```
20
+
21
+ - Install native gem
22
+ ```bash
23
+ gem install middleware_apm_*.gem
24
+ ```
25
+
26
+ ### Usage gem in ruby application
27
+
28
+ - Add the gem to Gemfile
29
+ ```ruby
30
+ # If the application is running in Linux environment
31
+ gem "middleware_apm_linux"
32
+
33
+ # If the application is running in Windows environment
34
+ gem "middleware_apm_windows"
35
+ ```
36
+
37
+ - Add below code at initialization of your application
38
+ ```ruby
39
+ # If the application is running in Linux environment
40
+ require 'middleware/ruby_gem_linux'
41
+
42
+ # If the application is running in Windows environment
43
+ require 'middleware/ruby_gem_windows'
44
+
45
+ Middleware::RubyGem.init
46
+ ```
47
+
48
+ - Set below listed environment variables
49
+
50
+ | Environment Variable Name | Sample Value | Is required | Description |
51
+ |-----------------------------|----------------------------------|----------------------------------------|--------------------------------------|
52
+ | OTEL_EXPORTER_OTLP_ENDPOINT | http://localhost:9320 | Yes | Endpoint to send the collected data. |
53
+ | OTEL_SERVICE_NAME | Demo Service Name | No | Your Service Name. |
54
+ | OTEL_RESOURCE_ATTRIBUTES | project.name="Demo Project Name" | No | Your Project Name. |
55
+ | MW_API_KEY | {Your API Key} | If Linux then Yes / If windows then No | It is used for profiling. |
56
+
57
+
58
+ - Run your application
59
+ - Example: If its a ruby-on-rails application
60
+ ```bash
61
+ rails server
62
+ ```
63
+
64
+ #### Note: Profiling is not supported for windows application.
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "middleware/ruby_gem"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../logger'
4
+
5
+ require "uri"
6
+ require "net/http"
7
+ require 'json'
8
+ require "logger"
9
+
10
+
11
+ module Middleware
12
+ module RubyGem
13
+ module Auth
14
+
15
+ class Authentication
16
+
17
+ @response = nil
18
+
19
+ def get_response
20
+ @response
21
+ end
22
+ def auth
23
+ mw_api_key = ENV["MW_API_KEY"]
24
+ if mw_api_key == nil
25
+ MwLogger.warn("Profiling is not initialized as MW_API_KEY is not provided")
26
+ return false
27
+ end
28
+
29
+ url = URI(ENV["MW_AUTH_URL"] || "https://app.middleware.io/api/v1/auth")
30
+
31
+ https = Net::HTTP.new(url.host, url.port)
32
+ https.use_ssl = true
33
+
34
+ request = Net::HTTP::Post.new(url)
35
+ request["Content-Type"] = "application/x-www-form-urlencoded"
36
+ request["Authorization"] = "Bearer #{mw_api_key}"
37
+
38
+ response = https.request(request)
39
+
40
+ body = JSON.parse(response.body)
41
+ success_value = body['success']
42
+
43
+ if success_value
44
+ @response = body
45
+ else
46
+ MwLogger.warn("Profiling is not initialized as authentication is failed")
47
+ end
48
+
49
+ success_value
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'logger'
4
+
5
+ module Middleware
6
+ module RubyGem
7
+
8
+ class MwLogger
9
+
10
+ @@logger = Logger.new(STDOUT)
11
+
12
+ def self.debug(message)
13
+ @@logger.debug(message)
14
+ end
15
+
16
+ def self.error(message)
17
+ @@logger.error(message)
18
+ end
19
+
20
+ def self.info(message)
21
+ @@logger.info(message)
22
+ end
23
+
24
+ def self.warn(message)
25
+ @@logger.warn(message)
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'opentelemetry/sdk'
4
+ require 'opentelemetry/sdk/resources/resource'
5
+
6
+ module Middleware
7
+ module RubyGem
8
+ module Otel
9
+
10
+ class Config
11
+
12
+ def self.init
13
+ OpenTelemetry::SDK.configure do |c|
14
+ c.resource=OpenTelemetry::SDK::Resources::Resource.create(
15
+ 'mw.app.lang' => 'ruby'
16
+ )
17
+ c.use_all
18
+ end
19
+ end
20
+
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../auth/authentication'
4
+ require_relative '../logger'
5
+ require "pyroscope"
6
+
7
+ module Middleware
8
+ module RubyGem
9
+ module Profile
10
+
11
+ class PyroscopeProfile
12
+
13
+ def self.init
14
+ authentication = Auth::Authentication.new
15
+ return unless authentication.auth
16
+
17
+ Pyroscope.configure do |config|
18
+ config.application_name = ENV["OTEL_SERVICE_NAME"] || "default-service-name"
19
+ config.server_address = ENV["MW_PROFILING_SERVER_URL"] || "https://profiling.middleware.io"
20
+ config.tenant_id = authentication.get_response['data']['account']
21
+ end
22
+
23
+ MwLogger.info("Profiling started")
24
+ end
25
+
26
+ end
27
+
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Middleware
4
+ module RubyGem
5
+ VERSION = "1.0.0"
6
+ end
7
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ruby_gem/version"
4
+ require_relative 'otel/config'
5
+ require_relative 'profile/pyroscope_profile'
6
+
7
+ module Middleware
8
+ module RubyGem
9
+ class Error < StandardError; end
10
+
11
+ def self.init
12
+ Otel::Config.init
13
+ Profile::PyroscopeProfile.init
14
+ end
15
+
16
+ end
17
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/middleware/ruby_gem/version"
4
+
5
+ excluded_files = []
6
+ os = ""
7
+
8
+ if RUBY_PLATFORM =~ /mswin|mingw/
9
+ excluded_files.push(
10
+ 'lib/middleware/auth/',
11
+ 'lib/middleware/profile/',
12
+ 'lib/middleware/ruby_gem_linux.rb',
13
+ 'middleware_rubygem_linux.gemspec'
14
+ )
15
+ os = "windows"
16
+ elsif RUBY_PLATFORM =~ /linux/
17
+ excluded_files.push(
18
+ 'lib/middleware/ruby_gem_windows.rb',
19
+ 'middleware_rubygem_windows.gemspec'
20
+ )
21
+ os = "linux"
22
+ else
23
+ raise "$#{RUBY_PLATFORM} is not supported"
24
+ end
25
+
26
+ Gem::Specification.new do |spec|
27
+ spec.name = "middleware_apm_" + os
28
+ spec.version = Middleware::RubyGem::VERSION
29
+ spec.authors = ["middleware-dev"]
30
+ spec.email = ["dev@middleware.io"]
31
+
32
+ spec.summary = "APM is a practice and set of tools designed to monitor and manage the performance and availability of software applications. It involves tracking various metrics related to an application's behavior and performance, diagnosing issues, and optimizing its efficiency. APM tools aim to provide insights into an application's performance from end-users' perspective, as well as analyzing underlying infrastructure components."
33
+ spec.description = "The 'APM' (Application Performance Monitoring) Ruby gem provides developers with comprehensive insights into their software applications' performance and behavior. By monitoring end-user experiences, profiling code execution, tracing transaction flows, and tracking resource utilization, the gem assists in identifying bottlenecks, errors, and areas for optimization. Real-time alerts, error analysis, and trend tracking contribute to maintaining a smooth user experience, enhancing application scalability, and ensuring efficient resource utilization."
34
+ # spec.homepage = "TODO: Put your gem's website or public repo URL here."
35
+ spec.license = "MIT"
36
+ spec.required_ruby_version = ">= 2.4.0"
37
+
38
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
39
+
40
+ # spec.metadata["homepage_uri"] = spec.homepage
41
+ spec.metadata["source_code_uri"] = "https://github.com/middleware-labs/ruby-gem"
42
+ # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
43
+
44
+ # Specify which files should be added to the gem when it is released.
45
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
46
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
47
+ `git ls-files -z`.split("\x0").reject do |f|
48
+ f.match(%r{\A(?:test|spec|features)/}) || excluded_files.any? { |excluded| f.include?(excluded) }
49
+ end
50
+ end
51
+ spec.bindir = "exe"
52
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
53
+ spec.require_paths = ["lib"]
54
+ end
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: middleware_apm_linux
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - middleware-dev
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-10-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: The 'APM' (Application Performance Monitoring) Ruby gem provides developers
14
+ with comprehensive insights into their software applications' performance and behavior.
15
+ By monitoring end-user experiences, profiling code execution, tracing transaction
16
+ flows, and tracking resource utilization, the gem assists in identifying bottlenecks,
17
+ errors, and areas for optimization. Real-time alerts, error analysis, and trend
18
+ tracking contribute to maintaining a smooth user experience, enhancing application
19
+ scalability, and ensuring efficient resource utilization.
20
+ email:
21
+ - dev@middleware.io
22
+ executables: []
23
+ extensions: []
24
+ extra_rdoc_files: []
25
+ files:
26
+ - ".github/workflows/feature.yaml"
27
+ - ".github/workflows/master.yaml"
28
+ - ".gitignore"
29
+ - ".rubocop.yml"
30
+ - CHANGELOG.md
31
+ - CODE_OF_CONDUCT.md
32
+ - Gemfile
33
+ - LICENSE.txt
34
+ - README.md
35
+ - Rakefile
36
+ - bin/console
37
+ - bin/setup
38
+ - lib/middleware/auth/authentication.rb
39
+ - lib/middleware/logger.rb
40
+ - lib/middleware/otel/config.rb
41
+ - lib/middleware/profile/pyroscope_profile.rb
42
+ - lib/middleware/ruby_gem/version.rb
43
+ - lib/middleware/ruby_gem_linux.rb
44
+ - middleware_rubygem.gemspec
45
+ homepage:
46
+ licenses:
47
+ - MIT
48
+ metadata:
49
+ source_code_uri: https://github.com/middleware-labs/ruby-gem
50
+ post_install_message:
51
+ rdoc_options: []
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: 2.4.0
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ requirements: []
65
+ rubygems_version: 3.3.26
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: APM is a practice and set of tools designed to monitor and manage the performance
69
+ and availability of software applications. It involves tracking various metrics
70
+ related to an application's behavior and performance, diagnosing issues, and optimizing
71
+ its efficiency. APM tools aim to provide insights into an application's performance
72
+ from end-users' perspective, as well as analyzing underlying infrastructure components.
73
+ test_files: []