newrelic-manticore 0.1.2-java → 1.0.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +69 -0
- data/Changelog.md +5 -0
- data/README.md +35 -14
- data/lib/new_relic/manticore/instrumentation.rb +6 -6
- data/lib/newrelic/manticore/version.rb +1 -1
- data/newrelic-manticore.gemspec +2 -2
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: beb2d3219e744b60a994ed584157e1eb84d6418c5a25e59b8832cb98a2c916ff
|
4
|
+
data.tar.gz: 1db486a5d91524f4d41ca0e090c600399c4b558ca6bcb77983f0ec54b6ef3cca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efeca68b6ba35ae88ac95e7d3117c379751248dae758c73ba515dd842576a5982ed2025e3652fb5ce2b09cafd7e9410547dd6451ba852ba8a39801143bc65df4
|
7
|
+
data.tar.gz: 1ec84cdfc32381e4930656758e23efc01bdbcd9180f8699cb5d7dabad859393f8864a221d22b859db2aea8b10f7df34347165baf8af3598021d0dc1fa178cbf6
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
58
|
+
faith may face temporary or permanent repercussions as determined by other
|
59
|
+
members of the project's leadership.
|
60
|
+
|
61
|
+
## Attribution
|
62
|
+
|
63
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
64
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
65
|
+
|
66
|
+
[homepage]: https://www.contributor-covenant.org
|
67
|
+
|
68
|
+
For answers to common questions about this code of conduct, see
|
69
|
+
https://www.contributor-covenant.org/faq
|
data/Changelog.md
CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.0.0] - 2019-03-12
|
8
|
+
### Changed
|
9
|
+
- Update newrelic agent dependency to major version 6.
|
10
|
+
- Replace deprecated calls to internal agent API.
|
11
|
+
|
7
12
|
## [0.1.2] - 2018-10-11
|
8
13
|
### Fixed
|
9
14
|
Detection whether manticore is used inside a database segment was not reliable and is now more robust
|
data/README.md
CHANGED
@@ -1,33 +1,54 @@
|
|
1
|
-
|
2
|
-
[rubygems]: https://rubygems.org/gems/newrelic-manticore
|
3
|
-
[manticore]: https://gitlab.com/cheald/manticore
|
4
|
-
[mit]: http://opensource.org/licenses/MIT
|
5
|
-
[cc]: http://contributor-covenant.org
|
6
|
-
|
7
|
-
# NewrelicManticore
|
1
|
+
# Newrelic-Manticore
|
8
2
|
|
9
|
-
[![Build Status](https://travis-ci.org/runtastic/newrelic-manticore.svg?branch=master)][travis]
|
3
|
+
[![Build Status](https://travis-ci.org/runtastic/newrelic-manticore.svg?branch=master)][travis]
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/newrelic-manticore.svg)][rubygems]
|
10
5
|
|
11
6
|
Adds NewRelic instrumentation for the [Manticore JRuby HTTP client][manticore].
|
12
7
|
|
13
8
|
## Installation
|
14
9
|
Add this line to your application's Gemfile:
|
15
10
|
|
16
|
-
|
11
|
+
```ruby
|
12
|
+
gem 'newrelic-manticore'
|
13
|
+
```
|
17
14
|
|
18
15
|
And then execute:
|
19
16
|
|
20
|
-
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install newrelic-manticore
|
22
|
+
|
23
|
+
## Usage
|
21
24
|
|
22
|
-
## How it works
|
23
25
|
When `newrelic/manticore` is required (e.g. automatically by Bundler), the gem becomes active.
|
24
|
-
It
|
26
|
+
It wraps `Manticore::Response#call` and traces your HTTP calls as external requests,
|
25
27
|
adding also the necessary headers for cross application tracing.
|
26
28
|
|
29
|
+
### What about parallel requests?
|
30
|
+
The NewRelic agent is currently not set up to support multithreaded requests. As [any of the other client integrations](https://docs.newrelic.com/docs/agents/ruby-agent/features/http-client-tracing-ruby#typhoeus),
|
31
|
+
_newrelic-manticore_ will trace all parallel requests as [one external service call](https://github.com/runtastic/newrelic-manticore/blob/master/test/new_relic/manticore/instrumentation_test.rb#L50).
|
32
|
+
|
33
|
+
### What about async "background" requests?
|
34
|
+
Those are traced normally as any other request would be.
|
35
|
+
|
36
|
+
## Development
|
37
|
+
|
38
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
39
|
+
|
40
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
41
|
+
|
27
42
|
## Contributing
|
28
43
|
Bug reports and pull requests are welcome on GitHub at https://github.com/runtastic/newrelic-manticore.
|
29
|
-
This project is intended to be a safe, welcoming space for collaboration, and
|
30
|
-
to adhere to the [
|
44
|
+
This project is intended to be a safe, welcoming space for collaboration, and
|
45
|
+
contributors are expected to adhere to the [code of conduct][cc].
|
31
46
|
|
32
47
|
## License
|
33
48
|
The gem is available as open source under [the terms of the MIT License][mit].
|
49
|
+
|
50
|
+
[travis]: https://travis-ci.org/runtastic/newrelic-manticore
|
51
|
+
[rubygems]: https://rubygems.org/gems/newrelic-manticore
|
52
|
+
[manticore]: https://gitlab.com/cheald/manticore
|
53
|
+
[mit]: http://opensource.org/licenses/MIT
|
54
|
+
[cc]: ../CODE_OF_CONDUCT.md
|
@@ -20,7 +20,7 @@ module NewRelic
|
|
20
20
|
def self.create_segment?
|
21
21
|
state = NewRelic::Agent::TransactionState.tl_get
|
22
22
|
return false unless state &&
|
23
|
-
|
23
|
+
state.current_transaction
|
24
24
|
|
25
25
|
return true unless state.current_transaction.current_segment
|
26
26
|
|
@@ -57,8 +57,8 @@ module NewRelic
|
|
57
57
|
def execute_with_newrelic_trace!
|
58
58
|
if NewRelic::Manticore.create_segment?
|
59
59
|
segment = NewRelic::Agent::External.start_segment(
|
60
|
-
library:
|
61
|
-
uri:
|
60
|
+
library: "Manticore",
|
61
|
+
uri: @async_requests.first.request.uri.to_s,
|
62
62
|
procedure: "Parallel batch"
|
63
63
|
)
|
64
64
|
segment.add_request_headers(PARALLEL_REQUEST_DUMMY)
|
@@ -101,9 +101,9 @@ module NewRelic
|
|
101
101
|
alias_method :call, :call_with_newrelic_trace
|
102
102
|
|
103
103
|
def create_newrelic_segment
|
104
|
-
NewRelic::Agent::
|
105
|
-
library:
|
106
|
-
uri:
|
104
|
+
NewRelic::Agent::Tracer.start_external_request_segment(
|
105
|
+
library: "Manticore",
|
106
|
+
uri: @request.uri.to_s,
|
107
107
|
procedure: @request.method
|
108
108
|
).tap do |segment|
|
109
109
|
segment.record_metrics = false if segment.parent.is_a?(::NewRelic::Agent::Transaction::DatastoreSegment)
|
data/newrelic-manticore.gemspec
CHANGED
@@ -27,9 +27,9 @@ Gem::Specification.new do |gem|
|
|
27
27
|
gem.executables = gem.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
gem.require_paths = ["lib"]
|
29
29
|
|
30
|
-
gem.add_runtime_dependency "newrelic_rpm", "~>
|
30
|
+
gem.add_runtime_dependency "newrelic_rpm", "~> 6"
|
31
31
|
|
32
|
-
gem.add_development_dependency "bundler"
|
32
|
+
gem.add_development_dependency "bundler"
|
33
33
|
gem.add_development_dependency "faraday", "~> 0"
|
34
34
|
gem.add_development_dependency "manticore", "~> 0"
|
35
35
|
gem.add_development_dependency "minitest"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic-manticore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Dominik Goltermann
|
@@ -9,14 +9,14 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6'
|
20
20
|
name: newrelic_rpm
|
21
21
|
prerelease: false
|
22
22
|
type: :runtime
|
@@ -24,21 +24,21 @@ dependencies:
|
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '6'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
name: bundler
|
35
35
|
prerelease: false
|
36
36
|
type: :development
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
@@ -163,6 +163,7 @@ files:
|
|
163
163
|
- ".rspec"
|
164
164
|
- ".rubocop.yml"
|
165
165
|
- ".travis.yml"
|
166
|
+
- CODE_OF_CONDUCT.md
|
166
167
|
- Changelog.md
|
167
168
|
- Gemfile
|
168
169
|
- LICENSE
|