Skip to content

New - Enable Proxy Support for Declarative Configs#414

Merged
cleverchuk merged 1 commit intomainfrom
cc/NH-128717
Feb 12, 2026
Merged

New - Enable Proxy Support for Declarative Configs#414
cleverchuk merged 1 commit intomainfrom
cc/NH-128717

Conversation

@cleverchuk
Copy link
Contributor

Summary

This PR adds HTTP proxy support to the declarative configuration system and migrates all signal exporters (traces, metrics, logs) from gRPC to HTTP/protobuf protocol with custom SolarWinds component providers.

Changes

New Components

ProxyParser

A new parser that extracts proxy configuration from DeclarativeConfigProperties using the agent.proxy key. Delegates to the existing ProxyConfigParser for URL parsing and validation.

LogExporterComponentProvider

Custom OpenTelemetry ComponentProvider for log exports:

  • Registered as swo/logExporter via @AutoService
  • Uses OtlpHttpLogRecordExporter (HTTP/protobuf)
  • Configures proxy from ConfigManager if available

SpanExporterComponentProvider

Custom OpenTelemetry ComponentProvider for trace exports:

  • Registered as swo/spanExporter via @AutoService
  • Uses OtlpHttpSpanExporter (HTTP/protobuf)
  • Configures proxy from ConfigManager if available

Modified Components

MetricExporterComponentProvider

  • Protocol change: Migrated from OtlpGrpcMetricExporter to OtlpHttpMetricExporter
  • Proxy support: Added proxy configuration from ConfigManager

SharedConfigCustomizerProvider

Key changes:

  1. Proxy parsing: Added parseProxyConfig() to extract and store proxy settings during configuration customization
  2. Refactored config access: Extracted getSolarwindsConfig() method to centralize retrieval of SolarWinds-specific configuration with null validation
  3. Span exporter: Replaced OtlpGrpcExporterModel with custom SpanExporterComponentProvider using SpanExporterPropertyModel
  4. Log exporter: Replaced OtlpGrpcExporterModel with custom LogExporterComponentProvider using LogRecordExporterPropertyModel
  5. Signal-specific endpoints: Added OTLP standard paths to endpoints:
    • Traces: {endpoint}/v1/traces
    • Metrics: {endpoint}/v1/metrics
    • Logs: {endpoint}/v1/logs
  6. Protocol update: Changed metric exporter protocol from grpc to http/protobuf
  7. Removed: createModel() method (no longer needed after migration away from OtlpGrpcExporterModel)

File Relocations

  • ProxyConfigParser.java: Moved from custom/ to libs/shared/ for shared access

Technical Rationale

HTTP/protobuf over gRPC

The migration to HTTP/protobuf provides:

  • Better proxy compatibility (HTTP proxies don't require gRPC-specific handling)
  • Simpler network configuration in enterprise environments
  • Consistent protocol across all signal types

Custom Component Providers

Using withAdditionalProperty() pattern with custom component providers allows:

  • Proxy injection at exporter creation time
  • Centralized configuration through ConfigManager
  • Consistent configuration model across spans, metrics, and logs

Centralized Proxy Configuration

Proxy settings are parsed once during model customization and stored in ConfigManager, making them available to all component providers during exporter creation.

Tests Added

Test Class Coverage
LogExporterComponentProviderTest Component name, type verification
SpanExporterComponentProviderTest Component name, type verification
ProxyParserTest Config key, null handling, proxy parsing with/without credentials
MetricExporterComponentProviderTest Added testGetType() for consistency
SharedConfigCustomizerProviderTest Updated assertions for new endpoint paths (/v1/logs, /v1/metrics)

Test services data

  1. e-1712644058766987264
  2. e-1712643928659124224
  3. e-1742334541200846848
  4. e-1777406072376840192

@cleverchuk cleverchuk requested review from a team as code owners February 9, 2026 20:34
@cleverchuk cleverchuk requested a review from Copilot February 11, 2026 23:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds HTTP proxy support to the declarative configuration system and migrates all signal exporters (traces, metrics, logs) from gRPC to HTTP/protobuf protocol with custom SolarWinds component providers.

Changes:

  • Added new ProxyParser to extract proxy configuration from declarative configs
  • Created custom OpenTelemetry ComponentProvider implementations for logs and traces exporters
  • Migrated all exporters (metrics, traces, logs) from gRPC to HTTP/protobuf protocol with proxy support

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ProxyParser.java New parser delegating to ProxyConfigParser for proxy URL parsing from agent.proxy config key
ProxyParserTest.java Tests for proxy parser covering config key, null handling, and parsing with/without credentials
LogExporterComponentProvider.java New custom component provider for log exports using HTTP/protobuf with proxy support
LogExporterComponentProviderTest.java Tests verifying component name and type for log exporter provider
SpanExporterComponentProvider.java New custom component provider for trace exports using HTTP/protobuf with proxy support
SpanExporterComponentProviderTest.java Tests verifying component name and type for span exporter provider
MetricExporterComponentProvider.java Updated to use HTTP/protobuf exporter instead of gRPC and added proxy configuration
MetricExporterComponentProviderTest.java Added testGetType() test for consistency with other component provider tests
SharedConfigCustomizerProvider.java Added proxy parsing, replaced gRPC exporters with custom providers, added signal-specific endpoint paths
SharedConfigCustomizerProviderTest.java Updated test assertions to reflect new endpoint paths and custom component providers

Copy link
Contributor

@cheempz cheempz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @cleverchuk!

@cleverchuk cleverchuk merged commit 6836ad4 into main Feb 12, 2026
28 of 29 checks passed
@cleverchuk cleverchuk deleted the cc/NH-128717 branch February 12, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants