fluent-plugin-oci-logging-analytics 2.0.0 → 2.0.2

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: dde9a7a3e6be01a2556efa148f43934c2c723ffce544d3c11af1c50fe46f06b7
4
- data.tar.gz: b442ff6c28ef6bc1c3ddc6d74c6b48e30c9921902607f9581c0aa116e5ba9db2
3
+ metadata.gz: 370ab2ca02c76665077069c52e02b97297b238a990bd0ba9475f86e588fb76c5
4
+ data.tar.gz: 0a0428639be123f7f908132d2965d6ceabb15054ea080e239b6da3e19b4ad7a6
5
5
  SHA512:
6
- metadata.gz: a106761ec570d6c14435544617bf2357846b022869ef7c6154463b848cf72eeedbc96080a7d819911518818864379655aaa7668c4bad46d4d45a80a10dffc40f
7
- data.tar.gz: dd7fcd53fd707c1c365cd8c5cbe1f4d6612d27b0de201d9ed2e1a98235322b08cdb7c4d15f968fa3bc667175e226cae1022673c36ba6409ee73bbe0e703417aa
6
+ metadata.gz: 8062761ad58799206282392787e6fe9440bb58f1b29a2ac692b6212e08fedc7cb6fd9c4b3b992fe56e8e02d6bc211defe92a51fb04f5a50ea49581d004eb10b6
7
+ data.tar.gz: ddbdfe55b2ee221112e6accdfb113bfda2a585d624efc6f5489ddc0953816784d1dad9d126f34b011ce93494a1b112f9ee24d42d58d80dbfab559efa6f07b6c1
@@ -1,3 +1,5 @@
1
+ ## Copyright (c) 2021, 2022 Oracle and/or its affiliates.
2
+ ## The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
1
3
 
2
4
  class LogEvents
3
5
  attr_accessor :entityId, :entityType, :logSourceName, :logPath, :logRecords , :metadata
@@ -1,3 +1,5 @@
1
+ ## Copyright (c) 2021, 2022 Oracle and/or its affiliates.
2
+ ## The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
1
3
 
2
4
  require_relative './logEvents'
3
5
 
@@ -1,14 +1,52 @@
1
- ## Copyright (c) 2021 Oracle and/or its affiliates.
1
+ ## Copyright (c) 2021, 2022 Oracle and/or its affiliates.
2
2
  ## The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
3
 
4
4
  require 'fluent/plugin/output'
5
5
  require "benchmark"
6
6
  require 'zip'
7
- require 'oci'
7
+
8
8
  require 'logger'
9
9
  require_relative '../dto/logEventsJson'
10
10
  require_relative '../dto/logEvents'
11
11
 
12
+ # Import only specific OCI modules to improve load times and reduce the memory requirements.
13
+ require 'oci/auth/auth'
14
+ require 'oci/log_analytics/log_analytics'
15
+ require 'oci/log_analytics/log_analytics_client'
16
+
17
+ # Workaround until OCI SDK releases a proper fix to load only specific service related modules/client.
18
+ require 'oci/api_client'
19
+ require 'oci/api_client_proxy_settings'
20
+ require 'oci/config'
21
+ require 'oci/config_file_loader'
22
+ require 'oci/errors'
23
+ require 'oci/global_context'
24
+ require 'oci/internal/internal'
25
+ require 'oci/regions'
26
+ require 'oci/regions_definitions'
27
+ require 'oci/response_headers'
28
+ require 'oci/response'
29
+ require 'oci/base_signer'
30
+ require 'oci/signer'
31
+ require 'oci/version'
32
+ require 'oci/waiter'
33
+ require 'oci/retry/retry'
34
+ require 'oci/object_storage/object_storage'
35
+
36
+ module OCI
37
+ class << self
38
+ attr_accessor :sdk_name
39
+
40
+ # Defines the logger used for debugging for the OCI module.
41
+ # For example, log to STDOUT by setting this to Logger.new(STDOUT).
42
+ #
43
+ # @return [Logger]
44
+ attr_accessor :logger
45
+ end
46
+ end
47
+
48
+ OracleBMC = OCI
49
+
12
50
  module Fluent::Plugin
13
51
  class OutOracleOCILogAnalytics < Output
14
52
  Fluent::Plugin.register_output('oci-logging-analytics', self)
@@ -916,4 +954,4 @@ module Fluent::Plugin
916
954
  end
917
955
  end
918
956
  end
919
- end
957
+ end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-oci-logging-analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - OCI Logging Analytics Team
7
+ - Oracle
8
+ - 'OCI Observability: Logging Analytics'
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2022-01-14 00:00:00.000000000 Z
12
+ date: 2022-02-17 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
@@ -86,22 +87,24 @@ dependencies:
86
87
  - - "~>"
87
88
  - !ruby/object:Gem::Version
88
89
  version: '2.13'
89
- description: Fluentd Output plugin to ship logs/events to OCI Logging Analytics.
90
+ description: OCI Logging Analytics Fluentd output plugin for ingesting the collected
91
+ log events to OCI Logging Analytics.
90
92
  email:
91
- - oci_la_plugins@oracle.com
93
+ - oci_la_plugins_grp@oracle.com
92
94
  executables: []
93
95
  extensions: []
94
96
  extra_rdoc_files: []
95
97
  files:
96
98
  - lib/fluent/dto/logEvents.rb
97
99
  - lib/fluent/dto/logEventsJson.rb
98
- - lib/fluent/metrics/metricsLabels.rb
99
- - lib/fluent/metrics/prometheusMetrics.rb
100
100
  - lib/fluent/plugin/out_oci-logging-analytics.rb
101
101
  homepage:
102
102
  licenses:
103
103
  - UPL-1.0
104
- metadata: {}
104
+ metadata:
105
+ documentation_uri: https://docs.oracle.com/en/learn/oci_logging_analytics_fluentd/
106
+ source_code_uri: https://github.com/oracle-quickstart/oci-logan-fluentd-output-plugin
107
+ changelog_uri: https://github.com/oracle-quickstart/oci-logan-fluentd-output-plugin/blob/main/CHANGELOG.md
105
108
  post_install_message:
106
109
  rdoc_options: []
107
110
  require_paths:
@@ -110,15 +113,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
113
  requirements:
111
114
  - - ">="
112
115
  - !ruby/object:Gem::Version
113
- version: '0'
116
+ version: 2.6.0
114
117
  required_rubygems_version: !ruby/object:Gem::Requirement
115
118
  requirements:
116
119
  - - ">="
117
120
  - !ruby/object:Gem::Version
118
121
  version: '0'
119
122
  requirements: []
120
- rubygems_version: 3.0.8
123
+ rubygems_version: 3.0.3
121
124
  signing_key:
122
125
  specification_version: 4
123
- summary: Fluentd Output plugin to ship logs/events to OCI Logging Analytics.
126
+ summary: Fluentd output plugin for OCI Logging Analytics.
124
127
  test_files: []
@@ -1,11 +0,0 @@
1
- class MetricsLabels
2
- attr_accessor :tag, :logGroupId, :logSourceName, :logSet, :drop_reason, :records_valid
3
- def initialize
4
- @tag = nil
5
- @logGroupId = nil
6
- @logSourceName = nil
7
- @logSet = nil
8
- @drop_reason = nil
9
- @records_valid = 0
10
- end
11
- end
@@ -1,41 +0,0 @@
1
- require 'prometheus/client'
2
- require 'prometheus/client/registry'
3
- require 'prometheus/client/gauge'
4
- require 'prometheus/client/histogram'
5
- require 'singleton'
6
-
7
- class PrometheusMetrics
8
- include Singleton
9
- attr_accessor :records_received, :records_valid, :records_dropped, :records_error, :records_posted,
10
- :bytes_received, :bytes_posted, :latency_avg, :chunk_upload_time_taken
11
- def initialize
12
- createMetrics
13
- registerMetrics
14
- end
15
- def createMetrics
16
- gauge = Prometheus::Client::Gauge
17
- @records_received = gauge.new(:oci_logging_analytics_records_received, docstring: '...', labels: [:tag,:logGroupId,:logSourceName,:logSet])
18
- @records_valid = gauge.new(:oci_logging_analytics_records_valid, docstring: '...', labels: [:tag,:logGroupId,:logSourceName,:logSet])
19
- @records_dropped = gauge.new(:oci_logging_analytics_records_dropped, docstring: '...', labels: [:tag,:logGroupId,:logSourceName,:logSet,:drop_reason])
20
- @records_error = gauge.new(:oci_logging_analytics_records_error, docstring: '...', labels: [:tag,:logGroupId,:logSourceName,:logSet,:error_code, :error_reason])
21
- @records_posted = gauge.new(:oci_logging_analytics_records_posted, docstring: '...', labels: [:tag,:logGroupId,:logSourceName,:logSet])
22
- @bytes_received = gauge.new(:oci_logging_analytics_bytes_received, docstring: '...', labels: [:tag])
23
- @bytes_posted = gauge.new(:oci_logging_analytics_bytes_posted, docstring: '...', labels: [:logGroupId])
24
- histogram = Prometheus::Client::Histogram
25
- @latency_avg = histogram.new(:oci_logging_analytics_network_latency_avg, docstring: '...', labels: [:tag])
26
- @chunk_upload_time_taken = histogram.new(:oci_logging_analytics_chunk_upload_time_taken, docstring: '...', labels: [:logGroupId])
27
- end
28
-
29
- def registerMetrics
30
- registry = Prometheus::Client.registry
31
- registry.register(@records_received) unless registry.exist?('oci_logging_analytics_records_received')
32
- registry.register(@records_valid) unless registry.exist?('oci_logging_analytics_records_valid')
33
- registry.register(@records_dropped) unless registry.exist?('oci_logging_analytics_records_dropped')
34
- registry.register(@records_error) unless registry.exist?('oci_logging_analytics_records_error')
35
- registry.register(@records_posted) unless registry.exist?('oci_logging_analytics_records_posted')
36
- registry.register(@bytes_received) unless registry.exist?('oci_logging_analytics_bytes_received')
37
- registry.register(@bytes_posted) unless registry.exist?('oci_logging_analytics_bytes_valid')
38
- registry.register(@latency_avg) unless registry.exist?('oci_logging_analytics_network_latency_avg')
39
- registry.register(@chunk_upload_time_taken) unless registry.exist?('oci_logging_analytics_chunk_upload_time_taken')
40
- end
41
- end