diff --git a/CHANGELOG.md b/CHANGELOG.md index 65841f5..adf1dc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log -## 2.0.5 - 2022-04-12 +## 2.0.6 - 2024-02-05 +### Added +- Support for endpoint override for instance principal auth mode. + +## 2.0.5 - 2023-04-12 ### Added - Prometheus metrics support for multi worker configuration. - 'FAQ' section to help customers in triaging issues when encountered. diff --git a/fluent-plugin-oci-logging-analytics.gemspec b/fluent-plugin-oci-logging-analytics.gemspec index a75d49a..47e3843 100755 --- a/fluent-plugin-oci-logging-analytics.gemspec +++ b/fluent-plugin-oci-logging-analytics.gemspec @@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = "fluent-plugin-oci-logging-analytics" - spec.version = "2.0.5" + spec.version = "2.0.6" spec.authors = ["Oracle","OCI Observability: Logging Analytics"] spec.email = ["oci_la_plugins_grp@oracle.com"] @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "fluentd", [">= 0.14.10", "< 2"] spec.add_runtime_dependency 'rubyzip', '~> 2.3.2' spec.add_runtime_dependency "oci", "~>2.16" - spec.add_runtime_dependency "prometheus-client", "~>4.0.0" + spec.add_runtime_dependency "prometheus-client", "~>4.0" spec.add_runtime_dependency "yajl-ruby", '~> 1.4', '>= 1.4.3' end diff --git a/lib/fluent/plugin/out_oci-logging-analytics.rb b/lib/fluent/plugin/out_oci-logging-analytics.rb index a0e4ed7..47b1a21 100755 --- a/lib/fluent/plugin/out_oci-logging-analytics.rb +++ b/lib/fluent/plugin/out_oci-logging-analytics.rb @@ -250,11 +250,16 @@ def initialize_loganalytics_client() case @auth_type when "InstancePrincipal" instance_principals_signer = OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new - @@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, signer: instance_principals_signer) + if is_valid(@endpoint) + @@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, endpoint: @endpoint, signer: instance_principals_signer) + @@logger.info {"loganalytics_client initialised with endpoint: #{@endpoint}"} + else + @@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: OCI::Config.new, signer: instance_principals_signer) + end when "ConfigFile" my_config = OCI::ConfigFileLoader.load_config(config_file_location: @config_file_location, profile_name: @profile_name) - if is_valid(endpoint) - @@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config:my_config, endpoint:@endpoint) + if is_valid(@endpoint) + @@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: my_config, endpoint: @endpoint) @@logger.info {"loganalytics_client initialised with endpoint: #{@endpoint}"} else @@loganalytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config:my_config)