fluent-plugin-newrelic 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d261476ad5b614f7a89afbc44da1325fd0bc0d9bb5622ca27bc94acd68057f80
4
- data.tar.gz: 7af5964c68a8d06a378495ecaf380e11e8001d0675f5da10215d2a6f3f2351fd
3
+ metadata.gz: 0773cd3e502a6dd497014062c8be8403f514c77bea25616ffd6fbf90fad30287
4
+ data.tar.gz: 86dbe19317eaf443f5dda768c863dac741ddf78667b36a5f391c9454041334f5
5
5
  SHA512:
6
- metadata.gz: d6bbac1158bfaec104873b02339f1500004823fd1711c3f350844720225075d7ce11e6fd3976e72f319d458cfc26b465f6da2307d317f6a5c736a00d4a5ee478
7
- data.tar.gz: 875ad58b3638794593abd2049e360c775c5fed2b0e727cb45b644343eb035e92428854eb8bab4927b34fd4b23dabc798d142b6c4cb979fc64fa8ed324dea5722
6
+ metadata.gz: 4b0349c68cf61dcf9bd0199d90ab537b7d12a272f506df873795f23c19485302bf1f7fbcdbbc444b091742f70d6cc261281550bd971c803c905dd6d5b41d4707
7
+ data.tar.gz: 109fd9f8727729ae92ef5702267e195838b358e99d107fdb547d21f5edc42a0c2eacff36a6a9f9ec1e9e34defc4e864a91d9f9ad49b9b1ad01d889e292267699
data/DEVELOPER.md CHANGED
@@ -9,26 +9,68 @@
9
9
  * Run tests: `bundle exec rspec`
10
10
  * Build the gem: `gem build newrelic-fluentd-output.gemspec`
11
11
 
12
- **NOTE**: Be mindful that using `log.info` in the plugin causes an unintended Sorcerer's Apprentice Syndrome style bug where exponentially larger copies of log messages are sent until the td-agent is unloaded. Super weird, but now you know.
12
+ **NOTE**: Be mindful that using `log.info` in the plugin causes an unintended Sorcerer's
13
+ Apprentice Syndrome style bug where exponentially larger copies of log messages are sent until the
14
+ td-agent is unloaded. Super weird, but now you know.
13
15
 
14
- ## Pushing changes to the public repo
15
- After updating the New Relic repo with changes, changes will need to be pushed to the public GitHub repo at: https://github.com/newrelic/newrelic-fluentd-output
16
+ ## Testing on MacOS
17
+
18
+ ### Install Fluentd
19
+ * `brew cask install td-agent`
20
+
21
+ ### Configure Fluentd
22
+ * `sudo vi /etc/td-agent/td-agent.conf`
23
+ * Add the following:
24
+ ```
25
+ <match **>
26
+ @type newrelic
27
+ api_key (your-api-key)
28
+ base_uri https://staging-insights-collector.newrelic.com/logs/v1
29
+ </match>
16
30
 
17
- * `git remote add public git@github.com:newrelic/newrelic-fluentd-output.git`
18
- * `git push public master:name-of-branch-to-create`
19
- * Create a PR from that branch in https://github.com/newrelic/newrelic-fluentd-output
20
- * Get the PR reviewed, merged, and delete the branch!
31
+ <source>
32
+ @type tail
33
+ format none
34
+ path /usr/local/var/log/test.log
35
+ tag test
36
+ </source>
37
+ ```
38
+
39
+ ### Testing plugin
40
+ * Stop Fluentd: `sudo launchctl unload /Library/LaunchDaemons/td-agent.plist`
41
+ * Remove previous version: `sudo /opt/td-agent/usr/sbin/td-agent-gem uninstall fluent-plugin-newrelic`
42
+ * Add new version: `sudo /opt/td-agent/usr/sbin/td-agent-gem install fluent-plugin-newrelic-<version>.gem`
43
+ * Start Fluentd: `sudo launchctl load /Library/LaunchDaemons/td-agent.plist`
44
+ * Make sure things start up OK: `tail -f /var/log/td-agent/td-agent.log`
45
+ * Cause a change that you've configured Fluentd to pick up: (`echo "FluentdTest" >> /usr/local/var/log/test.log`
46
+ * Look in `https://staging-one.newrelic.com/launcher/logger.log-launcher` for your log message ("FluentdTest")
47
+
48
+ ## Pushing changes to the public repo
49
+ After updating the New Relic repo with changes, changes will need to be pushed to the public GitHub repo
50
+ at: https://github.com/newrelic/newrelic-fluentd-output
21
51
 
22
- # Testing it with a local Fluentd install
52
+ Make sure you have the public set up as a remote called `public`:
53
+ ```
54
+ git remote add public git@github.com:newrelic/logstash-output-plugin.git
55
+ ```
23
56
 
24
- * Remove previous version: `td-agent-gem uninstall fluent-plugin-newrelic`
25
- * Add new version: `td-agent-gem install fluent-plugin-newrelic-<version>.gem`
26
- * Restart Fluentd
27
- * Cause a change that you've configured Fluentd to pick up (for instance, append to a file you're having it monitor)
28
- * Look in `https://staging-one.newrelic.com/launcher/logger.log-launcher` for your log message
57
+ Sync:
58
+ ```
59
+ git checkout --orphan single-commit-for-public-sync && \
60
+ # Remove things we don't want sent to the public-sync repo \
61
+ rm grandcentral.yml DEVELOPER.md && \
62
+ # Create a single commit and force push it, overwriting the remote master \
63
+ git commit -am "Mirrored commit" && \
64
+ git push --force public single-commit-for-public-sync:master && \
65
+ # Clean up \
66
+ git checkout master && \
67
+ git branch -D single-commit-for-public-sync
68
+ ```
29
69
 
30
70
  # Push changes to RubyGems
31
- After updating the source code and gem version in `version.rb`, push the changes to RubyGems. Note, you must be a gem owner to publish changes on [RubyGems.org](https://rubygems.org/profiles/NR-LOGGING)
71
+ After updating the source code and gem version in `version.rb`, push the changes to RubyGems.
72
+ Note, you must be a gem owner to publish changes on [RubyGems.org](https://rubygems.org/profiles/NR-LOGGING)
32
73
 
33
74
  * Build the gem: `gem build newrelic-fluentd-output.gemspec`
34
- * Publish the gem: `gem push --host https://rubygems.org fluent-plugin-newrelic-<VERSION>.gem` with the updated version (ex: `gem push --host https://rubygems.org fluent-plugin-newrelic-0.2.2.gem`)
75
+ * Publish the gem: `gem push fluent-plugin-newrelic-<VERSION>.gem`
76
+ with the updated version (example: `gem push fluent-plugin-newrelic-0.2.2.gem`)
@@ -44,6 +44,12 @@ module Fluent
44
44
 
45
45
  define_method('log') {$log} unless method_defined?(:log)
46
46
 
47
+ # This tells Fluentd that it can run this output plugin in multiple workers.
48
+ # Our plugin has no interactions with other processes
49
+ def multi_workers_ready?
50
+ true
51
+ end
52
+
47
53
  def configure(conf)
48
54
  super
49
55
 
@@ -1,3 +1,3 @@
1
1
  module NewrelicFluentdOutput
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-newrelic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - New Relic Logging Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2019-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd