Skip to content

Commit 387f795

Browse files
Merge pull request #7 from shivamshishodia/v2.0.6
v2.0.6
2 parents fd48daf + fbe746e commit 387f795

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22

3-
## 2.0.5 - 2022-04-12
3+
## 2.0.6 - 2024-02-05
4+
### Added
5+
- Support for endpoint override for instance principal auth mode.
6+
7+
## 2.0.5 - 2023-04-12
48
### Added
59
- Prometheus metrics support for multi worker configuration.
610
- 'FAQ' section to help customers in triaging issues when encountered.

fluent-plugin-oci-logging-analytics.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
66

77
Gem::Specification.new do |spec|
88
spec.name = "fluent-plugin-oci-logging-analytics"
9-
spec.version = "2.0.5"
9+
spec.version = "2.0.6"
1010
spec.authors = ["Oracle","OCI Observability: Logging Analytics"]
1111
spec.email = ["[email protected]"]
1212

@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
3030
spec.add_runtime_dependency "fluentd", [">= 0.14.10", "< 2"]
3131
spec.add_runtime_dependency 'rubyzip', '~> 2.3.2'
3232
spec.add_runtime_dependency "oci", "~>2.16"
33-
spec.add_runtime_dependency "prometheus-client", "~>4.0.0"
33+
spec.add_runtime_dependency "prometheus-client", "~>4.0"
3434
spec.add_runtime_dependency "yajl-ruby", '~> 1.4', '>= 1.4.3'
3535

3636
end

lib/fluent/plugin/out_oci-logging-analytics.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,16 @@ def initialize_loganalytics_client()
250250
case @auth_type
251251
when "InstancePrincipal"
252252
instance_principals_signer = OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
253-
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, signer: instance_principals_signer)
253+
if is_valid(@endpoint)
254+
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, endpoint: @endpoint, signer: instance_principals_signer)
255+
@@logger.info {"loganalytics_client initialised with endpoint: #{@endpoint}"}
256+
else
257+
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, signer: instance_principals_signer)
258+
end
254259
when "ConfigFile"
255260
my_config = OCI::ConfigFileLoader.load_config(config_file_location: @config_file_location, profile_name: @profile_name)
256-
if is_valid(endpoint)
257-
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config:my_config, endpoint:@endpoint)
261+
if is_valid(@endpoint)
262+
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: my_config, endpoint: @endpoint)
258263
@@logger.info {"loganalytics_client initialised with endpoint: #{@endpoint}"}
259264
else
260265
@@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config:my_config)

0 commit comments

Comments
 (0)