From d9226cf91d1a274c7416dab5dfcff7fbd71cbdbd Mon Sep 17 00:00:00 2001 From: Jack Berg <34418638+jack-berg@users.noreply.github.com> Date: Thu, 14 May 2026 13:44:19 -0500 Subject: [PATCH] Commit declarative config schema pojos to git --- .../declarative-config/build.gradle.kts | 81 +-- .../model/AggregationModel.java | 211 ++++++++ .../model/AlwaysOffSamplerModel.java | 50 ++ .../model/AlwaysOnSamplerModel.java | 50 ++ .../model/AttributeLimitsModel.java | 125 +++++ .../model/AttributeNameValueModel.java | 192 ++++++++ .../model/B3MultiPropagatorModel.java | 50 ++ .../model/B3PropagatorModel.java | 50 ++ .../model/BaggagePropagatorModel.java | 50 ++ ...entialBucketHistogramAggregationModel.java | 146 ++++++ .../model/BatchLogRecordProcessorModel.java | 216 ++++++++ .../model/BatchSpanProcessorModel.java | 216 ++++++++ .../model/CardinalityLimitsModel.java | 344 +++++++++++++ .../model/ConsoleExporterModel.java | 50 ++ .../model/ConsoleMetricExporterModel.java | 110 +++++ .../model/DefaultAggregationModel.java | 50 ++ .../model/DistributionModel.java | 83 ++++ .../model/DistributionPropertyModel.java | 82 +++ .../model/DropAggregationModel.java | 50 ++ .../ExperimentalCodeInstrumentationModel.java | 74 +++ ...mentalComposableAlwaysOffSamplerModel.java | 51 ++ ...imentalComposableAlwaysOnSamplerModel.java | 51 ++ ...ComposableParentThresholdSamplerModel.java | 77 +++ ...ntalComposableProbabilitySamplerModel.java | 81 +++ ...mentalComposableRuleBasedSamplerModel.java | 92 ++++ ...asedSamplerRuleAttributePatternsModel.java | 169 +++++++ ...eBasedSamplerRuleAttributeValuesModel.java | 126 +++++ ...alComposableRuleBasedSamplerRuleModel.java | 209 ++++++++ .../ExperimentalComposableSamplerModel.java | 207 ++++++++ ...imentalComposableSamplerPropertyModel.java | 84 ++++ ...imentalContainerResourceDetectorModel.java | 51 ++ .../ExperimentalDbInstrumentationModel.java | 74 +++ ...ExperimentalGenAiInstrumentationModel.java | 74 +++ ...perimentalGeneralInstrumentationModel.java | 314 ++++++++++++ ...ExperimentalHostResourceDetectorModel.java | 50 ++ ...imentalHttpClientInstrumentationModel.java | 170 +++++++ .../ExperimentalHttpInstrumentationModel.java | 122 +++++ ...imentalHttpServerInstrumentationModel.java | 170 +++++++ .../ExperimentalInstrumentationModel.java | 342 +++++++++++++ .../ExperimentalJaegerRemoteSamplerModel.java | 147 ++++++ ...lLanguageSpecificInstrumentationModel.java | 88 ++++ ...eSpecificInstrumentationPropertyModel.java | 84 ++++ .../model/ExperimentalLoggerConfigModel.java | 144 ++++++ .../ExperimentalLoggerConfiguratorModel.java | 107 ++++ ...perimentalLoggerMatcherAndConfigModel.java | 118 +++++ ...rimentalMessagingInstrumentationModel.java | 76 +++ .../model/ExperimentalMeterConfigModel.java | 81 +++ .../ExperimentalMeterConfiguratorModel.java | 107 ++++ ...xperimentalMeterMatcherAndConfigModel.java | 118 +++++ .../ExperimentalOtlpFileExporterModel.java | 86 ++++ ...perimentalOtlpFileMetricExporterModel.java | 145 ++++++ .../ExperimentalProbabilitySamplerModel.java | 80 +++ ...erimentalProcessResourceDetectorModel.java | 51 ++ ...rimentalPrometheusMetricExporterModel.java | 314 ++++++++++++ .../ExperimentalResourceDetectionModel.java | 113 +++++ .../ExperimentalResourceDetectorModel.java | 181 +++++++ ...rimentalResourceDetectorPropertyModel.java | 84 ++++ .../ExperimentalRpcInstrumentationModel.java | 74 +++ .../model/ExperimentalSanitizationModel.java | 73 +++ .../model/ExperimentalSemconvConfigModel.java | 164 ++++++ ...erimentalServiceResourceDetectorModel.java | 51 ++ .../model/ExperimentalSpanParent.java | 53 ++ .../model/ExperimentalTracerConfigModel.java | 82 +++ .../ExperimentalTracerConfiguratorModel.java | 107 ++++ ...perimentalTracerMatcherAndConfigModel.java | 118 +++++ .../ExperimentalUrlSanitizationModel.java | 103 ++++ ...plicitBucketHistogramAggregationModel.java | 116 +++++ .../declarativeconfig/model/GrpcTlsModel.java | 192 ++++++++ .../declarativeconfig/model/HttpTlsModel.java | 156 ++++++ .../model/IncludeExcludeModel.java | 131 +++++ .../model/LastValueAggregationModel.java | 50 ++ .../model/LogRecordExporterModel.java | 182 +++++++ .../model/LogRecordExporterPropertyModel.java | 82 +++ .../model/LogRecordLimitsModel.java | 129 +++++ .../model/LogRecordProcessorModel.java | 129 +++++ .../LogRecordProcessorPropertyModel.java | 82 +++ .../model/LoggerProviderModel.java | 143 ++++++ .../model/MeterProviderModel.java | 223 +++++++++ .../model/MetricProducerModel.java | 109 ++++ .../model/MetricProducerPropertyModel.java | 82 +++ .../model/MetricReaderModel.java | 94 ++++ .../model/NameStringValuePairModel.java | 120 +++++ .../model/OpenCensusMetricProducerModel.java | 50 ++ .../OpenTelemetryConfigurationModel.java | 465 ++++++++++++++++++ .../model/OtlpGrpcExporterModel.java | 246 +++++++++ .../model/OtlpGrpcMetricExporterModel.java | 317 ++++++++++++ .../model/OtlpHttpExporterModel.java | 325 ++++++++++++ .../model/OtlpHttpMetricExporterModel.java | 433 ++++++++++++++++ .../model/ParentBasedSamplerModel.java | 183 +++++++ .../model/PeriodicMetricReaderModel.java | 202 ++++++++ .../model/PropagatorModel.java | 135 +++++ .../model/PullMetricExporterModel.java | 113 +++++ .../PullMetricExporterPropertyModel.java | 82 +++ .../model/PullMetricReaderModel.java | 134 +++++ .../model/PushMetricExporterModel.java | 182 +++++++ .../PushMetricExporterPropertyModel.java | 82 +++ .../model/ResourceModel.java | 185 +++++++ .../declarativeconfig/model/SamplerModel.java | 273 ++++++++++ .../model/SamplerPropertyModel.java | 82 +++ .../model/SimpleLogRecordProcessorModel.java | 76 +++ .../model/SimpleSpanProcessorModel.java | 76 +++ .../model/SpanExporterModel.java | 181 +++++++ .../model/SpanExporterPropertyModel.java | 82 +++ .../declarativeconfig/model/SpanKind.java | 54 ++ .../model/SpanLimitsModel.java | 282 +++++++++++ .../model/SpanProcessorModel.java | 128 +++++ .../model/SpanProcessorPropertyModel.java | 82 +++ .../model/SumAggregationModel.java | 50 ++ .../model/TextMapPropagatorModel.java | 177 +++++++ .../model/TextMapPropagatorPropertyModel.java | 82 +++ .../model/TraceContextPropagatorModel.java | 50 ++ .../model/TraceIdRatioBasedSamplerModel.java | 80 +++ .../model/TracerProviderModel.java | 167 +++++++ .../declarativeconfig/model/ViewModel.java | 100 ++++ .../model/ViewSelectorModel.java | 292 +++++++++++ .../model/ViewStreamModel.java | 212 ++++++++ 116 files changed, 15393 insertions(+), 30 deletions(-) create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java create mode 100644 sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java diff --git a/sdk-extensions/declarative-config/build.gradle.kts b/sdk-extensions/declarative-config/build.gradle.kts index ba5f3b18494..23d412c76e0 100644 --- a/sdk-extensions/declarative-config/build.gradle.kts +++ b/sdk-extensions/declarative-config/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } description = "OpenTelemetry SDK Declarative Config" -otelJava.moduleName.set("io.opentelemetry.sdk.declarativeconfig") +otelJava.moduleName.set("io.opentelemetry.sdk.autoconfigure.declarativeconfig") dependencies { api(project(":sdk:all")) @@ -39,15 +39,15 @@ dependencies { testImplementation("com.google.guava:guava-testlib") } -// The following tasks download the JSON Schema files from open-telemetry/opentelemetry-configuration and generate classes from the type definitions which are used with jackson-databind to parse JSON / YAML to the configuration schema. +// The following tasks download the JSON Schema files from open-telemetry/opentelemetry-configuration, +// generate POJOs, and write the post-processed result into src/main/java for version control. // The sequence of tasks is: // 1. downloadConfigurationSchema - download configuration schema from open-telemetry/opentelemetry-configuration // 2. unzipConfigurationSchema - unzip the configuration schema archive contents to $buildDir/configuration/ // 3. generateJsonSchema2Pojo - generate java POJOs from the configuration schema -// 4. jsonSchema2PojoPostProcessing - perform various post processing on the generated POJOs, e.g. replace javax.annotation.processing.Generated with javax.annotation.Generated, add @SuppressWarning("rawtypes") annotation -// 5. overwriteJs2p - overwrite original generated classes with versions containing updated @Generated annotation -// 6. deleteJs2pTmp - delete tmp directory -// ... proceed with normal sourcesJar, compileJava, etc +// 4. syncPojoModelsToSrc - post-process the generated POJOs and write them to src/main/java +// The generated POJOs are committed to src/main/java and are NOT regenerated as part of the normal build. +// To regenerate (e.g. after a schema update), run: ./gradlew :sdk-extensions:declarative-config:syncPojoModelsToSrc val configurationTag = "1.0.0" val configurationRef = "refs/tags/v$configurationTag" // Replace with commit SHA to point to experiment with a specific commit @@ -90,8 +90,8 @@ jsonSchema2Pojo { // Clear old source files to avoid contaminated source dir when updating removeOldOutput = true - // Include @Nullable annotation. Note: jsonSchmea2Pojo will not add @Nullable annotations on getters - // so we perform some steps in jsonSchema2PojoPostProcessing to add these. + // Include @Nullable annotation. Note: jsonSchema2Pojo will not add @Nullable annotations on getters + // so we add these in syncPojoModelsToSrc. includeJsr305Annotations = true // Prefer builders to setters @@ -118,34 +118,34 @@ jsonSchema2Pojo { val generateJsonSchema2Pojo = tasks.getByName("generateJsonSchema2Pojo") generateJsonSchema2Pojo.dependsOn(unzipConfigurationSchema) -val jsonSchema2PojoPostProcessing by tasks.registering(Copy::class) { +val syncPojoModelsToSrc by tasks.registering(Copy::class) { dependsOn(generateJsonSchema2Pojo) + finalizedBy("spotlessApply") - from("$buildDirectory/generated/sources/js2p") - into("$buildDirectory/generated/sources/js2p-tmp") + from("$buildDirectory/generated/sources/js2p/java/main") + into("$projectDir/src/main/java") filter { it + // Shorten FQCNs for same-package references generated by jsonschema2pojo + .replace("io.opentelemetry.sdk.autoconfigure.declarativeconfig.model.", "") // Remove @Nullable annotation so it can be deterministically added later .replace("import javax.annotation.Nullable;\n", "") // Replace java 9+ @Generated annotation with java 8 version, add @Nullable annotation .replace("import javax.annotation.processing.Generated;", "import javax.annotation.Nullable;\nimport javax.annotation.Generated;") - // Add @SuppressWarnings("rawtypes") annotation to address raw types used in jsonschema2pojo builders - .replace("@Generated(\"jsonschema2pojo\")", "@Generated(\"jsonschema2pojo\")\n@SuppressWarnings(\"rawtypes\")") - // Add @Nullable annotations to all getters - .replace("( *)public ([a-zA-Z]*) get([a-zA-Z]*)".toRegex(), "$1@Nullable\n$1public $2 get$3") + // Add @SuppressWarnings annotations for issues inherent in jsonschema2pojo-generated code: + // "rawtypes" - raw types used in builders + // "NullAway" - uninitialized @NonNull fields on Jackson-deserialized POJOs + // TODO(jack-berg): investigate jsonschema2pojo config to avoid @Nonnull on fields / generate initializing constructors + // "BoxedPrimitiveEquality" - == comparison of boxed primitives in generated equals() + // TODO(jack-berg): investigate jsonschema2pojo config for alternative equals implementation that avoids boxed primitives comparison + .replace( + "@Generated(\"jsonschema2pojo\")", + "@Generated(\"jsonschema2pojo\")\n@SuppressWarnings({\"NullAway\", \"rawtypes\", \"BoxedPrimitiveEquality\"})" + ) + // Add @Nullable annotations to all getters (except getAdditionalProperties which is non-null) + .replace("( *)public (.+) get(?!AdditionalProperties)([a-zA-Z]*)".toRegex(), "$1@Nullable\n$1public $2 get$3") } } -val overwriteJs2p by tasks.registering(Copy::class) { - dependsOn(jsonSchema2PojoPostProcessing) - - from("$buildDirectory/generated/sources/js2p-tmp") - into("$buildDirectory/generated/sources/js2p") -} -val deleteJs2pTmp by tasks.registering(Delete::class) { - dependsOn(overwriteJs2p) - - delete("$buildDirectory/generated/sources/js2p-tmp/") -} // Copies EnvironmentResource.java from the autoconfigure module into a generated source set so // that declarative config can use the exact same source without taking a runtime dependency on @@ -176,6 +176,19 @@ sourceSets { } } +afterEvaluate { + // The jsonschema2pojo plugin auto-adds its targetDirectory to the main source set. Remove it so + // that only the committed model POJOs in src/main/java are compiled, avoiding duplicate classes. + val js2pDir = File(buildDirectory, "generated/sources/js2p/java/main") + sourceSets { + main { + java { + setSrcDirs(srcDirs.filter { it != js2pDir }) + } + } + } +} + val buildGraalVmReflectionJson = tasks.register("buildGraalVmReflectionJson") { val buildDir = buildDirectory val targetFile = File( @@ -232,13 +245,20 @@ val buildGraalVmReflectionJson = tasks.register("buildGraalVmReflectionJson") { } } -tasks.getByName("compileJava").dependsOn(deleteJs2pTmp, copyResourceConfiguration) -tasks.getByName("sourcesJar").dependsOn(deleteJs2pTmp, buildGraalVmReflectionJson, copyResourceConfiguration) -tasks.getByName("jar").dependsOn(deleteJs2pTmp, buildGraalVmReflectionJson) +tasks.getByName("compileJava").dependsOn(copyResourceConfiguration) +tasks.getByName("sourcesJar").dependsOn(buildGraalVmReflectionJson, copyResourceConfiguration) +tasks.getByName("jar").dependsOn(buildGraalVmReflectionJson) tasks.getByName("javadoc").dependsOn(buildGraalVmReflectionJson) tasks.getByName("compileTestJava").dependsOn(buildGraalVmReflectionJson) -// Exclude jsonschema2pojo generated sources from checkstyle +// When syncPojoModelsToSrc runs it writes to src/main/java. Both spotlessJava and spotlessMisc +// declare the module directory as an input region, so Gradle requires ordering to be explicit. +// mustRunAfter satisfies the implicit-dependency validator without making spotless depend on +// generation during normal builds. +tasks.named("spotlessJava") { mustRunAfter(syncPojoModelsToSrc) } +tasks.named("spotlessMisc") { mustRunAfter(syncPojoModelsToSrc) } + +// Exclude committed generated POJO sources from checkstyle tasks.named("checkstyleMain") { dependsOn(buildGraalVmReflectionJson) exclude("**/declarativeconfig/model/**") @@ -246,6 +266,7 @@ tasks.named("checkstyleMain") { tasks { withType().configureEach { + dependsOn(unzipConfigurationSchema) environment( mapOf( // Expose the kitchen sink example file to tests diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java new file mode 100644 index 00000000000..3fde4c5c0c2 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AggregationModel.java @@ -0,0 +1,211 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "default", + "drop", + "explicit_bucket_histogram", + "base2_exponential_bucket_histogram", + "last_value", + "sum" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class AggregationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("default") + private DefaultAggregationModel _default; + + /** (Can be null) */ + @Nullable + @JsonProperty("drop") + private DropAggregationModel drop; + + /** (Can be null) */ + @Nullable + @JsonProperty("explicit_bucket_histogram") + private ExplicitBucketHistogramAggregationModel explicitBucketHistogram; + + /** (Can be null) */ + @Nullable + @JsonProperty("base2_exponential_bucket_histogram") + private Base2ExponentialBucketHistogramAggregationModel base2ExponentialBucketHistogram; + + /** (Can be null) */ + @Nullable + @JsonProperty("last_value") + private LastValueAggregationModel lastValue; + + /** (Can be null) */ + @Nullable + @JsonProperty("sum") + private SumAggregationModel sum; + + @JsonProperty("default") + @Nullable + public DefaultAggregationModel getDefault() { + return _default; + } + + public AggregationModel withDefault(DefaultAggregationModel _default) { + this._default = _default; + return this; + } + + @JsonProperty("drop") + @Nullable + public DropAggregationModel getDrop() { + return drop; + } + + public AggregationModel withDrop(DropAggregationModel drop) { + this.drop = drop; + return this; + } + + @JsonProperty("explicit_bucket_histogram") + @Nullable + public ExplicitBucketHistogramAggregationModel getExplicitBucketHistogram() { + return explicitBucketHistogram; + } + + public AggregationModel withExplicitBucketHistogram( + ExplicitBucketHistogramAggregationModel explicitBucketHistogram) { + this.explicitBucketHistogram = explicitBucketHistogram; + return this; + } + + @JsonProperty("base2_exponential_bucket_histogram") + @Nullable + public Base2ExponentialBucketHistogramAggregationModel getBase2ExponentialBucketHistogram() { + return base2ExponentialBucketHistogram; + } + + public AggregationModel withBase2ExponentialBucketHistogram( + Base2ExponentialBucketHistogramAggregationModel base2ExponentialBucketHistogram) { + this.base2ExponentialBucketHistogram = base2ExponentialBucketHistogram; + return this; + } + + @JsonProperty("last_value") + @Nullable + public LastValueAggregationModel getLastValue() { + return lastValue; + } + + public AggregationModel withLastValue(LastValueAggregationModel lastValue) { + this.lastValue = lastValue; + return this; + } + + @JsonProperty("sum") + @Nullable + public SumAggregationModel getSum() { + return sum; + } + + public AggregationModel withSum(SumAggregationModel sum) { + this.sum = sum; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(AggregationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("_default"); + sb.append('='); + sb.append(((this._default == null) ? "" : this._default)); + sb.append(','); + sb.append("drop"); + sb.append('='); + sb.append(((this.drop == null) ? "" : this.drop)); + sb.append(','); + sb.append("explicitBucketHistogram"); + sb.append('='); + sb.append(((this.explicitBucketHistogram == null) ? "" : this.explicitBucketHistogram)); + sb.append(','); + sb.append("base2ExponentialBucketHistogram"); + sb.append('='); + sb.append( + ((this.base2ExponentialBucketHistogram == null) + ? "" + : this.base2ExponentialBucketHistogram)); + sb.append(','); + sb.append("lastValue"); + sb.append('='); + sb.append(((this.lastValue == null) ? "" : this.lastValue)); + sb.append(','); + sb.append("sum"); + sb.append('='); + sb.append(((this.sum == null) ? "" : this.sum)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.drop == null) ? 0 : this.drop.hashCode())); + result = + ((result * 31) + + ((this.explicitBucketHistogram == null) + ? 0 + : this.explicitBucketHistogram.hashCode())); + result = ((result * 31) + ((this._default == null) ? 0 : this._default.hashCode())); + result = ((result * 31) + ((this.lastValue == null) ? 0 : this.lastValue.hashCode())); + result = ((result * 31) + ((this.sum == null) ? 0 : this.sum.hashCode())); + result = + ((result * 31) + + ((this.base2ExponentialBucketHistogram == null) + ? 0 + : this.base2ExponentialBucketHistogram.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof AggregationModel) == false) { + return false; + } + AggregationModel rhs = ((AggregationModel) other); + return (((((((this.drop == rhs.drop) || ((this.drop != null) && this.drop.equals(rhs.drop))) + && ((this.explicitBucketHistogram == rhs.explicitBucketHistogram) + || ((this.explicitBucketHistogram != null) + && this.explicitBucketHistogram.equals( + rhs.explicitBucketHistogram)))) + && ((this._default == rhs._default) + || ((this._default != null) && this._default.equals(rhs._default)))) + && ((this.lastValue == rhs.lastValue) + || ((this.lastValue != null) && this.lastValue.equals(rhs.lastValue)))) + && ((this.sum == rhs.sum) || ((this.sum != null) && this.sum.equals(rhs.sum)))) + && ((this.base2ExponentialBucketHistogram == rhs.base2ExponentialBucketHistogram) + || ((this.base2ExponentialBucketHistogram != null) + && this.base2ExponentialBucketHistogram.equals( + rhs.base2ExponentialBucketHistogram)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java new file mode 100644 index 00000000000..ac920bf5757 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOffSamplerModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class AlwaysOffSamplerModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(AlwaysOffSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof AlwaysOffSamplerModel) == false) { + return false; + } + AlwaysOffSamplerModel rhs = ((AlwaysOffSamplerModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java new file mode 100644 index 00000000000..ad4ccbf0dab --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AlwaysOnSamplerModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class AlwaysOnSamplerModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(AlwaysOnSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof AlwaysOnSamplerModel) == false) { + return false; + } + AlwaysOnSamplerModel rhs = ((AlwaysOnSamplerModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java new file mode 100644 index 00000000000..9472232580c --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeLimitsModel.java @@ -0,0 +1,125 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"attribute_value_length_limit", "attribute_count_limit"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class AttributeLimitsModel { + + /** + * Configure max attribute value size. Value must be non-negative. If omitted or null, there is no + * limit. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attribute_value_length_limit") + @JsonPropertyDescription( + "Configure max attribute value size. \nValue must be non-negative.\nIf omitted or null, there is no limit.\n") + private Integer attributeValueLengthLimit; + + /** + * Configure max attribute count. Value must be non-negative. If omitted or null, 128 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attribute_count_limit") + @JsonPropertyDescription( + "Configure max attribute count. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + private Integer attributeCountLimit; + + /** + * Configure max attribute value size. Value must be non-negative. If omitted or null, there is no + * limit. + */ + @JsonProperty("attribute_value_length_limit") + @Nullable + public Integer getAttributeValueLengthLimit() { + return attributeValueLengthLimit; + } + + public AttributeLimitsModel withAttributeValueLengthLimit(Integer attributeValueLengthLimit) { + this.attributeValueLengthLimit = attributeValueLengthLimit; + return this; + } + + /** Configure max attribute count. Value must be non-negative. If omitted or null, 128 is used. */ + @JsonProperty("attribute_count_limit") + @Nullable + public Integer getAttributeCountLimit() { + return attributeCountLimit; + } + + public AttributeLimitsModel withAttributeCountLimit(Integer attributeCountLimit) { + this.attributeCountLimit = attributeCountLimit; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(AttributeLimitsModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("attributeValueLengthLimit"); + sb.append('='); + sb.append( + ((this.attributeValueLengthLimit == null) ? "" : this.attributeValueLengthLimit)); + sb.append(','); + sb.append("attributeCountLimit"); + sb.append('='); + sb.append(((this.attributeCountLimit == null) ? "" : this.attributeCountLimit)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.attributeValueLengthLimit == null) + ? 0 + : this.attributeValueLengthLimit.hashCode())); + result = + ((result * 31) + + ((this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof AttributeLimitsModel) == false) { + return false; + } + AttributeLimitsModel rhs = ((AttributeLimitsModel) other); + return (((this.attributeValueLengthLimit == rhs.attributeValueLengthLimit) + || ((this.attributeValueLengthLimit != null) + && this.attributeValueLengthLimit.equals(rhs.attributeValueLengthLimit))) + && ((this.attributeCountLimit == rhs.attributeCountLimit) + || ((this.attributeCountLimit != null) + && this.attributeCountLimit.equals(rhs.attributeCountLimit)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java new file mode 100644 index 00000000000..5cd48851c19 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/AttributeNameValueModel.java @@ -0,0 +1,192 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"name", "value", "type"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class AttributeNameValueModel { + + /** + * The attribute name. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @JsonPropertyDescription("The attribute name.\nProperty is required and must be non-null.\n") + @Nonnull + private String name; + + /** + * The attribute value. The type of value must match .type. Property is required and must be + * non-null. + * + *

(Required) + */ + @JsonProperty("value") + @JsonPropertyDescription( + "The attribute value.\nThe type of value must match .type.\nProperty is required and must be non-null.\n") + @Nonnull + private Object value; + + /** (Can be null) */ + @Nullable + @JsonProperty("type") + private AttributeNameValueModel.AttributeType type; + + /** + * The attribute name. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @Nullable + public String getName() { + return name; + } + + public AttributeNameValueModel withName(String name) { + this.name = name; + return this; + } + + /** + * The attribute value. The type of value must match .type. Property is required and must be + * non-null. + * + *

(Required) + */ + @JsonProperty("value") + @Nullable + public Object getValue() { + return value; + } + + public AttributeNameValueModel withValue(Object value) { + this.value = value; + return this; + } + + @JsonProperty("type") + @Nullable + public AttributeNameValueModel.AttributeType getType() { + return type; + } + + public AttributeNameValueModel withType(AttributeNameValueModel.AttributeType type) { + this.type = type; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(AttributeNameValueModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null) ? "" : this.name)); + sb.append(','); + sb.append("value"); + sb.append('='); + sb.append(((this.value == null) ? "" : this.value)); + sb.append(','); + sb.append("type"); + sb.append('='); + sb.append(((this.type == null) ? "" : this.type)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); + result = ((result * 31) + ((this.type == null) ? 0 : this.type.hashCode())); + result = ((result * 31) + ((this.value == null) ? 0 : this.value.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof AttributeNameValueModel) == false) { + return false; + } + AttributeNameValueModel rhs = ((AttributeNameValueModel) other); + return ((((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) + && ((this.type == rhs.type) || ((this.type != null) && this.type.equals(rhs.type)))) + && ((this.value == rhs.value) || ((this.value != null) && this.value.equals(rhs.value)))); + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum AttributeType { + STRING("string"), + BOOL("bool"), + INT("int"), + DOUBLE("double"), + STRING_ARRAY("string_array"), + BOOL_ARRAY("bool_array"), + INT_ARRAY("int_array"), + DOUBLE_ARRAY("double_array"); + private final String value; + private static final Map CONSTANTS = + new HashMap(); + + static { + for (AttributeNameValueModel.AttributeType c : values()) { + CONSTANTS.put(c.value, c); + } + } + + AttributeType(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static AttributeNameValueModel.AttributeType fromValue(String value) { + AttributeNameValueModel.AttributeType constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java new file mode 100644 index 00000000000..ff4405cfc98 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3MultiPropagatorModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class B3MultiPropagatorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(B3MultiPropagatorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof B3MultiPropagatorModel) == false) { + return false; + } + B3MultiPropagatorModel rhs = ((B3MultiPropagatorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java new file mode 100644 index 00000000000..aa40b3086ed --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/B3PropagatorModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class B3PropagatorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(B3PropagatorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof B3PropagatorModel) == false) { + return false; + } + B3PropagatorModel rhs = ((B3PropagatorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java new file mode 100644 index 00000000000..990522a652c --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BaggagePropagatorModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class BaggagePropagatorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(BaggagePropagatorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof BaggagePropagatorModel) == false) { + return false; + } + BaggagePropagatorModel rhs = ((BaggagePropagatorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java new file mode 100644 index 00000000000..cb82c537d11 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/Base2ExponentialBucketHistogramAggregationModel.java @@ -0,0 +1,146 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"max_scale", "max_size", "record_min_max"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class Base2ExponentialBucketHistogramAggregationModel { + + /** + * Configure the max scale factor. If omitted or null, 20 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("max_scale") + @JsonPropertyDescription("Configure the max scale factor.\nIf omitted or null, 20 is used.\n") + private Integer maxScale; + + /** + * Configure the maximum number of buckets in each of the positive and negative ranges, not + * counting the special zero bucket. If omitted or null, 160 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("max_size") + @JsonPropertyDescription( + "Configure the maximum number of buckets in each of the positive and negative ranges, not counting the special zero bucket.\nIf omitted or null, 160 is used.\n") + private Integer maxSize; + + /** + * Configure whether or not to record min and max. If omitted or null, true is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("record_min_max") + @JsonPropertyDescription( + "Configure whether or not to record min and max.\nIf omitted or null, true is used.\n") + private Boolean recordMinMax; + + /** Configure the max scale factor. If omitted or null, 20 is used. */ + @JsonProperty("max_scale") + @Nullable + public Integer getMaxScale() { + return maxScale; + } + + public Base2ExponentialBucketHistogramAggregationModel withMaxScale(Integer maxScale) { + this.maxScale = maxScale; + return this; + } + + /** + * Configure the maximum number of buckets in each of the positive and negative ranges, not + * counting the special zero bucket. If omitted or null, 160 is used. + */ + @JsonProperty("max_size") + @Nullable + public Integer getMaxSize() { + return maxSize; + } + + public Base2ExponentialBucketHistogramAggregationModel withMaxSize(Integer maxSize) { + this.maxSize = maxSize; + return this; + } + + /** Configure whether or not to record min and max. If omitted or null, true is used. */ + @JsonProperty("record_min_max") + @Nullable + public Boolean getRecordMinMax() { + return recordMinMax; + } + + public Base2ExponentialBucketHistogramAggregationModel withRecordMinMax(Boolean recordMinMax) { + this.recordMinMax = recordMinMax; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(Base2ExponentialBucketHistogramAggregationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("maxScale"); + sb.append('='); + sb.append(((this.maxScale == null) ? "" : this.maxScale)); + sb.append(','); + sb.append("maxSize"); + sb.append('='); + sb.append(((this.maxSize == null) ? "" : this.maxSize)); + sb.append(','); + sb.append("recordMinMax"); + sb.append('='); + sb.append(((this.recordMinMax == null) ? "" : this.recordMinMax)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.maxScale == null) ? 0 : this.maxScale.hashCode())); + result = ((result * 31) + ((this.recordMinMax == null) ? 0 : this.recordMinMax.hashCode())); + result = ((result * 31) + ((this.maxSize == null) ? 0 : this.maxSize.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Base2ExponentialBucketHistogramAggregationModel) == false) { + return false; + } + Base2ExponentialBucketHistogramAggregationModel rhs = + ((Base2ExponentialBucketHistogramAggregationModel) other); + return ((((this.maxScale == rhs.maxScale) + || ((this.maxScale != null) && this.maxScale.equals(rhs.maxScale))) + && ((this.recordMinMax == rhs.recordMinMax) + || ((this.recordMinMax != null) && this.recordMinMax.equals(rhs.recordMinMax)))) + && ((this.maxSize == rhs.maxSize) + || ((this.maxSize != null) && this.maxSize.equals(rhs.maxSize)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java new file mode 100644 index 00000000000..73506f8a31d --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchLogRecordProcessorModel.java @@ -0,0 +1,216 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "schedule_delay", + "export_timeout", + "max_queue_size", + "max_export_batch_size", + "exporter" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class BatchLogRecordProcessorModel { + + /** + * Configure delay interval (in milliseconds) between two consecutive exports. Value must be + * non-negative. If omitted or null, 1000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("schedule_delay") + @JsonPropertyDescription( + "Configure delay interval (in milliseconds) between two consecutive exports. \nValue must be non-negative.\nIf omitted or null, 1000 is used.\n") + private Integer scheduleDelay; + + /** + * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("export_timeout") + @JsonPropertyDescription( + "Configure maximum allowed time (in milliseconds) to export data. \nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 30000 is used.\n") + private Integer exportTimeout; + + /** + * Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("max_queue_size") + @JsonPropertyDescription( + "Configure maximum queue size. Value must be positive.\nIf omitted or null, 2048 is used.\n") + private Integer maxQueueSize; + + /** + * Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("max_export_batch_size") + @JsonPropertyDescription( + "Configure maximum batch size. Value must be positive.\nIf omitted or null, 512 is used.\n") + private Integer maxExportBatchSize; + + /** (Required) */ + @JsonProperty("exporter") + @Nonnull + private LogRecordExporterModel exporter; + + /** + * Configure delay interval (in milliseconds) between two consecutive exports. Value must be + * non-negative. If omitted or null, 1000 is used. + */ + @JsonProperty("schedule_delay") + @Nullable + public Integer getScheduleDelay() { + return scheduleDelay; + } + + public BatchLogRecordProcessorModel withScheduleDelay(Integer scheduleDelay) { + this.scheduleDelay = scheduleDelay; + return this; + } + + /** + * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. + */ + @JsonProperty("export_timeout") + @Nullable + public Integer getExportTimeout() { + return exportTimeout; + } + + public BatchLogRecordProcessorModel withExportTimeout(Integer exportTimeout) { + this.exportTimeout = exportTimeout; + return this; + } + + /** Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. */ + @JsonProperty("max_queue_size") + @Nullable + public Integer getMaxQueueSize() { + return maxQueueSize; + } + + public BatchLogRecordProcessorModel withMaxQueueSize(Integer maxQueueSize) { + this.maxQueueSize = maxQueueSize; + return this; + } + + /** Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. */ + @JsonProperty("max_export_batch_size") + @Nullable + public Integer getMaxExportBatchSize() { + return maxExportBatchSize; + } + + public BatchLogRecordProcessorModel withMaxExportBatchSize(Integer maxExportBatchSize) { + this.maxExportBatchSize = maxExportBatchSize; + return this; + } + + /** (Required) */ + @JsonProperty("exporter") + @Nullable + public LogRecordExporterModel getExporter() { + return exporter; + } + + public BatchLogRecordProcessorModel withExporter(LogRecordExporterModel exporter) { + this.exporter = exporter; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(BatchLogRecordProcessorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("scheduleDelay"); + sb.append('='); + sb.append(((this.scheduleDelay == null) ? "" : this.scheduleDelay)); + sb.append(','); + sb.append("exportTimeout"); + sb.append('='); + sb.append(((this.exportTimeout == null) ? "" : this.exportTimeout)); + sb.append(','); + sb.append("maxQueueSize"); + sb.append('='); + sb.append(((this.maxQueueSize == null) ? "" : this.maxQueueSize)); + sb.append(','); + sb.append("maxExportBatchSize"); + sb.append('='); + sb.append(((this.maxExportBatchSize == null) ? "" : this.maxExportBatchSize)); + sb.append(','); + sb.append("exporter"); + sb.append('='); + sb.append(((this.exporter == null) ? "" : this.exporter)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.scheduleDelay == null) ? 0 : this.scheduleDelay.hashCode())); + result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); + result = ((result * 31) + ((this.exportTimeout == null) ? 0 : this.exportTimeout.hashCode())); + result = + ((result * 31) + + ((this.maxExportBatchSize == null) ? 0 : this.maxExportBatchSize.hashCode())); + result = ((result * 31) + ((this.maxQueueSize == null) ? 0 : this.maxQueueSize.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof BatchLogRecordProcessorModel) == false) { + return false; + } + BatchLogRecordProcessorModel rhs = ((BatchLogRecordProcessorModel) other); + return ((((((this.scheduleDelay == rhs.scheduleDelay) + || ((this.scheduleDelay != null) + && this.scheduleDelay.equals(rhs.scheduleDelay))) + && ((this.exporter == rhs.exporter) + || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) + && ((this.exportTimeout == rhs.exportTimeout) + || ((this.exportTimeout != null) + && this.exportTimeout.equals(rhs.exportTimeout)))) + && ((this.maxExportBatchSize == rhs.maxExportBatchSize) + || ((this.maxExportBatchSize != null) + && this.maxExportBatchSize.equals(rhs.maxExportBatchSize)))) + && ((this.maxQueueSize == rhs.maxQueueSize) + || ((this.maxQueueSize != null) && this.maxQueueSize.equals(rhs.maxQueueSize)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java new file mode 100644 index 00000000000..3a074ae0a98 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/BatchSpanProcessorModel.java @@ -0,0 +1,216 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "schedule_delay", + "export_timeout", + "max_queue_size", + "max_export_batch_size", + "exporter" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class BatchSpanProcessorModel { + + /** + * Configure delay interval (in milliseconds) between two consecutive exports. Value must be + * non-negative. If omitted or null, 5000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("schedule_delay") + @JsonPropertyDescription( + "Configure delay interval (in milliseconds) between two consecutive exports. \nValue must be non-negative.\nIf omitted or null, 5000 is used.\n") + private Integer scheduleDelay; + + /** + * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("export_timeout") + @JsonPropertyDescription( + "Configure maximum allowed time (in milliseconds) to export data. \nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 30000 is used.\n") + private Integer exportTimeout; + + /** + * Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("max_queue_size") + @JsonPropertyDescription( + "Configure maximum queue size. Value must be positive.\nIf omitted or null, 2048 is used.\n") + private Integer maxQueueSize; + + /** + * Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("max_export_batch_size") + @JsonPropertyDescription( + "Configure maximum batch size. Value must be positive.\nIf omitted or null, 512 is used.\n") + private Integer maxExportBatchSize; + + /** (Required) */ + @JsonProperty("exporter") + @Nonnull + private SpanExporterModel exporter; + + /** + * Configure delay interval (in milliseconds) between two consecutive exports. Value must be + * non-negative. If omitted or null, 5000 is used. + */ + @JsonProperty("schedule_delay") + @Nullable + public Integer getScheduleDelay() { + return scheduleDelay; + } + + public BatchSpanProcessorModel withScheduleDelay(Integer scheduleDelay) { + this.scheduleDelay = scheduleDelay; + return this; + } + + /** + * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. + */ + @JsonProperty("export_timeout") + @Nullable + public Integer getExportTimeout() { + return exportTimeout; + } + + public BatchSpanProcessorModel withExportTimeout(Integer exportTimeout) { + this.exportTimeout = exportTimeout; + return this; + } + + /** Configure maximum queue size. Value must be positive. If omitted or null, 2048 is used. */ + @JsonProperty("max_queue_size") + @Nullable + public Integer getMaxQueueSize() { + return maxQueueSize; + } + + public BatchSpanProcessorModel withMaxQueueSize(Integer maxQueueSize) { + this.maxQueueSize = maxQueueSize; + return this; + } + + /** Configure maximum batch size. Value must be positive. If omitted or null, 512 is used. */ + @JsonProperty("max_export_batch_size") + @Nullable + public Integer getMaxExportBatchSize() { + return maxExportBatchSize; + } + + public BatchSpanProcessorModel withMaxExportBatchSize(Integer maxExportBatchSize) { + this.maxExportBatchSize = maxExportBatchSize; + return this; + } + + /** (Required) */ + @JsonProperty("exporter") + @Nullable + public SpanExporterModel getExporter() { + return exporter; + } + + public BatchSpanProcessorModel withExporter(SpanExporterModel exporter) { + this.exporter = exporter; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(BatchSpanProcessorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("scheduleDelay"); + sb.append('='); + sb.append(((this.scheduleDelay == null) ? "" : this.scheduleDelay)); + sb.append(','); + sb.append("exportTimeout"); + sb.append('='); + sb.append(((this.exportTimeout == null) ? "" : this.exportTimeout)); + sb.append(','); + sb.append("maxQueueSize"); + sb.append('='); + sb.append(((this.maxQueueSize == null) ? "" : this.maxQueueSize)); + sb.append(','); + sb.append("maxExportBatchSize"); + sb.append('='); + sb.append(((this.maxExportBatchSize == null) ? "" : this.maxExportBatchSize)); + sb.append(','); + sb.append("exporter"); + sb.append('='); + sb.append(((this.exporter == null) ? "" : this.exporter)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.scheduleDelay == null) ? 0 : this.scheduleDelay.hashCode())); + result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); + result = ((result * 31) + ((this.exportTimeout == null) ? 0 : this.exportTimeout.hashCode())); + result = + ((result * 31) + + ((this.maxExportBatchSize == null) ? 0 : this.maxExportBatchSize.hashCode())); + result = ((result * 31) + ((this.maxQueueSize == null) ? 0 : this.maxQueueSize.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof BatchSpanProcessorModel) == false) { + return false; + } + BatchSpanProcessorModel rhs = ((BatchSpanProcessorModel) other); + return ((((((this.scheduleDelay == rhs.scheduleDelay) + || ((this.scheduleDelay != null) + && this.scheduleDelay.equals(rhs.scheduleDelay))) + && ((this.exporter == rhs.exporter) + || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) + && ((this.exportTimeout == rhs.exportTimeout) + || ((this.exportTimeout != null) + && this.exportTimeout.equals(rhs.exportTimeout)))) + && ((this.maxExportBatchSize == rhs.maxExportBatchSize) + || ((this.maxExportBatchSize != null) + && this.maxExportBatchSize.equals(rhs.maxExportBatchSize)))) + && ((this.maxQueueSize == rhs.maxQueueSize) + || ((this.maxQueueSize != null) && this.maxQueueSize.equals(rhs.maxQueueSize)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java new file mode 100644 index 00000000000..b828258dd78 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/CardinalityLimitsModel.java @@ -0,0 +1,344 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "default", + "counter", + "gauge", + "histogram", + "observable_counter", + "observable_gauge", + "observable_up_down_counter", + "up_down_counter" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class CardinalityLimitsModel { + + /** + * Configure default cardinality limit for all instrument types. Instrument-specific cardinality + * limits take priority. If omitted or null, 2000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("default") + @JsonPropertyDescription( + "Configure default cardinality limit for all instrument types.\nInstrument-specific cardinality limits take priority.\nIf omitted or null, 2000 is used.\n") + private Integer _default; + + /** + * Configure default cardinality limit for counter instruments. If omitted or null, the value from + * .default is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("counter") + @JsonPropertyDescription( + "Configure default cardinality limit for counter instruments.\nIf omitted or null, the value from .default is used.\n") + private Integer counter; + + /** + * Configure default cardinality limit for gauge instruments. If omitted or null, the value from + * .default is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("gauge") + @JsonPropertyDescription( + "Configure default cardinality limit for gauge instruments.\nIf omitted or null, the value from .default is used.\n") + private Integer gauge; + + /** + * Configure default cardinality limit for histogram instruments. If omitted or null, the value + * from .default is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("histogram") + @JsonPropertyDescription( + "Configure default cardinality limit for histogram instruments.\nIf omitted or null, the value from .default is used.\n") + private Integer histogram; + + /** + * Configure default cardinality limit for observable_counter instruments. If omitted or null, the + * value from .default is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("observable_counter") + @JsonPropertyDescription( + "Configure default cardinality limit for observable_counter instruments.\nIf omitted or null, the value from .default is used.\n") + private Integer observableCounter; + + /** + * Configure default cardinality limit for observable_gauge instruments. If omitted or null, the + * value from .default is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("observable_gauge") + @JsonPropertyDescription( + "Configure default cardinality limit for observable_gauge instruments.\nIf omitted or null, the value from .default is used.\n") + private Integer observableGauge; + + /** + * Configure default cardinality limit for observable_up_down_counter instruments. If omitted or + * null, the value from .default is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("observable_up_down_counter") + @JsonPropertyDescription( + "Configure default cardinality limit for observable_up_down_counter instruments.\nIf omitted or null, the value from .default is used.\n") + private Integer observableUpDownCounter; + + /** + * Configure default cardinality limit for up_down_counter instruments. If omitted or null, the + * value from .default is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("up_down_counter") + @JsonPropertyDescription( + "Configure default cardinality limit for up_down_counter instruments.\nIf omitted or null, the value from .default is used.\n") + private Integer upDownCounter; + + /** + * Configure default cardinality limit for all instrument types. Instrument-specific cardinality + * limits take priority. If omitted or null, 2000 is used. + */ + @JsonProperty("default") + @Nullable + public Integer getDefault() { + return _default; + } + + public CardinalityLimitsModel withDefault(Integer _default) { + this._default = _default; + return this; + } + + /** + * Configure default cardinality limit for counter instruments. If omitted or null, the value from + * .default is used. + */ + @JsonProperty("counter") + @Nullable + public Integer getCounter() { + return counter; + } + + public CardinalityLimitsModel withCounter(Integer counter) { + this.counter = counter; + return this; + } + + /** + * Configure default cardinality limit for gauge instruments. If omitted or null, the value from + * .default is used. + */ + @JsonProperty("gauge") + @Nullable + public Integer getGauge() { + return gauge; + } + + public CardinalityLimitsModel withGauge(Integer gauge) { + this.gauge = gauge; + return this; + } + + /** + * Configure default cardinality limit for histogram instruments. If omitted or null, the value + * from .default is used. + */ + @JsonProperty("histogram") + @Nullable + public Integer getHistogram() { + return histogram; + } + + public CardinalityLimitsModel withHistogram(Integer histogram) { + this.histogram = histogram; + return this; + } + + /** + * Configure default cardinality limit for observable_counter instruments. If omitted or null, the + * value from .default is used. + */ + @JsonProperty("observable_counter") + @Nullable + public Integer getObservableCounter() { + return observableCounter; + } + + public CardinalityLimitsModel withObservableCounter(Integer observableCounter) { + this.observableCounter = observableCounter; + return this; + } + + /** + * Configure default cardinality limit for observable_gauge instruments. If omitted or null, the + * value from .default is used. + */ + @JsonProperty("observable_gauge") + @Nullable + public Integer getObservableGauge() { + return observableGauge; + } + + public CardinalityLimitsModel withObservableGauge(Integer observableGauge) { + this.observableGauge = observableGauge; + return this; + } + + /** + * Configure default cardinality limit for observable_up_down_counter instruments. If omitted or + * null, the value from .default is used. + */ + @JsonProperty("observable_up_down_counter") + @Nullable + public Integer getObservableUpDownCounter() { + return observableUpDownCounter; + } + + public CardinalityLimitsModel withObservableUpDownCounter(Integer observableUpDownCounter) { + this.observableUpDownCounter = observableUpDownCounter; + return this; + } + + /** + * Configure default cardinality limit for up_down_counter instruments. If omitted or null, the + * value from .default is used. + */ + @JsonProperty("up_down_counter") + @Nullable + public Integer getUpDownCounter() { + return upDownCounter; + } + + public CardinalityLimitsModel withUpDownCounter(Integer upDownCounter) { + this.upDownCounter = upDownCounter; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(CardinalityLimitsModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("_default"); + sb.append('='); + sb.append(((this._default == null) ? "" : this._default)); + sb.append(','); + sb.append("counter"); + sb.append('='); + sb.append(((this.counter == null) ? "" : this.counter)); + sb.append(','); + sb.append("gauge"); + sb.append('='); + sb.append(((this.gauge == null) ? "" : this.gauge)); + sb.append(','); + sb.append("histogram"); + sb.append('='); + sb.append(((this.histogram == null) ? "" : this.histogram)); + sb.append(','); + sb.append("observableCounter"); + sb.append('='); + sb.append(((this.observableCounter == null) ? "" : this.observableCounter)); + sb.append(','); + sb.append("observableGauge"); + sb.append('='); + sb.append(((this.observableGauge == null) ? "" : this.observableGauge)); + sb.append(','); + sb.append("observableUpDownCounter"); + sb.append('='); + sb.append(((this.observableUpDownCounter == null) ? "" : this.observableUpDownCounter)); + sb.append(','); + sb.append("upDownCounter"); + sb.append('='); + sb.append(((this.upDownCounter == null) ? "" : this.upDownCounter)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.gauge == null) ? 0 : this.gauge.hashCode())); + result = ((result * 31) + ((this.histogram == null) ? 0 : this.histogram.hashCode())); + result = ((result * 31) + ((this._default == null) ? 0 : this._default.hashCode())); + result = + ((result * 31) + ((this.observableGauge == null) ? 0 : this.observableGauge.hashCode())); + result = ((result * 31) + ((this.counter == null) ? 0 : this.counter.hashCode())); + result = + ((result * 31) + + ((this.observableUpDownCounter == null) + ? 0 + : this.observableUpDownCounter.hashCode())); + result = + ((result * 31) + + ((this.observableCounter == null) ? 0 : this.observableCounter.hashCode())); + result = ((result * 31) + ((this.upDownCounter == null) ? 0 : this.upDownCounter.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof CardinalityLimitsModel) == false) { + return false; + } + CardinalityLimitsModel rhs = ((CardinalityLimitsModel) other); + return (((((((((this.gauge == rhs.gauge) + || ((this.gauge != null) && this.gauge.equals(rhs.gauge))) + && ((this.histogram == rhs.histogram) + || ((this.histogram != null) + && this.histogram.equals(rhs.histogram)))) + && ((this._default == rhs._default) + || ((this._default != null) && this._default.equals(rhs._default)))) + && ((this.observableGauge == rhs.observableGauge) + || ((this.observableGauge != null) + && this.observableGauge.equals(rhs.observableGauge)))) + && ((this.counter == rhs.counter) + || ((this.counter != null) && this.counter.equals(rhs.counter)))) + && ((this.observableUpDownCounter == rhs.observableUpDownCounter) + || ((this.observableUpDownCounter != null) + && this.observableUpDownCounter.equals(rhs.observableUpDownCounter)))) + && ((this.observableCounter == rhs.observableCounter) + || ((this.observableCounter != null) + && this.observableCounter.equals(rhs.observableCounter)))) + && ((this.upDownCounter == rhs.upDownCounter) + || ((this.upDownCounter != null) && this.upDownCounter.equals(rhs.upDownCounter)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java new file mode 100644 index 00000000000..c551dc76e49 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleExporterModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ConsoleExporterModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ConsoleExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ConsoleExporterModel) == false) { + return false; + } + ConsoleExporterModel rhs = ((ConsoleExporterModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java new file mode 100644 index 00000000000..3a1d79214b2 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ConsoleMetricExporterModel.java @@ -0,0 +1,110 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"temporality_preference", "default_histogram_aggregation"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ConsoleMetricExporterModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("temporality_preference") + private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; + + /** (Can be null) */ + @Nullable + @JsonProperty("default_histogram_aggregation") + private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + defaultHistogramAggregation; + + @JsonProperty("temporality_preference") + @Nullable + public OtlpHttpMetricExporterModel.ExporterTemporalityPreference getTemporalityPreference() { + return temporalityPreference; + } + + public ConsoleMetricExporterModel withTemporalityPreference( + OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference) { + this.temporalityPreference = temporalityPreference; + return this; + } + + @JsonProperty("default_histogram_aggregation") + @Nullable + public OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + getDefaultHistogramAggregation() { + return defaultHistogramAggregation; + } + + public ConsoleMetricExporterModel withDefaultHistogramAggregation( + OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation) { + this.defaultHistogramAggregation = defaultHistogramAggregation; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ConsoleMetricExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("temporalityPreference"); + sb.append('='); + sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); + sb.append(','); + sb.append("defaultHistogramAggregation"); + sb.append('='); + sb.append( + ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); + result = + ((result * 31) + + ((this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ConsoleMetricExporterModel) == false) { + return false; + } + ConsoleMetricExporterModel rhs = ((ConsoleMetricExporterModel) other); + return (((this.temporalityPreference == rhs.temporalityPreference) + || ((this.temporalityPreference != null) + && this.temporalityPreference.equals(rhs.temporalityPreference))) + && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) + || ((this.defaultHistogramAggregation != null) + && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java new file mode 100644 index 00000000000..af37f448a39 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DefaultAggregationModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class DefaultAggregationModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DefaultAggregationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DefaultAggregationModel) == false) { + return false; + } + DefaultAggregationModel rhs = ((DefaultAggregationModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java new file mode 100644 index 00000000000..8a782cd1bfe --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionModel.java @@ -0,0 +1,83 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class DistributionModel { + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, DistributionPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public DistributionModel withAdditionalProperty(String name, DistributionPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DistributionModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DistributionModel) == false) { + return false; + } + DistributionModel rhs = ((DistributionModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java new file mode 100644 index 00000000000..5006d6e6aa2 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DistributionPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class DistributionPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public DistributionPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DistributionPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DistributionPropertyModel) == false) { + return false; + } + DistributionPropertyModel rhs = ((DistributionPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java new file mode 100644 index 00000000000..d46490b3866 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/DropAggregationModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class DropAggregationModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(DropAggregationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof DropAggregationModel) == false) { + return false; + } + DropAggregationModel rhs = ((DropAggregationModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java new file mode 100644 index 00000000000..49eff9f4775 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalCodeInstrumentationModel.java @@ -0,0 +1,74 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"semconv"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalCodeInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("semconv") + private ExperimentalSemconvConfigModel semconv; + + @JsonProperty("semconv") + @Nullable + public ExperimentalSemconvConfigModel getSemconv() { + return semconv; + } + + public ExperimentalCodeInstrumentationModel withSemconv(ExperimentalSemconvConfigModel semconv) { + this.semconv = semconv; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalCodeInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("semconv"); + sb.append('='); + sb.append(((this.semconv == null) ? "" : this.semconv)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalCodeInstrumentationModel) == false) { + return false; + } + ExperimentalCodeInstrumentationModel rhs = ((ExperimentalCodeInstrumentationModel) other); + return ((this.semconv == rhs.semconv) + || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java new file mode 100644 index 00000000000..178b9f69f73 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOffSamplerModel.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableAlwaysOffSamplerModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableAlwaysOffSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableAlwaysOffSamplerModel) == false) { + return false; + } + ExperimentalComposableAlwaysOffSamplerModel rhs = + ((ExperimentalComposableAlwaysOffSamplerModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java new file mode 100644 index 00000000000..f630a30307a --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableAlwaysOnSamplerModel.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableAlwaysOnSamplerModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableAlwaysOnSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableAlwaysOnSamplerModel) == false) { + return false; + } + ExperimentalComposableAlwaysOnSamplerModel rhs = + ((ExperimentalComposableAlwaysOnSamplerModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java new file mode 100644 index 00000000000..129219e9d5a --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableParentThresholdSamplerModel.java @@ -0,0 +1,77 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"root"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableParentThresholdSamplerModel { + + /** (Required) */ + @JsonProperty("root") + @Nonnull + private ExperimentalComposableSamplerModel root; + + /** (Required) */ + @JsonProperty("root") + @Nullable + public ExperimentalComposableSamplerModel getRoot() { + return root; + } + + public ExperimentalComposableParentThresholdSamplerModel withRoot( + ExperimentalComposableSamplerModel root) { + this.root = root; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableParentThresholdSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("root"); + sb.append('='); + sb.append(((this.root == null) ? "" : this.root)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.root == null) ? 0 : this.root.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableParentThresholdSamplerModel) == false) { + return false; + } + ExperimentalComposableParentThresholdSamplerModel rhs = + ((ExperimentalComposableParentThresholdSamplerModel) other); + return ((this.root == rhs.root) || ((this.root != null) && this.root.equals(rhs.root))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java new file mode 100644 index 00000000000..bcb656cd002 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableProbabilitySamplerModel.java @@ -0,0 +1,81 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"ratio"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableProbabilitySamplerModel { + + /** + * Configure ratio. If omitted or null, 1.0 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("ratio") + @JsonPropertyDescription("Configure ratio.\nIf omitted or null, 1.0 is used.\n") + private Double ratio; + + /** Configure ratio. If omitted or null, 1.0 is used. */ + @JsonProperty("ratio") + @Nullable + public Double getRatio() { + return ratio; + } + + public ExperimentalComposableProbabilitySamplerModel withRatio(Double ratio) { + this.ratio = ratio; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableProbabilitySamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("ratio"); + sb.append('='); + sb.append(((this.ratio == null) ? "" : this.ratio)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.ratio == null) ? 0 : this.ratio.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableProbabilitySamplerModel) == false) { + return false; + } + ExperimentalComposableProbabilitySamplerModel rhs = + ((ExperimentalComposableProbabilitySamplerModel) other); + return ((this.ratio == rhs.ratio) || ((this.ratio != null) && this.ratio.equals(rhs.ratio))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java new file mode 100644 index 00000000000..ef2eb094c86 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerModel.java @@ -0,0 +1,92 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"rules"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableRuleBasedSamplerModel { + + /** + * The rules for the sampler, matched in order. Each rule can have multiple match conditions. All + * conditions must match for the rule to match. If no conditions are specified, the rule matches + * all spans that reach it. If no rules match, the span is not sampled. If omitted, no span is + * sampled. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("rules") + @JsonPropertyDescription( + "The rules for the sampler, matched in order.\nEach rule can have multiple match conditions. All conditions must match for the rule to match.\nIf no conditions are specified, the rule matches all spans that reach it.\nIf no rules match, the span is not sampled.\nIf omitted, no span is sampled.\n") + private List rules; + + /** + * The rules for the sampler, matched in order. Each rule can have multiple match conditions. All + * conditions must match for the rule to match. If no conditions are specified, the rule matches + * all spans that reach it. If no rules match, the span is not sampled. If omitted, no span is + * sampled. + */ + @JsonProperty("rules") + @Nullable + public List getRules() { + return rules; + } + + public ExperimentalComposableRuleBasedSamplerModel withRules( + List rules) { + this.rules = rules; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableRuleBasedSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("rules"); + sb.append('='); + sb.append(((this.rules == null) ? "" : this.rules)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.rules == null) ? 0 : this.rules.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableRuleBasedSamplerModel) == false) { + return false; + } + ExperimentalComposableRuleBasedSamplerModel rhs = + ((ExperimentalComposableRuleBasedSamplerModel) other); + return ((this.rules == rhs.rules) || ((this.rules != null) && this.rules.equals(rhs.rules))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java new file mode 100644 index 00000000000..e2540ab176a --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.java @@ -0,0 +1,169 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"key", "included", "excluded"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel { + + /** + * The attribute key to match against. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("key") + @JsonPropertyDescription( + "The attribute key to match against.\nProperty is required and must be non-null.\n") + @Nonnull + private String key; + + /** + * Configure list of value patterns to include. Values are evaluated to match as follows: * If the + * value exactly matches. * If the value matches the wildcard pattern, where '?' matches any + * single character and '*' matches any number of characters including none. If omitted, all + * values are included. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("included") + @JsonPropertyDescription( + "Configure list of value patterns to include.\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, all values are included.\n") + private List included; + + /** + * Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher + * priority than included). Values are evaluated to match as follows: * If the value exactly + * matches. * If the value matches the wildcard pattern, where '?' matches any single character + * and '*' matches any number of characters including none. If omitted, .included attributes are + * included. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("excluded") + @JsonPropertyDescription( + "Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, .included attributes are included.\n") + private List excluded; + + /** + * The attribute key to match against. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("key") + @Nullable + public String getKey() { + return key; + } + + public ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel withKey(String key) { + this.key = key; + return this; + } + + /** + * Configure list of value patterns to include. Values are evaluated to match as follows: * If the + * value exactly matches. * If the value matches the wildcard pattern, where '?' matches any + * single character and '*' matches any number of characters including none. If omitted, all + * values are included. + */ + @JsonProperty("included") + @Nullable + public List getIncluded() { + return included; + } + + public ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel withIncluded( + List included) { + this.included = included; + return this; + } + + /** + * Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher + * priority than included). Values are evaluated to match as follows: * If the value exactly + * matches. * If the value matches the wildcard pattern, where '?' matches any single character + * and '*' matches any number of characters including none. If omitted, .included attributes are + * included. + */ + @JsonProperty("excluded") + @Nullable + public List getExcluded() { + return excluded; + } + + public ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel withExcluded( + List excluded) { + this.excluded = excluded; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("key"); + sb.append('='); + sb.append(((this.key == null) ? "" : this.key)); + sb.append(','); + sb.append("included"); + sb.append('='); + sb.append(((this.included == null) ? "" : this.included)); + sb.append(','); + sb.append("excluded"); + sb.append('='); + sb.append(((this.excluded == null) ? "" : this.excluded)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.excluded == null) ? 0 : this.excluded.hashCode())); + result = ((result * 31) + ((this.included == null) ? 0 : this.included.hashCode())); + result = ((result * 31) + ((this.key == null) ? 0 : this.key.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel) + == false) { + return false; + } + ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel rhs = + ((ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel) other); + return ((((this.excluded == rhs.excluded) + || ((this.excluded != null) && this.excluded.equals(rhs.excluded))) + && ((this.included == rhs.included) + || ((this.included != null) && this.included.equals(rhs.included)))) + && ((this.key == rhs.key) || ((this.key != null) && this.key.equals(rhs.key)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java new file mode 100644 index 00000000000..1977565b4b4 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.java @@ -0,0 +1,126 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"key", "values"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel { + + /** + * The attribute key to match against. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("key") + @JsonPropertyDescription( + "The attribute key to match against.\nProperty is required and must be non-null.\n") + @Nonnull + private String key; + + /** + * The attribute values to match against. If the attribute's value matches any of these, it + * matches. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("values") + @JsonPropertyDescription( + "The attribute values to match against. If the attribute's value matches any of these, it matches.\nProperty is required and must be non-null.\n") + @Nonnull + private List values; + + /** + * The attribute key to match against. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("key") + @Nullable + public String getKey() { + return key; + } + + public ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel withKey(String key) { + this.key = key; + return this; + } + + /** + * The attribute values to match against. If the attribute's value matches any of these, it + * matches. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("values") + @Nullable + public List getValues() { + return values; + } + + public ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel withValues( + List values) { + this.values = values; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("key"); + sb.append('='); + sb.append(((this.key == null) ? "" : this.key)); + sb.append(','); + sb.append("values"); + sb.append('='); + sb.append(((this.values == null) ? "" : this.values)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.key == null) ? 0 : this.key.hashCode())); + result = ((result * 31) + ((this.values == null) ? 0 : this.values.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel) + == false) { + return false; + } + ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel rhs = + ((ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel) other); + return (((this.key == rhs.key) || ((this.key != null) && this.key.equals(rhs.key))) + && ((this.values == rhs.values) + || ((this.values != null) && this.values.equals(rhs.values)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java new file mode 100644 index 00000000000..da677b0e53c --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableRuleBasedSamplerRuleModel.java @@ -0,0 +1,209 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * A rule for ExperimentalComposableRuleBasedSampler. A rule can have multiple match conditions - + * the sampler will be applied if all match. If no conditions are specified, the rule matches all + * spans that reach it. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"attribute_values", "attribute_patterns", "span_kinds", "parent", "sampler"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableRuleBasedSamplerRuleModel { + + @Nullable + @JsonProperty("attribute_values") + private ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel attributeValues; + + @Nullable + @JsonProperty("attribute_patterns") + private ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel attributePatterns; + + /** + * The span kinds to match. If the span's kind matches any of these, it matches. Values include: * + * client: client, a client span. * consumer: consumer, a consumer span. * internal: internal, an + * internal span. * producer: producer, a producer span. * server: server, a server span. If + * omitted, ignore. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("span_kinds") + @JsonPropertyDescription( + "The span kinds to match. If the span's kind matches any of these, it matches.\nValues include:\n* client: client, a client span.\n* consumer: consumer, a consumer span.\n* internal: internal, an internal span.\n* producer: producer, a producer span.\n* server: server, a server span.\nIf omitted, ignore.\n") + private List spanKinds; + + /** + * The parent span types to match. Values include: * local: local, a local parent. * none: none, + * no parent, i.e., the trace root. * remote: remote, a remote parent. If omitted, ignore. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("parent") + @JsonPropertyDescription( + "The parent span types to match.\nValues include:\n* local: local, a local parent.\n* none: none, no parent, i.e., the trace root.\n* remote: remote, a remote parent.\nIf omitted, ignore.\n") + private List parent; + + /** (Required) */ + @JsonProperty("sampler") + @Nonnull + private ExperimentalComposableSamplerModel sampler; + + @JsonProperty("attribute_values") + @Nullable + public ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel getAttributeValues() { + return attributeValues; + } + + public ExperimentalComposableRuleBasedSamplerRuleModel withAttributeValues( + ExperimentalComposableRuleBasedSamplerRuleAttributeValuesModel attributeValues) { + this.attributeValues = attributeValues; + return this; + } + + @JsonProperty("attribute_patterns") + @Nullable + public ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel getAttributePatterns() { + return attributePatterns; + } + + public ExperimentalComposableRuleBasedSamplerRuleModel withAttributePatterns( + ExperimentalComposableRuleBasedSamplerRuleAttributePatternsModel attributePatterns) { + this.attributePatterns = attributePatterns; + return this; + } + + /** + * The span kinds to match. If the span's kind matches any of these, it matches. Values include: * + * client: client, a client span. * consumer: consumer, a consumer span. * internal: internal, an + * internal span. * producer: producer, a producer span. * server: server, a server span. If + * omitted, ignore. + */ + @JsonProperty("span_kinds") + @Nullable + public List getSpanKinds() { + return spanKinds; + } + + public ExperimentalComposableRuleBasedSamplerRuleModel withSpanKinds(List spanKinds) { + this.spanKinds = spanKinds; + return this; + } + + /** + * The parent span types to match. Values include: * local: local, a local parent. * none: none, + * no parent, i.e., the trace root. * remote: remote, a remote parent. If omitted, ignore. + */ + @JsonProperty("parent") + @Nullable + public List getParent() { + return parent; + } + + public ExperimentalComposableRuleBasedSamplerRuleModel withParent( + List parent) { + this.parent = parent; + return this; + } + + /** (Required) */ + @JsonProperty("sampler") + @Nullable + public ExperimentalComposableSamplerModel getSampler() { + return sampler; + } + + public ExperimentalComposableRuleBasedSamplerRuleModel withSampler( + ExperimentalComposableSamplerModel sampler) { + this.sampler = sampler; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableRuleBasedSamplerRuleModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("attributeValues"); + sb.append('='); + sb.append(((this.attributeValues == null) ? "" : this.attributeValues)); + sb.append(','); + sb.append("attributePatterns"); + sb.append('='); + sb.append(((this.attributePatterns == null) ? "" : this.attributePatterns)); + sb.append(','); + sb.append("spanKinds"); + sb.append('='); + sb.append(((this.spanKinds == null) ? "" : this.spanKinds)); + sb.append(','); + sb.append("parent"); + sb.append('='); + sb.append(((this.parent == null) ? "" : this.parent)); + sb.append(','); + sb.append("sampler"); + sb.append('='); + sb.append(((this.sampler == null) ? "" : this.sampler)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + ((this.attributeValues == null) ? 0 : this.attributeValues.hashCode())); + result = ((result * 31) + ((this.spanKinds == null) ? 0 : this.spanKinds.hashCode())); + result = ((result * 31) + ((this.parent == null) ? 0 : this.parent.hashCode())); + result = + ((result * 31) + + ((this.attributePatterns == null) ? 0 : this.attributePatterns.hashCode())); + result = ((result * 31) + ((this.sampler == null) ? 0 : this.sampler.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableRuleBasedSamplerRuleModel) == false) { + return false; + } + ExperimentalComposableRuleBasedSamplerRuleModel rhs = + ((ExperimentalComposableRuleBasedSamplerRuleModel) other); + return ((((((this.attributeValues == rhs.attributeValues) + || ((this.attributeValues != null) + && this.attributeValues.equals(rhs.attributeValues))) + && ((this.spanKinds == rhs.spanKinds) + || ((this.spanKinds != null) && this.spanKinds.equals(rhs.spanKinds)))) + && ((this.parent == rhs.parent) + || ((this.parent != null) && this.parent.equals(rhs.parent)))) + && ((this.attributePatterns == rhs.attributePatterns) + || ((this.attributePatterns != null) + && this.attributePatterns.equals(rhs.attributePatterns)))) + && ((this.sampler == rhs.sampler) + || ((this.sampler != null) && this.sampler.equals(rhs.sampler)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java new file mode 100644 index 00000000000..fb2cab29307 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerModel.java @@ -0,0 +1,207 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"always_off", "always_on", "parent_threshold", "probability", "rule_based"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableSamplerModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("always_off") + private ExperimentalComposableAlwaysOffSamplerModel alwaysOff; + + /** (Can be null) */ + @Nullable + @JsonProperty("always_on") + private ExperimentalComposableAlwaysOnSamplerModel alwaysOn; + + @Nullable + @JsonProperty("parent_threshold") + private ExperimentalComposableParentThresholdSamplerModel parentThreshold; + + /** (Can be null) */ + @Nullable + @JsonProperty("probability") + private ExperimentalComposableProbabilitySamplerModel probability; + + /** (Can be null) */ + @Nullable + @JsonProperty("rule_based") + private ExperimentalComposableRuleBasedSamplerModel ruleBased; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("always_off") + @Nullable + public ExperimentalComposableAlwaysOffSamplerModel getAlwaysOff() { + return alwaysOff; + } + + public ExperimentalComposableSamplerModel withAlwaysOff( + ExperimentalComposableAlwaysOffSamplerModel alwaysOff) { + this.alwaysOff = alwaysOff; + return this; + } + + @JsonProperty("always_on") + @Nullable + public ExperimentalComposableAlwaysOnSamplerModel getAlwaysOn() { + return alwaysOn; + } + + public ExperimentalComposableSamplerModel withAlwaysOn( + ExperimentalComposableAlwaysOnSamplerModel alwaysOn) { + this.alwaysOn = alwaysOn; + return this; + } + + @JsonProperty("parent_threshold") + @Nullable + public ExperimentalComposableParentThresholdSamplerModel getParentThreshold() { + return parentThreshold; + } + + public ExperimentalComposableSamplerModel withParentThreshold( + ExperimentalComposableParentThresholdSamplerModel parentThreshold) { + this.parentThreshold = parentThreshold; + return this; + } + + @JsonProperty("probability") + @Nullable + public ExperimentalComposableProbabilitySamplerModel getProbability() { + return probability; + } + + public ExperimentalComposableSamplerModel withProbability( + ExperimentalComposableProbabilitySamplerModel probability) { + this.probability = probability; + return this; + } + + @JsonProperty("rule_based") + @Nullable + public ExperimentalComposableRuleBasedSamplerModel getRuleBased() { + return ruleBased; + } + + public ExperimentalComposableSamplerModel withRuleBased( + ExperimentalComposableRuleBasedSamplerModel ruleBased) { + this.ruleBased = ruleBased; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, ExperimentalComposableSamplerPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public ExperimentalComposableSamplerModel withAdditionalProperty( + String name, ExperimentalComposableSamplerPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("alwaysOff"); + sb.append('='); + sb.append(((this.alwaysOff == null) ? "" : this.alwaysOff)); + sb.append(','); + sb.append("alwaysOn"); + sb.append('='); + sb.append(((this.alwaysOn == null) ? "" : this.alwaysOn)); + sb.append(','); + sb.append("parentThreshold"); + sb.append('='); + sb.append(((this.parentThreshold == null) ? "" : this.parentThreshold)); + sb.append(','); + sb.append("probability"); + sb.append('='); + sb.append(((this.probability == null) ? "" : this.probability)); + sb.append(','); + sb.append("ruleBased"); + sb.append('='); + sb.append(((this.ruleBased == null) ? "" : this.ruleBased)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.ruleBased == null) ? 0 : this.ruleBased.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.alwaysOn == null) ? 0 : this.alwaysOn.hashCode())); + result = + ((result * 31) + ((this.parentThreshold == null) ? 0 : this.parentThreshold.hashCode())); + result = ((result * 31) + ((this.probability == null) ? 0 : this.probability.hashCode())); + result = ((result * 31) + ((this.alwaysOff == null) ? 0 : this.alwaysOff.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableSamplerModel) == false) { + return false; + } + ExperimentalComposableSamplerModel rhs = ((ExperimentalComposableSamplerModel) other); + return (((((((this.ruleBased == rhs.ruleBased) + || ((this.ruleBased != null) && this.ruleBased.equals(rhs.ruleBased))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.alwaysOn == rhs.alwaysOn) + || ((this.alwaysOn != null) && this.alwaysOn.equals(rhs.alwaysOn)))) + && ((this.parentThreshold == rhs.parentThreshold) + || ((this.parentThreshold != null) + && this.parentThreshold.equals(rhs.parentThreshold)))) + && ((this.probability == rhs.probability) + || ((this.probability != null) && this.probability.equals(rhs.probability)))) + && ((this.alwaysOff == rhs.alwaysOff) + || ((this.alwaysOff != null) && this.alwaysOff.equals(rhs.alwaysOff)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java new file mode 100644 index 00000000000..44a0df7aaac --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalComposableSamplerPropertyModel.java @@ -0,0 +1,84 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalComposableSamplerPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public ExperimentalComposableSamplerPropertyModel withAdditionalProperty( + String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalComposableSamplerPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalComposableSamplerPropertyModel) == false) { + return false; + } + ExperimentalComposableSamplerPropertyModel rhs = + ((ExperimentalComposableSamplerPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java new file mode 100644 index 00000000000..97a5e0384fd --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalContainerResourceDetectorModel.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalContainerResourceDetectorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalContainerResourceDetectorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalContainerResourceDetectorModel) == false) { + return false; + } + ExperimentalContainerResourceDetectorModel rhs = + ((ExperimentalContainerResourceDetectorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java new file mode 100644 index 00000000000..8d8be08462b --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalDbInstrumentationModel.java @@ -0,0 +1,74 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"semconv"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalDbInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("semconv") + private ExperimentalSemconvConfigModel semconv; + + @JsonProperty("semconv") + @Nullable + public ExperimentalSemconvConfigModel getSemconv() { + return semconv; + } + + public ExperimentalDbInstrumentationModel withSemconv(ExperimentalSemconvConfigModel semconv) { + this.semconv = semconv; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalDbInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("semconv"); + sb.append('='); + sb.append(((this.semconv == null) ? "" : this.semconv)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalDbInstrumentationModel) == false) { + return false; + } + ExperimentalDbInstrumentationModel rhs = ((ExperimentalDbInstrumentationModel) other); + return ((this.semconv == rhs.semconv) + || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java new file mode 100644 index 00000000000..3d24e62c86c --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGenAiInstrumentationModel.java @@ -0,0 +1,74 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"semconv"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalGenAiInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("semconv") + private ExperimentalSemconvConfigModel semconv; + + @JsonProperty("semconv") + @Nullable + public ExperimentalSemconvConfigModel getSemconv() { + return semconv; + } + + public ExperimentalGenAiInstrumentationModel withSemconv(ExperimentalSemconvConfigModel semconv) { + this.semconv = semconv; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalGenAiInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("semconv"); + sb.append('='); + sb.append(((this.semconv == null) ? "" : this.semconv)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalGenAiInstrumentationModel) == false) { + return false; + } + ExperimentalGenAiInstrumentationModel rhs = ((ExperimentalGenAiInstrumentationModel) other); + return ((this.semconv == rhs.semconv) + || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java new file mode 100644 index 00000000000..76e4cd36e4e --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalGeneralInstrumentationModel.java @@ -0,0 +1,314 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "http", + "code", + "db", + "gen_ai", + "messaging", + "rpc", + "sanitization", + "stability_opt_in_list" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalGeneralInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("http") + private ExperimentalHttpInstrumentationModel http; + + /** (Can be null) */ + @Nullable + @JsonProperty("code") + private ExperimentalCodeInstrumentationModel code; + + /** (Can be null) */ + @Nullable + @JsonProperty("db") + private ExperimentalDbInstrumentationModel db; + + /** (Can be null) */ + @Nullable + @JsonProperty("gen_ai") + private ExperimentalGenAiInstrumentationModel genAi; + + /** (Can be null) */ + @Nullable + @JsonProperty("messaging") + private ExperimentalMessagingInstrumentationModel messaging; + + /** (Can be null) */ + @Nullable + @JsonProperty("rpc") + private ExperimentalRpcInstrumentationModel rpc; + + /** (Can be null) */ + @Nullable + @JsonProperty("sanitization") + private ExperimentalSanitizationModel sanitization; + + /** + * Configure semantic convention stability opt-in as a comma-separated list. This property follows + * the format and semantics of the OTEL_SEMCONV_STABILITY_OPT_IN environment variable. Controls + * the emission of stable vs. experimental semantic conventions for instrumentation. This setting + * is only intended for migrating from experimental to stable semantic conventions. + * + *

Known values include: - http: Emit stable HTTP and networking conventions only - http/dup: + * Emit both old and stable HTTP and networking conventions (for phased migration) - database: + * Emit stable database conventions only - database/dup: Emit both old and stable database + * conventions (for phased migration) - rpc: Emit stable RPC conventions only - rpc/dup: Emit both + * experimental and stable RPC conventions (for phased migration) - messaging: Emit stable + * messaging conventions only - messaging/dup: Emit both old and stable messaging conventions (for + * phased migration) - code: Emit stable code conventions only - code/dup: Emit both old and + * stable code conventions (for phased migration) + * + *

Multiple values can be specified as a comma-separated list (e.g., "http,database/dup"). + * Additional signal types may be supported in future versions. + * + *

Domain-specific semconv properties (e.g., .instrumentation/development.general.db.semconv) + * take precedence over this general setting. + * + *

See: - HTTP migration: + * https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/ - Database migration: + * https://opentelemetry.io/docs/specs/semconv/database/ - RPC: + * https://opentelemetry.io/docs/specs/semconv/rpc/ - Messaging: + * https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/ If omitted or null, no + * opt-in is configured and instrumentations continue emitting their default semantic convention + * version. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("stability_opt_in_list") + @JsonPropertyDescription( + "Configure semantic convention stability opt-in as a comma-separated list.\nThis property follows the format and semantics of the OTEL_SEMCONV_STABILITY_OPT_IN environment variable.\nControls the emission of stable vs. experimental semantic conventions for instrumentation.\nThis setting is only intended for migrating from experimental to stable semantic conventions.\n\nKnown values include:\n- http: Emit stable HTTP and networking conventions only\n- http/dup: Emit both old and stable HTTP and networking conventions (for phased migration)\n- database: Emit stable database conventions only\n- database/dup: Emit both old and stable database conventions (for phased migration)\n- rpc: Emit stable RPC conventions only\n- rpc/dup: Emit both experimental and stable RPC conventions (for phased migration)\n- messaging: Emit stable messaging conventions only\n- messaging/dup: Emit both old and stable messaging conventions (for phased migration)\n- code: Emit stable code conventions only\n- code/dup: Emit both old and stable code conventions (for phased migration)\n\nMultiple values can be specified as a comma-separated list (e.g., \"http,database/dup\").\nAdditional signal types may be supported in future versions.\n\nDomain-specific semconv properties (e.g., .instrumentation/development.general.db.semconv) take precedence over this general setting.\n\nSee:\n- HTTP migration: https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/\n- Database migration: https://opentelemetry.io/docs/specs/semconv/database/\n- RPC: https://opentelemetry.io/docs/specs/semconv/rpc/\n- Messaging: https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/\nIf omitted or null, no opt-in is configured and instrumentations continue emitting their default semantic convention version.\n") + private String stabilityOptInList; + + @JsonProperty("http") + @Nullable + public ExperimentalHttpInstrumentationModel getHttp() { + return http; + } + + public ExperimentalGeneralInstrumentationModel withHttp( + ExperimentalHttpInstrumentationModel http) { + this.http = http; + return this; + } + + @JsonProperty("code") + @Nullable + public ExperimentalCodeInstrumentationModel getCode() { + return code; + } + + public ExperimentalGeneralInstrumentationModel withCode( + ExperimentalCodeInstrumentationModel code) { + this.code = code; + return this; + } + + @JsonProperty("db") + @Nullable + public ExperimentalDbInstrumentationModel getDb() { + return db; + } + + public ExperimentalGeneralInstrumentationModel withDb(ExperimentalDbInstrumentationModel db) { + this.db = db; + return this; + } + + @JsonProperty("gen_ai") + @Nullable + public ExperimentalGenAiInstrumentationModel getGenAi() { + return genAi; + } + + public ExperimentalGeneralInstrumentationModel withGenAi( + ExperimentalGenAiInstrumentationModel genAi) { + this.genAi = genAi; + return this; + } + + @JsonProperty("messaging") + @Nullable + public ExperimentalMessagingInstrumentationModel getMessaging() { + return messaging; + } + + public ExperimentalGeneralInstrumentationModel withMessaging( + ExperimentalMessagingInstrumentationModel messaging) { + this.messaging = messaging; + return this; + } + + @JsonProperty("rpc") + @Nullable + public ExperimentalRpcInstrumentationModel getRpc() { + return rpc; + } + + public ExperimentalGeneralInstrumentationModel withRpc(ExperimentalRpcInstrumentationModel rpc) { + this.rpc = rpc; + return this; + } + + @JsonProperty("sanitization") + @Nullable + public ExperimentalSanitizationModel getSanitization() { + return sanitization; + } + + public ExperimentalGeneralInstrumentationModel withSanitization( + ExperimentalSanitizationModel sanitization) { + this.sanitization = sanitization; + return this; + } + + /** + * Configure semantic convention stability opt-in as a comma-separated list. This property follows + * the format and semantics of the OTEL_SEMCONV_STABILITY_OPT_IN environment variable. Controls + * the emission of stable vs. experimental semantic conventions for instrumentation. This setting + * is only intended for migrating from experimental to stable semantic conventions. + * + *

Known values include: - http: Emit stable HTTP and networking conventions only - http/dup: + * Emit both old and stable HTTP and networking conventions (for phased migration) - database: + * Emit stable database conventions only - database/dup: Emit both old and stable database + * conventions (for phased migration) - rpc: Emit stable RPC conventions only - rpc/dup: Emit both + * experimental and stable RPC conventions (for phased migration) - messaging: Emit stable + * messaging conventions only - messaging/dup: Emit both old and stable messaging conventions (for + * phased migration) - code: Emit stable code conventions only - code/dup: Emit both old and + * stable code conventions (for phased migration) + * + *

Multiple values can be specified as a comma-separated list (e.g., "http,database/dup"). + * Additional signal types may be supported in future versions. + * + *

Domain-specific semconv properties (e.g., .instrumentation/development.general.db.semconv) + * take precedence over this general setting. + * + *

See: - HTTP migration: + * https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/ - Database migration: + * https://opentelemetry.io/docs/specs/semconv/database/ - RPC: + * https://opentelemetry.io/docs/specs/semconv/rpc/ - Messaging: + * https://opentelemetry.io/docs/specs/semconv/messaging/messaging-spans/ If omitted or null, no + * opt-in is configured and instrumentations continue emitting their default semantic convention + * version. + */ + @JsonProperty("stability_opt_in_list") + @Nullable + public String getStabilityOptInList() { + return stabilityOptInList; + } + + public ExperimentalGeneralInstrumentationModel withStabilityOptInList(String stabilityOptInList) { + this.stabilityOptInList = stabilityOptInList; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalGeneralInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("http"); + sb.append('='); + sb.append(((this.http == null) ? "" : this.http)); + sb.append(','); + sb.append("code"); + sb.append('='); + sb.append(((this.code == null) ? "" : this.code)); + sb.append(','); + sb.append("db"); + sb.append('='); + sb.append(((this.db == null) ? "" : this.db)); + sb.append(','); + sb.append("genAi"); + sb.append('='); + sb.append(((this.genAi == null) ? "" : this.genAi)); + sb.append(','); + sb.append("messaging"); + sb.append('='); + sb.append(((this.messaging == null) ? "" : this.messaging)); + sb.append(','); + sb.append("rpc"); + sb.append('='); + sb.append(((this.rpc == null) ? "" : this.rpc)); + sb.append(','); + sb.append("sanitization"); + sb.append('='); + sb.append(((this.sanitization == null) ? "" : this.sanitization)); + sb.append(','); + sb.append("stabilityOptInList"); + sb.append('='); + sb.append(((this.stabilityOptInList == null) ? "" : this.stabilityOptInList)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.sanitization == null) ? 0 : this.sanitization.hashCode())); + result = ((result * 31) + ((this.code == null) ? 0 : this.code.hashCode())); + result = ((result * 31) + ((this.genAi == null) ? 0 : this.genAi.hashCode())); + result = ((result * 31) + ((this.rpc == null) ? 0 : this.rpc.hashCode())); + result = ((result * 31) + ((this.http == null) ? 0 : this.http.hashCode())); + result = + ((result * 31) + + ((this.stabilityOptInList == null) ? 0 : this.stabilityOptInList.hashCode())); + result = ((result * 31) + ((this.db == null) ? 0 : this.db.hashCode())); + result = ((result * 31) + ((this.messaging == null) ? 0 : this.messaging.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalGeneralInstrumentationModel) == false) { + return false; + } + ExperimentalGeneralInstrumentationModel rhs = ((ExperimentalGeneralInstrumentationModel) other); + return (((((((((this.sanitization == rhs.sanitization) + || ((this.sanitization != null) + && this.sanitization.equals(rhs.sanitization))) + && ((this.code == rhs.code) + || ((this.code != null) && this.code.equals(rhs.code)))) + && ((this.genAi == rhs.genAi) + || ((this.genAi != null) && this.genAi.equals(rhs.genAi)))) + && ((this.rpc == rhs.rpc) + || ((this.rpc != null) && this.rpc.equals(rhs.rpc)))) + && ((this.http == rhs.http) + || ((this.http != null) && this.http.equals(rhs.http)))) + && ((this.stabilityOptInList == rhs.stabilityOptInList) + || ((this.stabilityOptInList != null) + && this.stabilityOptInList.equals(rhs.stabilityOptInList)))) + && ((this.db == rhs.db) || ((this.db != null) && this.db.equals(rhs.db)))) + && ((this.messaging == rhs.messaging) + || ((this.messaging != null) && this.messaging.equals(rhs.messaging)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java new file mode 100644 index 00000000000..92e21634306 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHostResourceDetectorModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalHostResourceDetectorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalHostResourceDetectorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalHostResourceDetectorModel) == false) { + return false; + } + ExperimentalHostResourceDetectorModel rhs = ((ExperimentalHostResourceDetectorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java new file mode 100644 index 00000000000..05ac0e67637 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpClientInstrumentationModel.java @@ -0,0 +1,170 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"request_captured_headers", "response_captured_headers", "known_methods"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalHttpClientInstrumentationModel { + + /** + * Configure headers to capture for outbound http requests. If omitted, no outbound request + * headers are captured. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("request_captured_headers") + @JsonPropertyDescription( + "Configure headers to capture for outbound http requests.\nIf omitted, no outbound request headers are captured.\n") + private List requestCapturedHeaders; + + /** + * Configure headers to capture for inbound http responses. If omitted, no inbound response + * headers are captured. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("response_captured_headers") + @JsonPropertyDescription( + "Configure headers to capture for inbound http responses.\nIf omitted, no inbound response headers are captured.\n") + private List responseCapturedHeaders; + + /** + * Override the default list of known HTTP methods. Known methods are case-sensitive. This is a + * full override of the default known methods, not a list of known methods in addition to the + * defaults. If omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH + * are known. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("known_methods") + @JsonPropertyDescription( + "Override the default list of known HTTP methods.\nKnown methods are case-sensitive.\nThis is a full override of the default known methods, not a list of known methods in addition to the defaults.\nIf omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH are known.\n") + private List knownMethods; + + /** + * Configure headers to capture for outbound http requests. If omitted, no outbound request + * headers are captured. + */ + @JsonProperty("request_captured_headers") + @Nullable + public List getRequestCapturedHeaders() { + return requestCapturedHeaders; + } + + public ExperimentalHttpClientInstrumentationModel withRequestCapturedHeaders( + List requestCapturedHeaders) { + this.requestCapturedHeaders = requestCapturedHeaders; + return this; + } + + /** + * Configure headers to capture for inbound http responses. If omitted, no inbound response + * headers are captured. + */ + @JsonProperty("response_captured_headers") + @Nullable + public List getResponseCapturedHeaders() { + return responseCapturedHeaders; + } + + public ExperimentalHttpClientInstrumentationModel withResponseCapturedHeaders( + List responseCapturedHeaders) { + this.responseCapturedHeaders = responseCapturedHeaders; + return this; + } + + /** + * Override the default list of known HTTP methods. Known methods are case-sensitive. This is a + * full override of the default known methods, not a list of known methods in addition to the + * defaults. If omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH + * are known. + */ + @JsonProperty("known_methods") + @Nullable + public List getKnownMethods() { + return knownMethods; + } + + public ExperimentalHttpClientInstrumentationModel withKnownMethods(List knownMethods) { + this.knownMethods = knownMethods; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalHttpClientInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("requestCapturedHeaders"); + sb.append('='); + sb.append(((this.requestCapturedHeaders == null) ? "" : this.requestCapturedHeaders)); + sb.append(','); + sb.append("responseCapturedHeaders"); + sb.append('='); + sb.append(((this.responseCapturedHeaders == null) ? "" : this.responseCapturedHeaders)); + sb.append(','); + sb.append("knownMethods"); + sb.append('='); + sb.append(((this.knownMethods == null) ? "" : this.knownMethods)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.requestCapturedHeaders == null) ? 0 : this.requestCapturedHeaders.hashCode())); + result = + ((result * 31) + + ((this.responseCapturedHeaders == null) + ? 0 + : this.responseCapturedHeaders.hashCode())); + result = ((result * 31) + ((this.knownMethods == null) ? 0 : this.knownMethods.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalHttpClientInstrumentationModel) == false) { + return false; + } + ExperimentalHttpClientInstrumentationModel rhs = + ((ExperimentalHttpClientInstrumentationModel) other); + return ((((this.requestCapturedHeaders == rhs.requestCapturedHeaders) + || ((this.requestCapturedHeaders != null) + && this.requestCapturedHeaders.equals(rhs.requestCapturedHeaders))) + && ((this.responseCapturedHeaders == rhs.responseCapturedHeaders) + || ((this.responseCapturedHeaders != null) + && this.responseCapturedHeaders.equals(rhs.responseCapturedHeaders)))) + && ((this.knownMethods == rhs.knownMethods) + || ((this.knownMethods != null) && this.knownMethods.equals(rhs.knownMethods)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java new file mode 100644 index 00000000000..a4004ed91d6 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpInstrumentationModel.java @@ -0,0 +1,122 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"semconv", "client", "server"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalHttpInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("semconv") + private ExperimentalSemconvConfigModel semconv; + + /** (Can be null) */ + @Nullable + @JsonProperty("client") + private ExperimentalHttpClientInstrumentationModel client; + + /** (Can be null) */ + @Nullable + @JsonProperty("server") + private ExperimentalHttpServerInstrumentationModel server; + + @JsonProperty("semconv") + @Nullable + public ExperimentalSemconvConfigModel getSemconv() { + return semconv; + } + + public ExperimentalHttpInstrumentationModel withSemconv(ExperimentalSemconvConfigModel semconv) { + this.semconv = semconv; + return this; + } + + @JsonProperty("client") + @Nullable + public ExperimentalHttpClientInstrumentationModel getClient() { + return client; + } + + public ExperimentalHttpInstrumentationModel withClient( + ExperimentalHttpClientInstrumentationModel client) { + this.client = client; + return this; + } + + @JsonProperty("server") + @Nullable + public ExperimentalHttpServerInstrumentationModel getServer() { + return server; + } + + public ExperimentalHttpInstrumentationModel withServer( + ExperimentalHttpServerInstrumentationModel server) { + this.server = server; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalHttpInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("semconv"); + sb.append('='); + sb.append(((this.semconv == null) ? "" : this.semconv)); + sb.append(','); + sb.append("client"); + sb.append('='); + sb.append(((this.client == null) ? "" : this.client)); + sb.append(','); + sb.append("server"); + sb.append('='); + sb.append(((this.server == null) ? "" : this.server)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.client == null) ? 0 : this.client.hashCode())); + result = ((result * 31) + ((this.server == null) ? 0 : this.server.hashCode())); + result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalHttpInstrumentationModel) == false) { + return false; + } + ExperimentalHttpInstrumentationModel rhs = ((ExperimentalHttpInstrumentationModel) other); + return ((((this.client == rhs.client) + || ((this.client != null) && this.client.equals(rhs.client))) + && ((this.server == rhs.server) + || ((this.server != null) && this.server.equals(rhs.server)))) + && ((this.semconv == rhs.semconv) + || ((this.semconv != null) && this.semconv.equals(rhs.semconv)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java new file mode 100644 index 00000000000..5a6d449a9fb --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalHttpServerInstrumentationModel.java @@ -0,0 +1,170 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"request_captured_headers", "response_captured_headers", "known_methods"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalHttpServerInstrumentationModel { + + /** + * Configure headers to capture for inbound http requests. If omitted, no request headers are + * captured. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("request_captured_headers") + @JsonPropertyDescription( + "Configure headers to capture for inbound http requests.\nIf omitted, no request headers are captured.\n") + private List requestCapturedHeaders; + + /** + * Configure headers to capture for outbound http responses. If omitted, no response headers are + * captures. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("response_captured_headers") + @JsonPropertyDescription( + "Configure headers to capture for outbound http responses.\nIf omitted, no response headers are captures.\n") + private List responseCapturedHeaders; + + /** + * Override the default list of known HTTP methods. Known methods are case-sensitive. This is a + * full override of the default known methods, not a list of known methods in addition to the + * defaults. If omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH + * are known. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("known_methods") + @JsonPropertyDescription( + "Override the default list of known HTTP methods.\nKnown methods are case-sensitive.\nThis is a full override of the default known methods, not a list of known methods in addition to the defaults.\nIf omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH are known.\n") + private List knownMethods; + + /** + * Configure headers to capture for inbound http requests. If omitted, no request headers are + * captured. + */ + @JsonProperty("request_captured_headers") + @Nullable + public List getRequestCapturedHeaders() { + return requestCapturedHeaders; + } + + public ExperimentalHttpServerInstrumentationModel withRequestCapturedHeaders( + List requestCapturedHeaders) { + this.requestCapturedHeaders = requestCapturedHeaders; + return this; + } + + /** + * Configure headers to capture for outbound http responses. If omitted, no response headers are + * captures. + */ + @JsonProperty("response_captured_headers") + @Nullable + public List getResponseCapturedHeaders() { + return responseCapturedHeaders; + } + + public ExperimentalHttpServerInstrumentationModel withResponseCapturedHeaders( + List responseCapturedHeaders) { + this.responseCapturedHeaders = responseCapturedHeaders; + return this; + } + + /** + * Override the default list of known HTTP methods. Known methods are case-sensitive. This is a + * full override of the default known methods, not a list of known methods in addition to the + * defaults. If omitted, HTTP methods GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH + * are known. + */ + @JsonProperty("known_methods") + @Nullable + public List getKnownMethods() { + return knownMethods; + } + + public ExperimentalHttpServerInstrumentationModel withKnownMethods(List knownMethods) { + this.knownMethods = knownMethods; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalHttpServerInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("requestCapturedHeaders"); + sb.append('='); + sb.append(((this.requestCapturedHeaders == null) ? "" : this.requestCapturedHeaders)); + sb.append(','); + sb.append("responseCapturedHeaders"); + sb.append('='); + sb.append(((this.responseCapturedHeaders == null) ? "" : this.responseCapturedHeaders)); + sb.append(','); + sb.append("knownMethods"); + sb.append('='); + sb.append(((this.knownMethods == null) ? "" : this.knownMethods)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.requestCapturedHeaders == null) ? 0 : this.requestCapturedHeaders.hashCode())); + result = + ((result * 31) + + ((this.responseCapturedHeaders == null) + ? 0 + : this.responseCapturedHeaders.hashCode())); + result = ((result * 31) + ((this.knownMethods == null) ? 0 : this.knownMethods.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalHttpServerInstrumentationModel) == false) { + return false; + } + ExperimentalHttpServerInstrumentationModel rhs = + ((ExperimentalHttpServerInstrumentationModel) other); + return ((((this.requestCapturedHeaders == rhs.requestCapturedHeaders) + || ((this.requestCapturedHeaders != null) + && this.requestCapturedHeaders.equals(rhs.requestCapturedHeaders))) + && ((this.responseCapturedHeaders == rhs.responseCapturedHeaders) + || ((this.responseCapturedHeaders != null) + && this.responseCapturedHeaders.equals(rhs.responseCapturedHeaders)))) + && ((this.knownMethods == rhs.knownMethods) + || ((this.knownMethods != null) && this.knownMethods.equals(rhs.knownMethods)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java new file mode 100644 index 00000000000..f2021587d47 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalInstrumentationModel.java @@ -0,0 +1,342 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "general", "cpp", "dotnet", "erlang", "go", "java", "js", "php", "python", "ruby", "rust", "swift" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("general") + private ExperimentalGeneralInstrumentationModel general; + + /** (Can be null) */ + @Nullable + @JsonProperty("cpp") + private ExperimentalLanguageSpecificInstrumentationModel cpp; + + /** (Can be null) */ + @Nullable + @JsonProperty("dotnet") + private ExperimentalLanguageSpecificInstrumentationModel dotnet; + + /** (Can be null) */ + @Nullable + @JsonProperty("erlang") + private ExperimentalLanguageSpecificInstrumentationModel erlang; + + /** (Can be null) */ + @Nullable + @JsonProperty("go") + private ExperimentalLanguageSpecificInstrumentationModel go; + + /** (Can be null) */ + @Nullable + @JsonProperty("java") + private ExperimentalLanguageSpecificInstrumentationModel java; + + /** (Can be null) */ + @Nullable + @JsonProperty("js") + private ExperimentalLanguageSpecificInstrumentationModel js; + + /** (Can be null) */ + @Nullable + @JsonProperty("php") + private ExperimentalLanguageSpecificInstrumentationModel php; + + /** (Can be null) */ + @Nullable + @JsonProperty("python") + private ExperimentalLanguageSpecificInstrumentationModel python; + + /** (Can be null) */ + @Nullable + @JsonProperty("ruby") + private ExperimentalLanguageSpecificInstrumentationModel ruby; + + /** (Can be null) */ + @Nullable + @JsonProperty("rust") + private ExperimentalLanguageSpecificInstrumentationModel rust; + + /** (Can be null) */ + @Nullable + @JsonProperty("swift") + private ExperimentalLanguageSpecificInstrumentationModel swift; + + @JsonProperty("general") + @Nullable + public ExperimentalGeneralInstrumentationModel getGeneral() { + return general; + } + + public ExperimentalInstrumentationModel withGeneral( + ExperimentalGeneralInstrumentationModel general) { + this.general = general; + return this; + } + + @JsonProperty("cpp") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getCpp() { + return cpp; + } + + public ExperimentalInstrumentationModel withCpp( + ExperimentalLanguageSpecificInstrumentationModel cpp) { + this.cpp = cpp; + return this; + } + + @JsonProperty("dotnet") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getDotnet() { + return dotnet; + } + + public ExperimentalInstrumentationModel withDotnet( + ExperimentalLanguageSpecificInstrumentationModel dotnet) { + this.dotnet = dotnet; + return this; + } + + @JsonProperty("erlang") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getErlang() { + return erlang; + } + + public ExperimentalInstrumentationModel withErlang( + ExperimentalLanguageSpecificInstrumentationModel erlang) { + this.erlang = erlang; + return this; + } + + @JsonProperty("go") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getGo() { + return go; + } + + public ExperimentalInstrumentationModel withGo( + ExperimentalLanguageSpecificInstrumentationModel go) { + this.go = go; + return this; + } + + @JsonProperty("java") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getJava() { + return java; + } + + public ExperimentalInstrumentationModel withJava( + ExperimentalLanguageSpecificInstrumentationModel java) { + this.java = java; + return this; + } + + @JsonProperty("js") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getJs() { + return js; + } + + public ExperimentalInstrumentationModel withJs( + ExperimentalLanguageSpecificInstrumentationModel js) { + this.js = js; + return this; + } + + @JsonProperty("php") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getPhp() { + return php; + } + + public ExperimentalInstrumentationModel withPhp( + ExperimentalLanguageSpecificInstrumentationModel php) { + this.php = php; + return this; + } + + @JsonProperty("python") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getPython() { + return python; + } + + public ExperimentalInstrumentationModel withPython( + ExperimentalLanguageSpecificInstrumentationModel python) { + this.python = python; + return this; + } + + @JsonProperty("ruby") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getRuby() { + return ruby; + } + + public ExperimentalInstrumentationModel withRuby( + ExperimentalLanguageSpecificInstrumentationModel ruby) { + this.ruby = ruby; + return this; + } + + @JsonProperty("rust") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getRust() { + return rust; + } + + public ExperimentalInstrumentationModel withRust( + ExperimentalLanguageSpecificInstrumentationModel rust) { + this.rust = rust; + return this; + } + + @JsonProperty("swift") + @Nullable + public ExperimentalLanguageSpecificInstrumentationModel getSwift() { + return swift; + } + + public ExperimentalInstrumentationModel withSwift( + ExperimentalLanguageSpecificInstrumentationModel swift) { + this.swift = swift; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("general"); + sb.append('='); + sb.append(((this.general == null) ? "" : this.general)); + sb.append(','); + sb.append("cpp"); + sb.append('='); + sb.append(((this.cpp == null) ? "" : this.cpp)); + sb.append(','); + sb.append("dotnet"); + sb.append('='); + sb.append(((this.dotnet == null) ? "" : this.dotnet)); + sb.append(','); + sb.append("erlang"); + sb.append('='); + sb.append(((this.erlang == null) ? "" : this.erlang)); + sb.append(','); + sb.append("go"); + sb.append('='); + sb.append(((this.go == null) ? "" : this.go)); + sb.append(','); + sb.append("java"); + sb.append('='); + sb.append(((this.java == null) ? "" : this.java)); + sb.append(','); + sb.append("js"); + sb.append('='); + sb.append(((this.js == null) ? "" : this.js)); + sb.append(','); + sb.append("php"); + sb.append('='); + sb.append(((this.php == null) ? "" : this.php)); + sb.append(','); + sb.append("python"); + sb.append('='); + sb.append(((this.python == null) ? "" : this.python)); + sb.append(','); + sb.append("ruby"); + sb.append('='); + sb.append(((this.ruby == null) ? "" : this.ruby)); + sb.append(','); + sb.append("rust"); + sb.append('='); + sb.append(((this.rust == null) ? "" : this.rust)); + sb.append(','); + sb.append("swift"); + sb.append('='); + sb.append(((this.swift == null) ? "" : this.swift)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.general == null) ? 0 : this.general.hashCode())); + result = ((result * 31) + ((this.rust == null) ? 0 : this.rust.hashCode())); + result = ((result * 31) + ((this.cpp == null) ? 0 : this.cpp.hashCode())); + result = ((result * 31) + ((this.python == null) ? 0 : this.python.hashCode())); + result = ((result * 31) + ((this.dotnet == null) ? 0 : this.dotnet.hashCode())); + result = ((result * 31) + ((this.java == null) ? 0 : this.java.hashCode())); + result = ((result * 31) + ((this.go == null) ? 0 : this.go.hashCode())); + result = ((result * 31) + ((this.erlang == null) ? 0 : this.erlang.hashCode())); + result = ((result * 31) + ((this.js == null) ? 0 : this.js.hashCode())); + result = ((result * 31) + ((this.php == null) ? 0 : this.php.hashCode())); + result = ((result * 31) + ((this.ruby == null) ? 0 : this.ruby.hashCode())); + result = ((result * 31) + ((this.swift == null) ? 0 : this.swift.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalInstrumentationModel) == false) { + return false; + } + ExperimentalInstrumentationModel rhs = ((ExperimentalInstrumentationModel) other); + return (((((((((((((this.general == rhs.general) + || ((this.general != null) + && this.general.equals(rhs.general))) + && ((this.rust == rhs.rust) + || ((this.rust != null) + && this.rust.equals(rhs.rust)))) + && ((this.cpp == rhs.cpp) + || ((this.cpp != null) + && this.cpp.equals(rhs.cpp)))) + && ((this.python == rhs.python) + || ((this.python != null) + && this.python.equals(rhs.python)))) + && ((this.dotnet == rhs.dotnet) + || ((this.dotnet != null) + && this.dotnet.equals(rhs.dotnet)))) + && ((this.java == rhs.java) + || ((this.java != null) && this.java.equals(rhs.java)))) + && ((this.go == rhs.go) + || ((this.go != null) && this.go.equals(rhs.go)))) + && ((this.erlang == rhs.erlang) + || ((this.erlang != null) && this.erlang.equals(rhs.erlang)))) + && ((this.js == rhs.js) || ((this.js != null) && this.js.equals(rhs.js)))) + && ((this.php == rhs.php) || ((this.php != null) && this.php.equals(rhs.php)))) + && ((this.ruby == rhs.ruby) || ((this.ruby != null) && this.ruby.equals(rhs.ruby)))) + && ((this.swift == rhs.swift) || ((this.swift != null) && this.swift.equals(rhs.swift)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java new file mode 100644 index 00000000000..53013412ee0 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalJaegerRemoteSamplerModel.java @@ -0,0 +1,147 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"endpoint", "interval", "initial_sampler"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalJaegerRemoteSamplerModel { + + /** + * Configure the endpoint of the jaeger remote sampling service. Property is required and must be + * non-null. + * + *

(Required) + */ + @JsonProperty("endpoint") + @JsonPropertyDescription( + "Configure the endpoint of the jaeger remote sampling service.\nProperty is required and must be non-null.\n") + @Nonnull + private String endpoint; + + /** + * Configure the polling interval (in milliseconds) to fetch from the remote sampling service. If + * omitted or null, 60000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("interval") + @JsonPropertyDescription( + "Configure the polling interval (in milliseconds) to fetch from the remote sampling service.\nIf omitted or null, 60000 is used.\n") + private Integer interval; + + /** (Required) */ + @JsonProperty("initial_sampler") + @Nonnull + private SamplerModel initialSampler; + + /** + * Configure the endpoint of the jaeger remote sampling service. Property is required and must be + * non-null. + * + *

(Required) + */ + @JsonProperty("endpoint") + @Nullable + public String getEndpoint() { + return endpoint; + } + + public ExperimentalJaegerRemoteSamplerModel withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Configure the polling interval (in milliseconds) to fetch from the remote sampling service. If + * omitted or null, 60000 is used. + */ + @JsonProperty("interval") + @Nullable + public Integer getInterval() { + return interval; + } + + public ExperimentalJaegerRemoteSamplerModel withInterval(Integer interval) { + this.interval = interval; + return this; + } + + /** (Required) */ + @JsonProperty("initial_sampler") + @Nullable + public SamplerModel getInitialSampler() { + return initialSampler; + } + + public ExperimentalJaegerRemoteSamplerModel withInitialSampler(SamplerModel initialSampler) { + this.initialSampler = initialSampler; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalJaegerRemoteSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("endpoint"); + sb.append('='); + sb.append(((this.endpoint == null) ? "" : this.endpoint)); + sb.append(','); + sb.append("interval"); + sb.append('='); + sb.append(((this.interval == null) ? "" : this.interval)); + sb.append(','); + sb.append("initialSampler"); + sb.append('='); + sb.append(((this.initialSampler == null) ? "" : this.initialSampler)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); + result = ((result * 31) + ((this.interval == null) ? 0 : this.interval.hashCode())); + result = ((result * 31) + ((this.initialSampler == null) ? 0 : this.initialSampler.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalJaegerRemoteSamplerModel) == false) { + return false; + } + ExperimentalJaegerRemoteSamplerModel rhs = ((ExperimentalJaegerRemoteSamplerModel) other); + return ((((this.endpoint == rhs.endpoint) + || ((this.endpoint != null) && this.endpoint.equals(rhs.endpoint))) + && ((this.interval == rhs.interval) + || ((this.interval != null) && this.interval.equals(rhs.interval)))) + && ((this.initialSampler == rhs.initialSampler) + || ((this.initialSampler != null) && this.initialSampler.equals(rhs.initialSampler)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java new file mode 100644 index 00000000000..dc0f7712161 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationModel.java @@ -0,0 +1,88 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalLanguageSpecificInstrumentationModel { + + @JsonIgnore + private Map + additionalProperties = + new LinkedHashMap(); + + @JsonAnyGetter + public Map + getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty( + String name, ExperimentalLanguageSpecificInstrumentationPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public ExperimentalLanguageSpecificInstrumentationModel withAdditionalProperty( + String name, ExperimentalLanguageSpecificInstrumentationPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalLanguageSpecificInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalLanguageSpecificInstrumentationModel) == false) { + return false; + } + ExperimentalLanguageSpecificInstrumentationModel rhs = + ((ExperimentalLanguageSpecificInstrumentationModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java new file mode 100644 index 00000000000..8f4d865ed88 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLanguageSpecificInstrumentationPropertyModel.java @@ -0,0 +1,84 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalLanguageSpecificInstrumentationPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public ExperimentalLanguageSpecificInstrumentationPropertyModel withAdditionalProperty( + String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalLanguageSpecificInstrumentationPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalLanguageSpecificInstrumentationPropertyModel) == false) { + return false; + } + ExperimentalLanguageSpecificInstrumentationPropertyModel rhs = + ((ExperimentalLanguageSpecificInstrumentationPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java new file mode 100644 index 00000000000..e6400c850aa --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfigModel.java @@ -0,0 +1,144 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"enabled", "minimum_severity", "trace_based"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalLoggerConfigModel { + + /** + * Configure if the logger is enabled or not. If omitted or null, true is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("enabled") + @JsonPropertyDescription( + "Configure if the logger is enabled or not.\nIf omitted or null, true is used.\n") + private Boolean enabled; + + /** (Can be null) */ + @Nullable + @JsonProperty("minimum_severity") + private OpenTelemetryConfigurationModel.SeverityNumber minimumSeverity; + + /** + * Configure trace based filtering. If true, log records associated with unsampled trace contexts + * traces are not processed. If false, or if a log record is not associated with a trace context, + * trace based filtering is not applied. If omitted or null, trace based filtering is not applied. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("trace_based") + @JsonPropertyDescription( + "Configure trace based filtering.\nIf true, log records associated with unsampled trace contexts traces are not processed. If false, or if a log record is not associated with a trace context, trace based filtering is not applied.\nIf omitted or null, trace based filtering is not applied.\n") + private Boolean traceBased; + + /** Configure if the logger is enabled or not. If omitted or null, true is used. */ + @JsonProperty("enabled") + @Nullable + public Boolean getEnabled() { + return enabled; + } + + public ExperimentalLoggerConfigModel withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + @JsonProperty("minimum_severity") + @Nullable + public OpenTelemetryConfigurationModel.SeverityNumber getMinimumSeverity() { + return minimumSeverity; + } + + public ExperimentalLoggerConfigModel withMinimumSeverity( + OpenTelemetryConfigurationModel.SeverityNumber minimumSeverity) { + this.minimumSeverity = minimumSeverity; + return this; + } + + /** + * Configure trace based filtering. If true, log records associated with unsampled trace contexts + * traces are not processed. If false, or if a log record is not associated with a trace context, + * trace based filtering is not applied. If omitted or null, trace based filtering is not applied. + */ + @JsonProperty("trace_based") + @Nullable + public Boolean getTraceBased() { + return traceBased; + } + + public ExperimentalLoggerConfigModel withTraceBased(Boolean traceBased) { + this.traceBased = traceBased; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalLoggerConfigModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("enabled"); + sb.append('='); + sb.append(((this.enabled == null) ? "" : this.enabled)); + sb.append(','); + sb.append("minimumSeverity"); + sb.append('='); + sb.append(((this.minimumSeverity == null) ? "" : this.minimumSeverity)); + sb.append(','); + sb.append("traceBased"); + sb.append('='); + sb.append(((this.traceBased == null) ? "" : this.traceBased)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.enabled == null) ? 0 : this.enabled.hashCode())); + result = + ((result * 31) + ((this.minimumSeverity == null) ? 0 : this.minimumSeverity.hashCode())); + result = ((result * 31) + ((this.traceBased == null) ? 0 : this.traceBased.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalLoggerConfigModel) == false) { + return false; + } + ExperimentalLoggerConfigModel rhs = ((ExperimentalLoggerConfigModel) other); + return ((((this.enabled == rhs.enabled) + || ((this.enabled != null) && this.enabled.equals(rhs.enabled))) + && ((this.minimumSeverity == rhs.minimumSeverity) + || ((this.minimumSeverity != null) + && this.minimumSeverity.equals(rhs.minimumSeverity)))) + && ((this.traceBased == rhs.traceBased) + || ((this.traceBased != null) && this.traceBased.equals(rhs.traceBased)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java new file mode 100644 index 00000000000..7f1f9a8d44b --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerConfiguratorModel.java @@ -0,0 +1,107 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"default_config", "loggers"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalLoggerConfiguratorModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("default_config") + private ExperimentalLoggerConfigModel defaultConfig; + + /** + * Configure loggers. If omitted, all loggers use .default_config. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("loggers") + @JsonPropertyDescription("Configure loggers.\nIf omitted, all loggers use .default_config.\n") + private List loggers; + + @JsonProperty("default_config") + @Nullable + public ExperimentalLoggerConfigModel getDefaultConfig() { + return defaultConfig; + } + + public ExperimentalLoggerConfiguratorModel withDefaultConfig( + ExperimentalLoggerConfigModel defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + /** Configure loggers. If omitted, all loggers use .default_config. */ + @JsonProperty("loggers") + @Nullable + public List getLoggers() { + return loggers; + } + + public ExperimentalLoggerConfiguratorModel withLoggers( + List loggers) { + this.loggers = loggers; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalLoggerConfiguratorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("defaultConfig"); + sb.append('='); + sb.append(((this.defaultConfig == null) ? "" : this.defaultConfig)); + sb.append(','); + sb.append("loggers"); + sb.append('='); + sb.append(((this.loggers == null) ? "" : this.loggers)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.loggers == null) ? 0 : this.loggers.hashCode())); + result = ((result * 31) + ((this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalLoggerConfiguratorModel) == false) { + return false; + } + ExperimentalLoggerConfiguratorModel rhs = ((ExperimentalLoggerConfiguratorModel) other); + return (((this.loggers == rhs.loggers) + || ((this.loggers != null) && this.loggers.equals(rhs.loggers))) + && ((this.defaultConfig == rhs.defaultConfig) + || ((this.defaultConfig != null) && this.defaultConfig.equals(rhs.defaultConfig)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java new file mode 100644 index 00000000000..fd4ff99b648 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalLoggerMatcherAndConfigModel.java @@ -0,0 +1,118 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"name", "config"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalLoggerMatcherAndConfigModel { + + /** + * Configure logger names to match, evaluated as follows: + * + *

* If the logger name exactly matches. * If the logger name matches the wildcard pattern, + * where '?' matches any single character and '*' matches any number of characters including none. + * Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @JsonPropertyDescription( + "Configure logger names to match, evaluated as follows:\n\n * If the logger name exactly matches.\n * If the logger name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nProperty is required and must be non-null.\n") + @Nonnull + private String name; + + /** (Required) */ + @JsonProperty("config") + @Nonnull + private ExperimentalLoggerConfigModel config; + + /** + * Configure logger names to match, evaluated as follows: + * + *

* If the logger name exactly matches. * If the logger name matches the wildcard pattern, + * where '?' matches any single character and '*' matches any number of characters including none. + * Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @Nullable + public String getName() { + return name; + } + + public ExperimentalLoggerMatcherAndConfigModel withName(String name) { + this.name = name; + return this; + } + + /** (Required) */ + @JsonProperty("config") + @Nullable + public ExperimentalLoggerConfigModel getConfig() { + return config; + } + + public ExperimentalLoggerMatcherAndConfigModel withConfig(ExperimentalLoggerConfigModel config) { + this.config = config; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalLoggerMatcherAndConfigModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null) ? "" : this.name)); + sb.append(','); + sb.append("config"); + sb.append('='); + sb.append(((this.config == null) ? "" : this.config)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); + result = ((result * 31) + ((this.config == null) ? 0 : this.config.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalLoggerMatcherAndConfigModel) == false) { + return false; + } + ExperimentalLoggerMatcherAndConfigModel rhs = ((ExperimentalLoggerMatcherAndConfigModel) other); + return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) + && ((this.config == rhs.config) + || ((this.config != null) && this.config.equals(rhs.config)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java new file mode 100644 index 00000000000..2947053db44 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMessagingInstrumentationModel.java @@ -0,0 +1,76 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"semconv"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalMessagingInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("semconv") + private ExperimentalSemconvConfigModel semconv; + + @JsonProperty("semconv") + @Nullable + public ExperimentalSemconvConfigModel getSemconv() { + return semconv; + } + + public ExperimentalMessagingInstrumentationModel withSemconv( + ExperimentalSemconvConfigModel semconv) { + this.semconv = semconv; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalMessagingInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("semconv"); + sb.append('='); + sb.append(((this.semconv == null) ? "" : this.semconv)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalMessagingInstrumentationModel) == false) { + return false; + } + ExperimentalMessagingInstrumentationModel rhs = + ((ExperimentalMessagingInstrumentationModel) other); + return ((this.semconv == rhs.semconv) + || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java new file mode 100644 index 00000000000..71ec5118d41 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfigModel.java @@ -0,0 +1,81 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"enabled"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalMeterConfigModel { + + /** + * Configure if the meter is enabled or not. If omitted, true is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("enabled") + @JsonPropertyDescription("Configure if the meter is enabled or not.\nIf omitted, true is used.\n") + private Boolean enabled; + + /** Configure if the meter is enabled or not. If omitted, true is used. */ + @JsonProperty("enabled") + @Nullable + public Boolean getEnabled() { + return enabled; + } + + public ExperimentalMeterConfigModel withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalMeterConfigModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("enabled"); + sb.append('='); + sb.append(((this.enabled == null) ? "" : this.enabled)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.enabled == null) ? 0 : this.enabled.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalMeterConfigModel) == false) { + return false; + } + ExperimentalMeterConfigModel rhs = ((ExperimentalMeterConfigModel) other); + return ((this.enabled == rhs.enabled) + || ((this.enabled != null) && this.enabled.equals(rhs.enabled))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java new file mode 100644 index 00000000000..c224da4e51a --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterConfiguratorModel.java @@ -0,0 +1,107 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"default_config", "meters"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalMeterConfiguratorModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("default_config") + private ExperimentalMeterConfigModel defaultConfig; + + /** + * Configure meters. If omitted, all meters used .default_config. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("meters") + @JsonPropertyDescription("Configure meters.\nIf omitted, all meters used .default_config.\n") + private List meters; + + @JsonProperty("default_config") + @Nullable + public ExperimentalMeterConfigModel getDefaultConfig() { + return defaultConfig; + } + + public ExperimentalMeterConfiguratorModel withDefaultConfig( + ExperimentalMeterConfigModel defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + /** Configure meters. If omitted, all meters used .default_config. */ + @JsonProperty("meters") + @Nullable + public List getMeters() { + return meters; + } + + public ExperimentalMeterConfiguratorModel withMeters( + List meters) { + this.meters = meters; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalMeterConfiguratorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("defaultConfig"); + sb.append('='); + sb.append(((this.defaultConfig == null) ? "" : this.defaultConfig)); + sb.append(','); + sb.append("meters"); + sb.append('='); + sb.append(((this.meters == null) ? "" : this.meters)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode())); + result = ((result * 31) + ((this.meters == null) ? 0 : this.meters.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalMeterConfiguratorModel) == false) { + return false; + } + ExperimentalMeterConfiguratorModel rhs = ((ExperimentalMeterConfiguratorModel) other); + return (((this.defaultConfig == rhs.defaultConfig) + || ((this.defaultConfig != null) && this.defaultConfig.equals(rhs.defaultConfig))) + && ((this.meters == rhs.meters) + || ((this.meters != null) && this.meters.equals(rhs.meters)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java new file mode 100644 index 00000000000..9b2b18b8753 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalMeterMatcherAndConfigModel.java @@ -0,0 +1,118 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"name", "config"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalMeterMatcherAndConfigModel { + + /** + * Configure meter names to match, evaluated as follows: + * + *

* If the meter name exactly matches. * If the meter name matches the wildcard pattern, where + * '?' matches any single character and '*' matches any number of characters including none. + * Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @JsonPropertyDescription( + "Configure meter names to match, evaluated as follows:\n\n * If the meter name exactly matches.\n * If the meter name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nProperty is required and must be non-null.\n") + @Nonnull + private String name; + + /** (Required) */ + @JsonProperty("config") + @Nonnull + private ExperimentalMeterConfigModel config; + + /** + * Configure meter names to match, evaluated as follows: + * + *

* If the meter name exactly matches. * If the meter name matches the wildcard pattern, where + * '?' matches any single character and '*' matches any number of characters including none. + * Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @Nullable + public String getName() { + return name; + } + + public ExperimentalMeterMatcherAndConfigModel withName(String name) { + this.name = name; + return this; + } + + /** (Required) */ + @JsonProperty("config") + @Nullable + public ExperimentalMeterConfigModel getConfig() { + return config; + } + + public ExperimentalMeterMatcherAndConfigModel withConfig(ExperimentalMeterConfigModel config) { + this.config = config; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalMeterMatcherAndConfigModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null) ? "" : this.name)); + sb.append(','); + sb.append("config"); + sb.append('='); + sb.append(((this.config == null) ? "" : this.config)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); + result = ((result * 31) + ((this.config == null) ? 0 : this.config.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalMeterMatcherAndConfigModel) == false) { + return false; + } + ExperimentalMeterMatcherAndConfigModel rhs = ((ExperimentalMeterMatcherAndConfigModel) other); + return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) + && ((this.config == rhs.config) + || ((this.config != null) && this.config.equals(rhs.config)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java new file mode 100644 index 00000000000..27f052b37d4 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileExporterModel.java @@ -0,0 +1,86 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"output_stream"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalOtlpFileExporterModel { + + /** + * Configure output stream. Values include stdout, or scheme+destination. For example: + * file:///path/to/file.jsonl. If omitted or null, stdout is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("output_stream") + @JsonPropertyDescription( + "Configure output stream. \nValues include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.\nIf omitted or null, stdout is used.\n") + private String outputStream; + + /** + * Configure output stream. Values include stdout, or scheme+destination. For example: + * file:///path/to/file.jsonl. If omitted or null, stdout is used. + */ + @JsonProperty("output_stream") + @Nullable + public String getOutputStream() { + return outputStream; + } + + public ExperimentalOtlpFileExporterModel withOutputStream(String outputStream) { + this.outputStream = outputStream; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalOtlpFileExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("outputStream"); + sb.append('='); + sb.append(((this.outputStream == null) ? "" : this.outputStream)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.outputStream == null) ? 0 : this.outputStream.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalOtlpFileExporterModel) == false) { + return false; + } + ExperimentalOtlpFileExporterModel rhs = ((ExperimentalOtlpFileExporterModel) other); + return ((this.outputStream == rhs.outputStream) + || ((this.outputStream != null) && this.outputStream.equals(rhs.outputStream))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java new file mode 100644 index 00000000000..9cd334a6392 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalOtlpFileMetricExporterModel.java @@ -0,0 +1,145 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"output_stream", "temporality_preference", "default_histogram_aggregation"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalOtlpFileMetricExporterModel { + + /** + * Configure output stream. Values include stdout, or scheme+destination. For example: + * file:///path/to/file.jsonl. If omitted or null, stdout is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("output_stream") + @JsonPropertyDescription( + "Configure output stream. \nValues include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.\nIf omitted or null, stdout is used.\n") + private String outputStream; + + /** (Can be null) */ + @Nullable + @JsonProperty("temporality_preference") + private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; + + /** (Can be null) */ + @Nullable + @JsonProperty("default_histogram_aggregation") + private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + defaultHistogramAggregation; + + /** + * Configure output stream. Values include stdout, or scheme+destination. For example: + * file:///path/to/file.jsonl. If omitted or null, stdout is used. + */ + @JsonProperty("output_stream") + @Nullable + public String getOutputStream() { + return outputStream; + } + + public ExperimentalOtlpFileMetricExporterModel withOutputStream(String outputStream) { + this.outputStream = outputStream; + return this; + } + + @JsonProperty("temporality_preference") + @Nullable + public OtlpHttpMetricExporterModel.ExporterTemporalityPreference getTemporalityPreference() { + return temporalityPreference; + } + + public ExperimentalOtlpFileMetricExporterModel withTemporalityPreference( + OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference) { + this.temporalityPreference = temporalityPreference; + return this; + } + + @JsonProperty("default_histogram_aggregation") + @Nullable + public OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + getDefaultHistogramAggregation() { + return defaultHistogramAggregation; + } + + public ExperimentalOtlpFileMetricExporterModel withDefaultHistogramAggregation( + OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation) { + this.defaultHistogramAggregation = defaultHistogramAggregation; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalOtlpFileMetricExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("outputStream"); + sb.append('='); + sb.append(((this.outputStream == null) ? "" : this.outputStream)); + sb.append(','); + sb.append("temporalityPreference"); + sb.append('='); + sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); + sb.append(','); + sb.append("defaultHistogramAggregation"); + sb.append('='); + sb.append( + ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); + result = ((result * 31) + ((this.outputStream == null) ? 0 : this.outputStream.hashCode())); + result = + ((result * 31) + + ((this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalOtlpFileMetricExporterModel) == false) { + return false; + } + ExperimentalOtlpFileMetricExporterModel rhs = ((ExperimentalOtlpFileMetricExporterModel) other); + return ((((this.temporalityPreference == rhs.temporalityPreference) + || ((this.temporalityPreference != null) + && this.temporalityPreference.equals(rhs.temporalityPreference))) + && ((this.outputStream == rhs.outputStream) + || ((this.outputStream != null) && this.outputStream.equals(rhs.outputStream)))) + && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) + || ((this.defaultHistogramAggregation != null) + && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java new file mode 100644 index 00000000000..58aca807e93 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProbabilitySamplerModel.java @@ -0,0 +1,80 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"ratio"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalProbabilitySamplerModel { + + /** + * Configure ratio. If omitted or null, 1.0 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("ratio") + @JsonPropertyDescription("Configure ratio.\nIf omitted or null, 1.0 is used.\n") + private Double ratio; + + /** Configure ratio. If omitted or null, 1.0 is used. */ + @JsonProperty("ratio") + @Nullable + public Double getRatio() { + return ratio; + } + + public ExperimentalProbabilitySamplerModel withRatio(Double ratio) { + this.ratio = ratio; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalProbabilitySamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("ratio"); + sb.append('='); + sb.append(((this.ratio == null) ? "" : this.ratio)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.ratio == null) ? 0 : this.ratio.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalProbabilitySamplerModel) == false) { + return false; + } + ExperimentalProbabilitySamplerModel rhs = ((ExperimentalProbabilitySamplerModel) other); + return ((this.ratio == rhs.ratio) || ((this.ratio != null) && this.ratio.equals(rhs.ratio))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java new file mode 100644 index 00000000000..15cd06a56dd --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalProcessResourceDetectorModel.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalProcessResourceDetectorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalProcessResourceDetectorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalProcessResourceDetectorModel) == false) { + return false; + } + ExperimentalProcessResourceDetectorModel rhs = + ((ExperimentalProcessResourceDetectorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java new file mode 100644 index 00000000000..b2aae00650e --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalPrometheusMetricExporterModel.java @@ -0,0 +1,314 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "host", + "port", + "without_scope_info", + "without_target_info/development", + "with_resource_constant_labels", + "translation_strategy" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalPrometheusMetricExporterModel { + + /** + * Configure host. If omitted or null, localhost is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("host") + @JsonPropertyDescription("Configure host.\nIf omitted or null, localhost is used.\n") + private String host; + + /** + * Configure port. If omitted or null, 9464 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("port") + @JsonPropertyDescription("Configure port.\nIf omitted or null, 9464 is used.\n") + private Integer port; + + /** + * Configure Prometheus Exporter to produce metrics without scope labels. If omitted or null, + * false is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("without_scope_info") + @JsonPropertyDescription( + "Configure Prometheus Exporter to produce metrics without scope labels.\nIf omitted or null, false is used.\n") + private Boolean withoutScopeInfo; + + /** + * Configure Prometheus Exporter to produce metrics without a target info metric for the resource. + * If omitted or null, false is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("without_target_info/development") + @JsonPropertyDescription( + "Configure Prometheus Exporter to produce metrics without a target info metric for the resource.\nIf omitted or null, false is used.\n") + private Boolean withoutTargetInfoDevelopment; + + /** (Can be null) */ + @Nullable + @JsonProperty("with_resource_constant_labels") + private IncludeExcludeModel withResourceConstantLabels; + + /** (Can be null) */ + @Nullable + @JsonProperty("translation_strategy") + private ExperimentalPrometheusMetricExporterModel.ExperimentalPrometheusTranslationStrategy + translationStrategy; + + /** Configure host. If omitted or null, localhost is used. */ + @JsonProperty("host") + @Nullable + public String getHost() { + return host; + } + + public ExperimentalPrometheusMetricExporterModel withHost(String host) { + this.host = host; + return this; + } + + /** Configure port. If omitted or null, 9464 is used. */ + @JsonProperty("port") + @Nullable + public Integer getPort() { + return port; + } + + public ExperimentalPrometheusMetricExporterModel withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Configure Prometheus Exporter to produce metrics without scope labels. If omitted or null, + * false is used. + */ + @JsonProperty("without_scope_info") + @Nullable + public Boolean getWithoutScopeInfo() { + return withoutScopeInfo; + } + + public ExperimentalPrometheusMetricExporterModel withWithoutScopeInfo(Boolean withoutScopeInfo) { + this.withoutScopeInfo = withoutScopeInfo; + return this; + } + + /** + * Configure Prometheus Exporter to produce metrics without a target info metric for the resource. + * If omitted or null, false is used. + */ + @JsonProperty("without_target_info/development") + @Nullable + public Boolean getWithoutTargetInfoDevelopment() { + return withoutTargetInfoDevelopment; + } + + public ExperimentalPrometheusMetricExporterModel withWithoutTargetInfoDevelopment( + Boolean withoutTargetInfoDevelopment) { + this.withoutTargetInfoDevelopment = withoutTargetInfoDevelopment; + return this; + } + + @JsonProperty("with_resource_constant_labels") + @Nullable + public IncludeExcludeModel getWithResourceConstantLabels() { + return withResourceConstantLabels; + } + + public ExperimentalPrometheusMetricExporterModel withWithResourceConstantLabels( + IncludeExcludeModel withResourceConstantLabels) { + this.withResourceConstantLabels = withResourceConstantLabels; + return this; + } + + @JsonProperty("translation_strategy") + @Nullable + public ExperimentalPrometheusMetricExporterModel.ExperimentalPrometheusTranslationStrategy + getTranslationStrategy() { + return translationStrategy; + } + + public ExperimentalPrometheusMetricExporterModel withTranslationStrategy( + ExperimentalPrometheusMetricExporterModel.ExperimentalPrometheusTranslationStrategy + translationStrategy) { + this.translationStrategy = translationStrategy; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalPrometheusMetricExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("host"); + sb.append('='); + sb.append(((this.host == null) ? "" : this.host)); + sb.append(','); + sb.append("port"); + sb.append('='); + sb.append(((this.port == null) ? "" : this.port)); + sb.append(','); + sb.append("withoutScopeInfo"); + sb.append('='); + sb.append(((this.withoutScopeInfo == null) ? "" : this.withoutScopeInfo)); + sb.append(','); + sb.append("withoutTargetInfoDevelopment"); + sb.append('='); + sb.append( + ((this.withoutTargetInfoDevelopment == null) + ? "" + : this.withoutTargetInfoDevelopment)); + sb.append(','); + sb.append("withResourceConstantLabels"); + sb.append('='); + sb.append( + ((this.withResourceConstantLabels == null) ? "" : this.withResourceConstantLabels)); + sb.append(','); + sb.append("translationStrategy"); + sb.append('='); + sb.append(((this.translationStrategy == null) ? "" : this.translationStrategy)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.host == null) ? 0 : this.host.hashCode())); + result = + ((result * 31) + ((this.withoutScopeInfo == null) ? 0 : this.withoutScopeInfo.hashCode())); + result = ((result * 31) + ((this.port == null) ? 0 : this.port.hashCode())); + result = + ((result * 31) + + ((this.withoutTargetInfoDevelopment == null) + ? 0 + : this.withoutTargetInfoDevelopment.hashCode())); + result = + ((result * 31) + + ((this.withResourceConstantLabels == null) + ? 0 + : this.withResourceConstantLabels.hashCode())); + result = + ((result * 31) + + ((this.translationStrategy == null) ? 0 : this.translationStrategy.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalPrometheusMetricExporterModel) == false) { + return false; + } + ExperimentalPrometheusMetricExporterModel rhs = + ((ExperimentalPrometheusMetricExporterModel) other); + return (((((((this.host == rhs.host) || ((this.host != null) && this.host.equals(rhs.host))) + && ((this.withoutScopeInfo == rhs.withoutScopeInfo) + || ((this.withoutScopeInfo != null) + && this.withoutScopeInfo.equals(rhs.withoutScopeInfo)))) + && ((this.port == rhs.port) + || ((this.port != null) && this.port.equals(rhs.port)))) + && ((this.withoutTargetInfoDevelopment == rhs.withoutTargetInfoDevelopment) + || ((this.withoutTargetInfoDevelopment != null) + && this.withoutTargetInfoDevelopment.equals( + rhs.withoutTargetInfoDevelopment)))) + && ((this.withResourceConstantLabels == rhs.withResourceConstantLabels) + || ((this.withResourceConstantLabels != null) + && this.withResourceConstantLabels.equals(rhs.withResourceConstantLabels)))) + && ((this.translationStrategy == rhs.translationStrategy) + || ((this.translationStrategy != null) + && this.translationStrategy.equals(rhs.translationStrategy)))); + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum ExperimentalPrometheusTranslationStrategy { + UNDERSCORE_ESCAPING_WITH_SUFFIXES("underscore_escaping_with_suffixes"), + UNDERSCORE_ESCAPING_WITHOUT_SUFFIXES_DEVELOPMENT( + "underscore_escaping_without_suffixes/development"), + NO_UTF_8_ESCAPING_WITH_SUFFIXES_DEVELOPMENT("no_utf8_escaping_with_suffixes/development"), + NO_TRANSLATION_DEVELOPMENT("no_translation/development"); + private final String value; + private static final Map< + String, + ExperimentalPrometheusMetricExporterModel.ExperimentalPrometheusTranslationStrategy> + CONSTANTS = + new HashMap< + String, + ExperimentalPrometheusMetricExporterModel + .ExperimentalPrometheusTranslationStrategy>(); + + static { + for (ExperimentalPrometheusMetricExporterModel.ExperimentalPrometheusTranslationStrategy c : + values()) { + CONSTANTS.put(c.value, c); + } + } + + ExperimentalPrometheusTranslationStrategy(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static ExperimentalPrometheusMetricExporterModel + .ExperimentalPrometheusTranslationStrategy + fromValue(String value) { + ExperimentalPrometheusMetricExporterModel.ExperimentalPrometheusTranslationStrategy constant = + CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java new file mode 100644 index 00000000000..67436340b48 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectionModel.java @@ -0,0 +1,113 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"attributes", "detectors"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalResourceDetectionModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("attributes") + private IncludeExcludeModel attributes; + + /** + * Configure resource detectors. Resource detector names are dependent on the SDK language + * ecosystem. Please consult documentation for each respective language. If omitted, no resource + * detectors are enabled. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("detectors") + @JsonPropertyDescription( + "Configure resource detectors.\nResource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language. \nIf omitted, no resource detectors are enabled.\n") + private List detectors; + + @JsonProperty("attributes") + @Nullable + public IncludeExcludeModel getAttributes() { + return attributes; + } + + public ExperimentalResourceDetectionModel withAttributes(IncludeExcludeModel attributes) { + this.attributes = attributes; + return this; + } + + /** + * Configure resource detectors. Resource detector names are dependent on the SDK language + * ecosystem. Please consult documentation for each respective language. If omitted, no resource + * detectors are enabled. + */ + @JsonProperty("detectors") + @Nullable + public List getDetectors() { + return detectors; + } + + public ExperimentalResourceDetectionModel withDetectors( + List detectors) { + this.detectors = detectors; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalResourceDetectionModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("attributes"); + sb.append('='); + sb.append(((this.attributes == null) ? "" : this.attributes)); + sb.append(','); + sb.append("detectors"); + sb.append('='); + sb.append(((this.detectors == null) ? "" : this.detectors)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.attributes == null) ? 0 : this.attributes.hashCode())); + result = ((result * 31) + ((this.detectors == null) ? 0 : this.detectors.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalResourceDetectionModel) == false) { + return false; + } + ExperimentalResourceDetectionModel rhs = ((ExperimentalResourceDetectionModel) other); + return (((this.attributes == rhs.attributes) + || ((this.attributes != null) && this.attributes.equals(rhs.attributes))) + && ((this.detectors == rhs.detectors) + || ((this.detectors != null) && this.detectors.equals(rhs.detectors)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java new file mode 100644 index 00000000000..e6741245c35 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorModel.java @@ -0,0 +1,181 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"container", "host", "process", "service"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalResourceDetectorModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("container") + private ExperimentalContainerResourceDetectorModel container; + + /** (Can be null) */ + @Nullable + @JsonProperty("host") + private ExperimentalHostResourceDetectorModel host; + + /** (Can be null) */ + @Nullable + @JsonProperty("process") + private ExperimentalProcessResourceDetectorModel process; + + /** (Can be null) */ + @Nullable + @JsonProperty("service") + private ExperimentalServiceResourceDetectorModel service; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("container") + @Nullable + public ExperimentalContainerResourceDetectorModel getContainer() { + return container; + } + + public ExperimentalResourceDetectorModel withContainer( + ExperimentalContainerResourceDetectorModel container) { + this.container = container; + return this; + } + + @JsonProperty("host") + @Nullable + public ExperimentalHostResourceDetectorModel getHost() { + return host; + } + + public ExperimentalResourceDetectorModel withHost(ExperimentalHostResourceDetectorModel host) { + this.host = host; + return this; + } + + @JsonProperty("process") + @Nullable + public ExperimentalProcessResourceDetectorModel getProcess() { + return process; + } + + public ExperimentalResourceDetectorModel withProcess( + ExperimentalProcessResourceDetectorModel process) { + this.process = process; + return this; + } + + @JsonProperty("service") + @Nullable + public ExperimentalServiceResourceDetectorModel getService() { + return service; + } + + public ExperimentalResourceDetectorModel withService( + ExperimentalServiceResourceDetectorModel service) { + this.service = service; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, ExperimentalResourceDetectorPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public ExperimentalResourceDetectorModel withAdditionalProperty( + String name, ExperimentalResourceDetectorPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalResourceDetectorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("container"); + sb.append('='); + sb.append(((this.container == null) ? "" : this.container)); + sb.append(','); + sb.append("host"); + sb.append('='); + sb.append(((this.host == null) ? "" : this.host)); + sb.append(','); + sb.append("process"); + sb.append('='); + sb.append(((this.process == null) ? "" : this.process)); + sb.append(','); + sb.append("service"); + sb.append('='); + sb.append(((this.service == null) ? "" : this.service)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.container == null) ? 0 : this.container.hashCode())); + result = ((result * 31) + ((this.host == null) ? 0 : this.host.hashCode())); + result = ((result * 31) + ((this.process == null) ? 0 : this.process.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.service == null) ? 0 : this.service.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalResourceDetectorModel) == false) { + return false; + } + ExperimentalResourceDetectorModel rhs = ((ExperimentalResourceDetectorModel) other); + return ((((((this.container == rhs.container) + || ((this.container != null) && this.container.equals(rhs.container))) + && ((this.host == rhs.host) + || ((this.host != null) && this.host.equals(rhs.host)))) + && ((this.process == rhs.process) + || ((this.process != null) && this.process.equals(rhs.process)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.service == rhs.service) + || ((this.service != null) && this.service.equals(rhs.service)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java new file mode 100644 index 00000000000..61e7284a37e --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalResourceDetectorPropertyModel.java @@ -0,0 +1,84 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalResourceDetectorPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public ExperimentalResourceDetectorPropertyModel withAdditionalProperty( + String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalResourceDetectorPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalResourceDetectorPropertyModel) == false) { + return false; + } + ExperimentalResourceDetectorPropertyModel rhs = + ((ExperimentalResourceDetectorPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java new file mode 100644 index 00000000000..f8c1264789d --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalRpcInstrumentationModel.java @@ -0,0 +1,74 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"semconv"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalRpcInstrumentationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("semconv") + private ExperimentalSemconvConfigModel semconv; + + @JsonProperty("semconv") + @Nullable + public ExperimentalSemconvConfigModel getSemconv() { + return semconv; + } + + public ExperimentalRpcInstrumentationModel withSemconv(ExperimentalSemconvConfigModel semconv) { + this.semconv = semconv; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalRpcInstrumentationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("semconv"); + sb.append('='); + sb.append(((this.semconv == null) ? "" : this.semconv)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.semconv == null) ? 0 : this.semconv.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalRpcInstrumentationModel) == false) { + return false; + } + ExperimentalRpcInstrumentationModel rhs = ((ExperimentalRpcInstrumentationModel) other); + return ((this.semconv == rhs.semconv) + || ((this.semconv != null) && this.semconv.equals(rhs.semconv))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java new file mode 100644 index 00000000000..b9eca3640bf --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSanitizationModel.java @@ -0,0 +1,73 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"url"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalSanitizationModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("url") + private ExperimentalUrlSanitizationModel url; + + @JsonProperty("url") + @Nullable + public ExperimentalUrlSanitizationModel getUrl() { + return url; + } + + public ExperimentalSanitizationModel withUrl(ExperimentalUrlSanitizationModel url) { + this.url = url; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalSanitizationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("url"); + sb.append('='); + sb.append(((this.url == null) ? "" : this.url)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.url == null) ? 0 : this.url.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalSanitizationModel) == false) { + return false; + } + ExperimentalSanitizationModel rhs = ((ExperimentalSanitizationModel) other); + return ((this.url == rhs.url) || ((this.url != null) && this.url.equals(rhs.url))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java new file mode 100644 index 00000000000..79653772ac1 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSemconvConfigModel.java @@ -0,0 +1,164 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"version", "experimental", "dual_emit"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalSemconvConfigModel { + + /** + * The target semantic convention version for this domain (e.g., 1). If omitted or null, the + * latest stable version is used, or if no stable version is available and .experimental is true + * then the latest experimental version is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("version") + @JsonPropertyDescription( + "The target semantic convention version for this domain (e.g., 1).\nIf omitted or null, the latest stable version is used, or if no stable version is available and .experimental is true then the latest experimental version is used.\n") + private Integer version; + + /** + * Use latest experimental semantic conventions (before stable is available or to enable + * experimental features on top of stable conventions). If omitted or null, false is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("experimental") + @JsonPropertyDescription( + "Use latest experimental semantic conventions (before stable is available or to enable experimental features on top of stable conventions).\nIf omitted or null, false is used.\n") + private Boolean experimental; + + /** + * When true, also emit the previous major version alongside the target version. For version=1, + * the previous version refers to the pre-stable conventions that the instrumentation emitted + * before the first stable semantic convention version was defined. For version=2 and above, the + * previous version is the prior stable major version (e.g., version=2, dual_emit=true emits both + * v2 and v1). Enables dual-emit for phased migration between versions. If omitted or null, false + * is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("dual_emit") + @JsonPropertyDescription( + "When true, also emit the previous major version alongside the target version.\nFor version=1, the previous version refers to the pre-stable conventions that the instrumentation emitted before the first stable semantic convention version was defined.\nFor version=2 and above, the previous version is the prior stable major version (e.g., version=2, dual_emit=true emits both v2 and v1).\nEnables dual-emit for phased migration between versions.\nIf omitted or null, false is used.\n") + private Boolean dualEmit; + + /** + * The target semantic convention version for this domain (e.g., 1). If omitted or null, the + * latest stable version is used, or if no stable version is available and .experimental is true + * then the latest experimental version is used. + */ + @JsonProperty("version") + @Nullable + public Integer getVersion() { + return version; + } + + public ExperimentalSemconvConfigModel withVersion(Integer version) { + this.version = version; + return this; + } + + /** + * Use latest experimental semantic conventions (before stable is available or to enable + * experimental features on top of stable conventions). If omitted or null, false is used. + */ + @JsonProperty("experimental") + @Nullable + public Boolean getExperimental() { + return experimental; + } + + public ExperimentalSemconvConfigModel withExperimental(Boolean experimental) { + this.experimental = experimental; + return this; + } + + /** + * When true, also emit the previous major version alongside the target version. For version=1, + * the previous version refers to the pre-stable conventions that the instrumentation emitted + * before the first stable semantic convention version was defined. For version=2 and above, the + * previous version is the prior stable major version (e.g., version=2, dual_emit=true emits both + * v2 and v1). Enables dual-emit for phased migration between versions. If omitted or null, false + * is used. + */ + @JsonProperty("dual_emit") + @Nullable + public Boolean getDualEmit() { + return dualEmit; + } + + public ExperimentalSemconvConfigModel withDualEmit(Boolean dualEmit) { + this.dualEmit = dualEmit; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalSemconvConfigModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("version"); + sb.append('='); + sb.append(((this.version == null) ? "" : this.version)); + sb.append(','); + sb.append("experimental"); + sb.append('='); + sb.append(((this.experimental == null) ? "" : this.experimental)); + sb.append(','); + sb.append("dualEmit"); + sb.append('='); + sb.append(((this.dualEmit == null) ? "" : this.dualEmit)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.dualEmit == null) ? 0 : this.dualEmit.hashCode())); + result = ((result * 31) + ((this.version == null) ? 0 : this.version.hashCode())); + result = ((result * 31) + ((this.experimental == null) ? 0 : this.experimental.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalSemconvConfigModel) == false) { + return false; + } + ExperimentalSemconvConfigModel rhs = ((ExperimentalSemconvConfigModel) other); + return ((((this.dualEmit == rhs.dualEmit) + || ((this.dualEmit != null) && this.dualEmit.equals(rhs.dualEmit))) + && ((this.version == rhs.version) + || ((this.version != null) && this.version.equals(rhs.version)))) + && ((this.experimental == rhs.experimental) + || ((this.experimental != null) && this.experimental.equals(rhs.experimental)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java new file mode 100644 index 00000000000..ee3d225dc3b --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalServiceResourceDetectorModel.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalServiceResourceDetectorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalServiceResourceDetectorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalServiceResourceDetectorModel) == false) { + return false; + } + ExperimentalServiceResourceDetectorModel rhs = + ((ExperimentalServiceResourceDetectorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java new file mode 100644 index 00000000000..3f8a7fc894f --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalSpanParent.java @@ -0,0 +1,53 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; + +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public enum ExperimentalSpanParent { + NONE("none"), + REMOTE("remote"), + LOCAL("local"); + private final String value; + private static final Map CONSTANTS = + new HashMap(); + + static { + for (ExperimentalSpanParent c : values()) { + CONSTANTS.put(c.value, c); + } + } + + ExperimentalSpanParent(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static ExperimentalSpanParent fromValue(String value) { + ExperimentalSpanParent constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java new file mode 100644 index 00000000000..4b902b72e19 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfigModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"enabled"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalTracerConfigModel { + + /** + * Configure if the tracer is enabled or not. If omitted, true is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("enabled") + @JsonPropertyDescription( + "Configure if the tracer is enabled or not.\nIf omitted, true is used.\n") + private Boolean enabled; + + /** Configure if the tracer is enabled or not. If omitted, true is used. */ + @JsonProperty("enabled") + @Nullable + public Boolean getEnabled() { + return enabled; + } + + public ExperimentalTracerConfigModel withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalTracerConfigModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("enabled"); + sb.append('='); + sb.append(((this.enabled == null) ? "" : this.enabled)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.enabled == null) ? 0 : this.enabled.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalTracerConfigModel) == false) { + return false; + } + ExperimentalTracerConfigModel rhs = ((ExperimentalTracerConfigModel) other); + return ((this.enabled == rhs.enabled) + || ((this.enabled != null) && this.enabled.equals(rhs.enabled))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java new file mode 100644 index 00000000000..b404ea4fe7a --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerConfiguratorModel.java @@ -0,0 +1,107 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"default_config", "tracers"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalTracerConfiguratorModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("default_config") + private ExperimentalTracerConfigModel defaultConfig; + + /** + * Configure tracers. If omitted, all tracers use .default_config. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("tracers") + @JsonPropertyDescription("Configure tracers.\nIf omitted, all tracers use .default_config.\n") + private List tracers; + + @JsonProperty("default_config") + @Nullable + public ExperimentalTracerConfigModel getDefaultConfig() { + return defaultConfig; + } + + public ExperimentalTracerConfiguratorModel withDefaultConfig( + ExperimentalTracerConfigModel defaultConfig) { + this.defaultConfig = defaultConfig; + return this; + } + + /** Configure tracers. If omitted, all tracers use .default_config. */ + @JsonProperty("tracers") + @Nullable + public List getTracers() { + return tracers; + } + + public ExperimentalTracerConfiguratorModel withTracers( + List tracers) { + this.tracers = tracers; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalTracerConfiguratorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("defaultConfig"); + sb.append('='); + sb.append(((this.defaultConfig == null) ? "" : this.defaultConfig)); + sb.append(','); + sb.append("tracers"); + sb.append('='); + sb.append(((this.tracers == null) ? "" : this.tracers)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.tracers == null) ? 0 : this.tracers.hashCode())); + result = ((result * 31) + ((this.defaultConfig == null) ? 0 : this.defaultConfig.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalTracerConfiguratorModel) == false) { + return false; + } + ExperimentalTracerConfiguratorModel rhs = ((ExperimentalTracerConfiguratorModel) other); + return (((this.tracers == rhs.tracers) + || ((this.tracers != null) && this.tracers.equals(rhs.tracers))) + && ((this.defaultConfig == rhs.defaultConfig) + || ((this.defaultConfig != null) && this.defaultConfig.equals(rhs.defaultConfig)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java new file mode 100644 index 00000000000..262246fb068 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalTracerMatcherAndConfigModel.java @@ -0,0 +1,118 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"name", "config"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalTracerMatcherAndConfigModel { + + /** + * Configure tracer names to match, evaluated as follows: + * + *

* If the tracer name exactly matches. * If the tracer name matches the wildcard pattern, + * where '?' matches any single character and '*' matches any number of characters including none. + * Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @JsonPropertyDescription( + "Configure tracer names to match, evaluated as follows:\n\n * If the tracer name exactly matches.\n * If the tracer name matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nProperty is required and must be non-null.\n") + @Nonnull + private String name; + + /** (Required) */ + @JsonProperty("config") + @Nonnull + private ExperimentalTracerConfigModel config; + + /** + * Configure tracer names to match, evaluated as follows: + * + *

* If the tracer name exactly matches. * If the tracer name matches the wildcard pattern, + * where '?' matches any single character and '*' matches any number of characters including none. + * Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @Nullable + public String getName() { + return name; + } + + public ExperimentalTracerMatcherAndConfigModel withName(String name) { + this.name = name; + return this; + } + + /** (Required) */ + @JsonProperty("config") + @Nullable + public ExperimentalTracerConfigModel getConfig() { + return config; + } + + public ExperimentalTracerMatcherAndConfigModel withConfig(ExperimentalTracerConfigModel config) { + this.config = config; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalTracerMatcherAndConfigModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null) ? "" : this.name)); + sb.append(','); + sb.append("config"); + sb.append('='); + sb.append(((this.config == null) ? "" : this.config)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); + result = ((result * 31) + ((this.config == null) ? 0 : this.config.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalTracerMatcherAndConfigModel) == false) { + return false; + } + ExperimentalTracerMatcherAndConfigModel rhs = ((ExperimentalTracerMatcherAndConfigModel) other); + return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) + && ((this.config == rhs.config) + || ((this.config != null) && this.config.equals(rhs.config)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java new file mode 100644 index 00000000000..e4d744965a1 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExperimentalUrlSanitizationModel.java @@ -0,0 +1,103 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"sensitive_query_parameters"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExperimentalUrlSanitizationModel { + + /** + * List of query parameter names whose values should be redacted from URLs. Query parameter names + * are case-sensitive. This is a full override of the default sensitive query parameter keys, it + * is not a list of keys in addition to the defaults. Set to an empty array to disable query + * parameter redaction. If omitted, the default sensitive query parameter list as defined by the + * url semantic conventions + * (https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/url.md) + * is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("sensitive_query_parameters") + @JsonPropertyDescription( + "List of query parameter names whose values should be redacted from URLs.\nQuery parameter names are case-sensitive.\nThis is a full override of the default sensitive query parameter keys, it is not a list of keys in addition to the defaults.\nSet to an empty array to disable query parameter redaction.\nIf omitted, the default sensitive query parameter list as defined by the url semantic conventions (https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/url.md) is used.\n") + private List sensitiveQueryParameters; + + /** + * List of query parameter names whose values should be redacted from URLs. Query parameter names + * are case-sensitive. This is a full override of the default sensitive query parameter keys, it + * is not a list of keys in addition to the defaults. Set to an empty array to disable query + * parameter redaction. If omitted, the default sensitive query parameter list as defined by the + * url semantic conventions + * (https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/url.md) + * is used. + */ + @JsonProperty("sensitive_query_parameters") + @Nullable + public List getSensitiveQueryParameters() { + return sensitiveQueryParameters; + } + + public ExperimentalUrlSanitizationModel withSensitiveQueryParameters( + List sensitiveQueryParameters) { + this.sensitiveQueryParameters = sensitiveQueryParameters; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExperimentalUrlSanitizationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("sensitiveQueryParameters"); + sb.append('='); + sb.append(((this.sensitiveQueryParameters == null) ? "" : this.sensitiveQueryParameters)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.sensitiveQueryParameters == null) + ? 0 + : this.sensitiveQueryParameters.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExperimentalUrlSanitizationModel) == false) { + return false; + } + ExperimentalUrlSanitizationModel rhs = ((ExperimentalUrlSanitizationModel) other); + return ((this.sensitiveQueryParameters == rhs.sensitiveQueryParameters) + || ((this.sensitiveQueryParameters != null) + && this.sensitiveQueryParameters.equals(rhs.sensitiveQueryParameters))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java new file mode 100644 index 00000000000..b093fa96c8f --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ExplicitBucketHistogramAggregationModel.java @@ -0,0 +1,116 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"boundaries", "record_min_max"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ExplicitBucketHistogramAggregationModel { + + /** + * Configure bucket boundaries. If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, + * 5000, 7500, 10000] is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("boundaries") + @JsonPropertyDescription( + "Configure bucket boundaries.\nIf omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used.\n") + private List boundaries; + + /** + * Configure record min and max. If omitted or null, true is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("record_min_max") + @JsonPropertyDescription("Configure record min and max.\nIf omitted or null, true is used.\n") + private Boolean recordMinMax; + + /** + * Configure bucket boundaries. If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, + * 5000, 7500, 10000] is used. + */ + @JsonProperty("boundaries") + @Nullable + public List getBoundaries() { + return boundaries; + } + + public ExplicitBucketHistogramAggregationModel withBoundaries(List boundaries) { + this.boundaries = boundaries; + return this; + } + + /** Configure record min and max. If omitted or null, true is used. */ + @JsonProperty("record_min_max") + @Nullable + public Boolean getRecordMinMax() { + return recordMinMax; + } + + public ExplicitBucketHistogramAggregationModel withRecordMinMax(Boolean recordMinMax) { + this.recordMinMax = recordMinMax; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ExplicitBucketHistogramAggregationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("boundaries"); + sb.append('='); + sb.append(((this.boundaries == null) ? "" : this.boundaries)); + sb.append(','); + sb.append("recordMinMax"); + sb.append('='); + sb.append(((this.recordMinMax == null) ? "" : this.recordMinMax)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.boundaries == null) ? 0 : this.boundaries.hashCode())); + result = ((result * 31) + ((this.recordMinMax == null) ? 0 : this.recordMinMax.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ExplicitBucketHistogramAggregationModel) == false) { + return false; + } + ExplicitBucketHistogramAggregationModel rhs = ((ExplicitBucketHistogramAggregationModel) other); + return (((this.boundaries == rhs.boundaries) + || ((this.boundaries != null) && this.boundaries.equals(rhs.boundaries))) + && ((this.recordMinMax == rhs.recordMinMax) + || ((this.recordMinMax != null) && this.recordMinMax.equals(rhs.recordMinMax)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java new file mode 100644 index 00000000000..2aa60745701 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/GrpcTlsModel.java @@ -0,0 +1,192 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"ca_file", "key_file", "cert_file", "insecure"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class GrpcTlsModel { + + /** + * Configure certificate used to verify a server's TLS credentials. Absolute path to certificate + * file in PEM format. If omitted or null, system default certificate verification is used for + * secure connections. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("ca_file") + @JsonPropertyDescription( + "Configure certificate used to verify a server's TLS credentials. \nAbsolute path to certificate file in PEM format.\nIf omitted or null, system default certificate verification is used for secure connections.\n") + private String caFile; + + /** + * Configure mTLS private client key. Absolute path to client key file in PEM format. If set, + * .client_certificate must also be set. If omitted or null, mTLS is not used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("key_file") + @JsonPropertyDescription( + "Configure mTLS private client key. \nAbsolute path to client key file in PEM format. If set, .client_certificate must also be set.\nIf omitted or null, mTLS is not used.\n") + private String keyFile; + + /** + * Configure mTLS client certificate. Absolute path to client certificate file in PEM format. If + * set, .client_key must also be set. If omitted or null, mTLS is not used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("cert_file") + @JsonPropertyDescription( + "Configure mTLS client certificate. \nAbsolute path to client certificate file in PEM format. If set, .client_key must also be set.\nIf omitted or null, mTLS is not used.\n") + private String certFile; + + /** + * Configure client transport security for the exporter's connection. Only applicable when + * .endpoint is provided without http or https scheme. Implementations may choose to ignore + * .insecure. If omitted or null, false is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("insecure") + @JsonPropertyDescription( + "Configure client transport security for the exporter's connection. \nOnly applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.\nIf omitted or null, false is used.\n") + private Boolean insecure; + + /** + * Configure certificate used to verify a server's TLS credentials. Absolute path to certificate + * file in PEM format. If omitted or null, system default certificate verification is used for + * secure connections. + */ + @JsonProperty("ca_file") + @Nullable + public String getCaFile() { + return caFile; + } + + public GrpcTlsModel withCaFile(String caFile) { + this.caFile = caFile; + return this; + } + + /** + * Configure mTLS private client key. Absolute path to client key file in PEM format. If set, + * .client_certificate must also be set. If omitted or null, mTLS is not used. + */ + @JsonProperty("key_file") + @Nullable + public String getKeyFile() { + return keyFile; + } + + public GrpcTlsModel withKeyFile(String keyFile) { + this.keyFile = keyFile; + return this; + } + + /** + * Configure mTLS client certificate. Absolute path to client certificate file in PEM format. If + * set, .client_key must also be set. If omitted or null, mTLS is not used. + */ + @JsonProperty("cert_file") + @Nullable + public String getCertFile() { + return certFile; + } + + public GrpcTlsModel withCertFile(String certFile) { + this.certFile = certFile; + return this; + } + + /** + * Configure client transport security for the exporter's connection. Only applicable when + * .endpoint is provided without http or https scheme. Implementations may choose to ignore + * .insecure. If omitted or null, false is used. + */ + @JsonProperty("insecure") + @Nullable + public Boolean getInsecure() { + return insecure; + } + + public GrpcTlsModel withInsecure(Boolean insecure) { + this.insecure = insecure; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(GrpcTlsModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("caFile"); + sb.append('='); + sb.append(((this.caFile == null) ? "" : this.caFile)); + sb.append(','); + sb.append("keyFile"); + sb.append('='); + sb.append(((this.keyFile == null) ? "" : this.keyFile)); + sb.append(','); + sb.append("certFile"); + sb.append('='); + sb.append(((this.certFile == null) ? "" : this.certFile)); + sb.append(','); + sb.append("insecure"); + sb.append('='); + sb.append(((this.insecure == null) ? "" : this.insecure)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.insecure == null) ? 0 : this.insecure.hashCode())); + result = ((result * 31) + ((this.caFile == null) ? 0 : this.caFile.hashCode())); + result = ((result * 31) + ((this.keyFile == null) ? 0 : this.keyFile.hashCode())); + result = ((result * 31) + ((this.certFile == null) ? 0 : this.certFile.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof GrpcTlsModel) == false) { + return false; + } + GrpcTlsModel rhs = ((GrpcTlsModel) other); + return (((((this.insecure == rhs.insecure) + || ((this.insecure != null) && this.insecure.equals(rhs.insecure))) + && ((this.caFile == rhs.caFile) + || ((this.caFile != null) && this.caFile.equals(rhs.caFile)))) + && ((this.keyFile == rhs.keyFile) + || ((this.keyFile != null) && this.keyFile.equals(rhs.keyFile)))) + && ((this.certFile == rhs.certFile) + || ((this.certFile != null) && this.certFile.equals(rhs.certFile)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java new file mode 100644 index 00000000000..6844ca77558 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/HttpTlsModel.java @@ -0,0 +1,156 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"ca_file", "key_file", "cert_file"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class HttpTlsModel { + + /** + * Configure certificate used to verify a server's TLS credentials. Absolute path to certificate + * file in PEM format. If omitted or null, system default certificate verification is used for + * secure connections. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("ca_file") + @JsonPropertyDescription( + "Configure certificate used to verify a server's TLS credentials. \nAbsolute path to certificate file in PEM format.\nIf omitted or null, system default certificate verification is used for secure connections.\n") + private String caFile; + + /** + * Configure mTLS private client key. Absolute path to client key file in PEM format. If set, + * .client_certificate must also be set. If omitted or null, mTLS is not used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("key_file") + @JsonPropertyDescription( + "Configure mTLS private client key. \nAbsolute path to client key file in PEM format. If set, .client_certificate must also be set.\nIf omitted or null, mTLS is not used.\n") + private String keyFile; + + /** + * Configure mTLS client certificate. Absolute path to client certificate file in PEM format. If + * set, .client_key must also be set. If omitted or null, mTLS is not used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("cert_file") + @JsonPropertyDescription( + "Configure mTLS client certificate. \nAbsolute path to client certificate file in PEM format. If set, .client_key must also be set.\nIf omitted or null, mTLS is not used.\n") + private String certFile; + + /** + * Configure certificate used to verify a server's TLS credentials. Absolute path to certificate + * file in PEM format. If omitted or null, system default certificate verification is used for + * secure connections. + */ + @JsonProperty("ca_file") + @Nullable + public String getCaFile() { + return caFile; + } + + public HttpTlsModel withCaFile(String caFile) { + this.caFile = caFile; + return this; + } + + /** + * Configure mTLS private client key. Absolute path to client key file in PEM format. If set, + * .client_certificate must also be set. If omitted or null, mTLS is not used. + */ + @JsonProperty("key_file") + @Nullable + public String getKeyFile() { + return keyFile; + } + + public HttpTlsModel withKeyFile(String keyFile) { + this.keyFile = keyFile; + return this; + } + + /** + * Configure mTLS client certificate. Absolute path to client certificate file in PEM format. If + * set, .client_key must also be set. If omitted or null, mTLS is not used. + */ + @JsonProperty("cert_file") + @Nullable + public String getCertFile() { + return certFile; + } + + public HttpTlsModel withCertFile(String certFile) { + this.certFile = certFile; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(HttpTlsModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("caFile"); + sb.append('='); + sb.append(((this.caFile == null) ? "" : this.caFile)); + sb.append(','); + sb.append("keyFile"); + sb.append('='); + sb.append(((this.keyFile == null) ? "" : this.keyFile)); + sb.append(','); + sb.append("certFile"); + sb.append('='); + sb.append(((this.certFile == null) ? "" : this.certFile)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.keyFile == null) ? 0 : this.keyFile.hashCode())); + result = ((result * 31) + ((this.caFile == null) ? 0 : this.caFile.hashCode())); + result = ((result * 31) + ((this.certFile == null) ? 0 : this.certFile.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof HttpTlsModel) == false) { + return false; + } + HttpTlsModel rhs = ((HttpTlsModel) other); + return ((((this.keyFile == rhs.keyFile) + || ((this.keyFile != null) && this.keyFile.equals(rhs.keyFile))) + && ((this.caFile == rhs.caFile) + || ((this.caFile != null) && this.caFile.equals(rhs.caFile)))) + && ((this.certFile == rhs.certFile) + || ((this.certFile != null) && this.certFile.equals(rhs.certFile)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java new file mode 100644 index 00000000000..029c91aa201 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/IncludeExcludeModel.java @@ -0,0 +1,131 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"included", "excluded"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class IncludeExcludeModel { + + /** + * Configure list of value patterns to include. Values are evaluated to match as follows: * If the + * value exactly matches. * If the value matches the wildcard pattern, where '?' matches any + * single character and '*' matches any number of characters including none. If omitted, all + * values are included. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("included") + @JsonPropertyDescription( + "Configure list of value patterns to include.\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, all values are included.\n") + private List included; + + /** + * Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher + * priority than included). Values are evaluated to match as follows: * If the value exactly + * matches. * If the value matches the wildcard pattern, where '?' matches any single character + * and '*' matches any number of characters including none. If omitted, .included attributes are + * included. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("excluded") + @JsonPropertyDescription( + "Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, .included attributes are included.\n") + private List excluded; + + /** + * Configure list of value patterns to include. Values are evaluated to match as follows: * If the + * value exactly matches. * If the value matches the wildcard pattern, where '?' matches any + * single character and '*' matches any number of characters including none. If omitted, all + * values are included. + */ + @JsonProperty("included") + @Nullable + public List getIncluded() { + return included; + } + + public IncludeExcludeModel withIncluded(List included) { + this.included = included; + return this; + } + + /** + * Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher + * priority than included). Values are evaluated to match as follows: * If the value exactly + * matches. * If the value matches the wildcard pattern, where '?' matches any single character + * and '*' matches any number of characters including none. If omitted, .included attributes are + * included. + */ + @JsonProperty("excluded") + @Nullable + public List getExcluded() { + return excluded; + } + + public IncludeExcludeModel withExcluded(List excluded) { + this.excluded = excluded; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(IncludeExcludeModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("included"); + sb.append('='); + sb.append(((this.included == null) ? "" : this.included)); + sb.append(','); + sb.append("excluded"); + sb.append('='); + sb.append(((this.excluded == null) ? "" : this.excluded)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.excluded == null) ? 0 : this.excluded.hashCode())); + result = ((result * 31) + ((this.included == null) ? 0 : this.included.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof IncludeExcludeModel) == false) { + return false; + } + IncludeExcludeModel rhs = ((IncludeExcludeModel) other); + return (((this.excluded == rhs.excluded) + || ((this.excluded != null) && this.excluded.equals(rhs.excluded))) + && ((this.included == rhs.included) + || ((this.included != null) && this.included.equals(rhs.included)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java new file mode 100644 index 00000000000..87aedbefada --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LastValueAggregationModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class LastValueAggregationModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LastValueAggregationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LastValueAggregationModel) == false) { + return false; + } + LastValueAggregationModel rhs = ((LastValueAggregationModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java new file mode 100644 index 00000000000..16fce7edb92 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterModel.java @@ -0,0 +1,182 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"otlp_http", "otlp_grpc", "otlp_file/development", "console"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class LogRecordExporterModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_http") + private OtlpHttpExporterModel otlpHttp; + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_grpc") + private OtlpGrpcExporterModel otlpGrpc; + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_file/development") + private ExperimentalOtlpFileExporterModel otlpFileDevelopment; + + /** (Can be null) */ + @Nullable + @JsonProperty("console") + private ConsoleExporterModel console; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("otlp_http") + @Nullable + public OtlpHttpExporterModel getOtlpHttp() { + return otlpHttp; + } + + public LogRecordExporterModel withOtlpHttp(OtlpHttpExporterModel otlpHttp) { + this.otlpHttp = otlpHttp; + return this; + } + + @JsonProperty("otlp_grpc") + @Nullable + public OtlpGrpcExporterModel getOtlpGrpc() { + return otlpGrpc; + } + + public LogRecordExporterModel withOtlpGrpc(OtlpGrpcExporterModel otlpGrpc) { + this.otlpGrpc = otlpGrpc; + return this; + } + + @JsonProperty("otlp_file/development") + @Nullable + public ExperimentalOtlpFileExporterModel getOtlpFileDevelopment() { + return otlpFileDevelopment; + } + + public LogRecordExporterModel withOtlpFileDevelopment( + ExperimentalOtlpFileExporterModel otlpFileDevelopment) { + this.otlpFileDevelopment = otlpFileDevelopment; + return this; + } + + @JsonProperty("console") + @Nullable + public ConsoleExporterModel getConsole() { + return console; + } + + public LogRecordExporterModel withConsole(ConsoleExporterModel console) { + this.console = console; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, LogRecordExporterPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public LogRecordExporterModel withAdditionalProperty( + String name, LogRecordExporterPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LogRecordExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("otlpHttp"); + sb.append('='); + sb.append(((this.otlpHttp == null) ? "" : this.otlpHttp)); + sb.append(','); + sb.append("otlpGrpc"); + sb.append('='); + sb.append(((this.otlpGrpc == null) ? "" : this.otlpGrpc)); + sb.append(','); + sb.append("otlpFileDevelopment"); + sb.append('='); + sb.append(((this.otlpFileDevelopment == null) ? "" : this.otlpFileDevelopment)); + sb.append(','); + sb.append("console"); + sb.append('='); + sb.append(((this.console == null) ? "" : this.console)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.console == null) ? 0 : this.console.hashCode())); + result = + ((result * 31) + + ((this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode())); + result = ((result * 31) + ((this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LogRecordExporterModel) == false) { + return false; + } + LogRecordExporterModel rhs = ((LogRecordExporterModel) other); + return ((((((this.console == rhs.console) + || ((this.console != null) && this.console.equals(rhs.console))) + && ((this.otlpFileDevelopment == rhs.otlpFileDevelopment) + || ((this.otlpFileDevelopment != null) + && this.otlpFileDevelopment.equals(rhs.otlpFileDevelopment)))) + && ((this.otlpGrpc == rhs.otlpGrpc) + || ((this.otlpGrpc != null) && this.otlpGrpc.equals(rhs.otlpGrpc)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.otlpHttp == rhs.otlpHttp) + || ((this.otlpHttp != null) && this.otlpHttp.equals(rhs.otlpHttp)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java new file mode 100644 index 00000000000..a56bace246f --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordExporterPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class LogRecordExporterPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public LogRecordExporterPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LogRecordExporterPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LogRecordExporterPropertyModel) == false) { + return false; + } + LogRecordExporterPropertyModel rhs = ((LogRecordExporterPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java new file mode 100644 index 00000000000..cef2a86e467 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordLimitsModel.java @@ -0,0 +1,129 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"attribute_value_length_limit", "attribute_count_limit"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class LogRecordLimitsModel { + + /** + * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + * Value must be non-negative. If omitted or null, there is no limit. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attribute_value_length_limit") + @JsonPropertyDescription( + "Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. \nValue must be non-negative.\nIf omitted or null, there is no limit.\n") + private Integer attributeValueLengthLimit; + + /** + * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. Value must be + * non-negative. If omitted or null, 128 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attribute_count_limit") + @JsonPropertyDescription( + "Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + private Integer attributeCountLimit; + + /** + * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + * Value must be non-negative. If omitted or null, there is no limit. + */ + @JsonProperty("attribute_value_length_limit") + @Nullable + public Integer getAttributeValueLengthLimit() { + return attributeValueLengthLimit; + } + + public LogRecordLimitsModel withAttributeValueLengthLimit(Integer attributeValueLengthLimit) { + this.attributeValueLengthLimit = attributeValueLengthLimit; + return this; + } + + /** + * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. Value must be + * non-negative. If omitted or null, 128 is used. + */ + @JsonProperty("attribute_count_limit") + @Nullable + public Integer getAttributeCountLimit() { + return attributeCountLimit; + } + + public LogRecordLimitsModel withAttributeCountLimit(Integer attributeCountLimit) { + this.attributeCountLimit = attributeCountLimit; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LogRecordLimitsModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("attributeValueLengthLimit"); + sb.append('='); + sb.append( + ((this.attributeValueLengthLimit == null) ? "" : this.attributeValueLengthLimit)); + sb.append(','); + sb.append("attributeCountLimit"); + sb.append('='); + sb.append(((this.attributeCountLimit == null) ? "" : this.attributeCountLimit)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.attributeValueLengthLimit == null) + ? 0 + : this.attributeValueLengthLimit.hashCode())); + result = + ((result * 31) + + ((this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LogRecordLimitsModel) == false) { + return false; + } + LogRecordLimitsModel rhs = ((LogRecordLimitsModel) other); + return (((this.attributeValueLengthLimit == rhs.attributeValueLengthLimit) + || ((this.attributeValueLengthLimit != null) + && this.attributeValueLengthLimit.equals(rhs.attributeValueLengthLimit))) + && ((this.attributeCountLimit == rhs.attributeCountLimit) + || ((this.attributeCountLimit != null) + && this.attributeCountLimit.equals(rhs.attributeCountLimit)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java new file mode 100644 index 00000000000..fc53cfe18d8 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorModel.java @@ -0,0 +1,129 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"batch", "simple"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class LogRecordProcessorModel { + + @Nullable + @JsonProperty("batch") + private BatchLogRecordProcessorModel batch; + + @Nullable + @JsonProperty("simple") + private SimpleLogRecordProcessorModel simple; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("batch") + @Nullable + public BatchLogRecordProcessorModel getBatch() { + return batch; + } + + public LogRecordProcessorModel withBatch(BatchLogRecordProcessorModel batch) { + this.batch = batch; + return this; + } + + @JsonProperty("simple") + @Nullable + public SimpleLogRecordProcessorModel getSimple() { + return simple; + } + + public LogRecordProcessorModel withSimple(SimpleLogRecordProcessorModel simple) { + this.simple = simple; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, LogRecordProcessorPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public LogRecordProcessorModel withAdditionalProperty( + String name, LogRecordProcessorPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LogRecordProcessorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("batch"); + sb.append('='); + sb.append(((this.batch == null) ? "" : this.batch)); + sb.append(','); + sb.append("simple"); + sb.append('='); + sb.append(((this.simple == null) ? "" : this.simple)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.batch == null) ? 0 : this.batch.hashCode())); + result = ((result * 31) + ((this.simple == null) ? 0 : this.simple.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LogRecordProcessorModel) == false) { + return false; + } + LogRecordProcessorModel rhs = ((LogRecordProcessorModel) other); + return ((((this.batch == rhs.batch) || ((this.batch != null) && this.batch.equals(rhs.batch))) + && ((this.simple == rhs.simple) + || ((this.simple != null) && this.simple.equals(rhs.simple)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java new file mode 100644 index 00000000000..b97b5634edf --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LogRecordProcessorPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class LogRecordProcessorPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public LogRecordProcessorPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LogRecordProcessorPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LogRecordProcessorPropertyModel) == false) { + return false; + } + LogRecordProcessorPropertyModel rhs = ((LogRecordProcessorPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java new file mode 100644 index 00000000000..8874f7975da --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/LoggerProviderModel.java @@ -0,0 +1,143 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"processors", "limits", "logger_configurator/development"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class LoggerProviderModel { + + /** + * Configure log record processors. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("processors") + @JsonPropertyDescription( + "Configure log record processors.\nProperty is required and must be non-null.\n") + @Nonnull + private List processors; + + /** (Can be null) */ + @Nullable + @JsonProperty("limits") + private LogRecordLimitsModel limits; + + /** (Can be null) */ + @Nullable + @JsonProperty("logger_configurator/development") + private ExperimentalLoggerConfiguratorModel loggerConfiguratorDevelopment; + + /** + * Configure log record processors. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("processors") + @Nullable + public List getProcessors() { + return processors; + } + + public LoggerProviderModel withProcessors(List processors) { + this.processors = processors; + return this; + } + + @JsonProperty("limits") + @Nullable + public LogRecordLimitsModel getLimits() { + return limits; + } + + public LoggerProviderModel withLimits(LogRecordLimitsModel limits) { + this.limits = limits; + return this; + } + + @JsonProperty("logger_configurator/development") + @Nullable + public ExperimentalLoggerConfiguratorModel getLoggerConfiguratorDevelopment() { + return loggerConfiguratorDevelopment; + } + + public LoggerProviderModel withLoggerConfiguratorDevelopment( + ExperimentalLoggerConfiguratorModel loggerConfiguratorDevelopment) { + this.loggerConfiguratorDevelopment = loggerConfiguratorDevelopment; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(LoggerProviderModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("processors"); + sb.append('='); + sb.append(((this.processors == null) ? "" : this.processors)); + sb.append(','); + sb.append("limits"); + sb.append('='); + sb.append(((this.limits == null) ? "" : this.limits)); + sb.append(','); + sb.append("loggerConfiguratorDevelopment"); + sb.append('='); + sb.append( + ((this.loggerConfiguratorDevelopment == null) + ? "" + : this.loggerConfiguratorDevelopment)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.limits == null) ? 0 : this.limits.hashCode())); + result = ((result * 31) + ((this.processors == null) ? 0 : this.processors.hashCode())); + result = + ((result * 31) + + ((this.loggerConfiguratorDevelopment == null) + ? 0 + : this.loggerConfiguratorDevelopment.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof LoggerProviderModel) == false) { + return false; + } + LoggerProviderModel rhs = ((LoggerProviderModel) other); + return ((((this.limits == rhs.limits) + || ((this.limits != null) && this.limits.equals(rhs.limits))) + && ((this.processors == rhs.processors) + || ((this.processors != null) && this.processors.equals(rhs.processors)))) + && ((this.loggerConfiguratorDevelopment == rhs.loggerConfiguratorDevelopment) + || ((this.loggerConfiguratorDevelopment != null) + && this.loggerConfiguratorDevelopment.equals(rhs.loggerConfiguratorDevelopment)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java new file mode 100644 index 00000000000..73b33268eb2 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MeterProviderModel.java @@ -0,0 +1,223 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"readers", "views", "exemplar_filter", "meter_configurator/development"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class MeterProviderModel { + + /** + * Configure metric readers. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("readers") + @JsonPropertyDescription( + "Configure metric readers.\nProperty is required and must be non-null.\n") + @Nonnull + private List readers; + + /** + * Configure views. Each view has a selector which determines the instrument(s) it applies to, and + * a configuration for the resulting stream(s). If omitted, no views are registered. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("views") + @JsonPropertyDescription( + "Configure views. \nEach view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s).\nIf omitted, no views are registered.\n") + private List views; + + /** (Can be null) */ + @Nullable + @JsonProperty("exemplar_filter") + private MeterProviderModel.ExemplarFilter exemplarFilter; + + /** (Can be null) */ + @Nullable + @JsonProperty("meter_configurator/development") + private ExperimentalMeterConfiguratorModel meterConfiguratorDevelopment; + + /** + * Configure metric readers. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("readers") + @Nullable + public List getReaders() { + return readers; + } + + public MeterProviderModel withReaders(List readers) { + this.readers = readers; + return this; + } + + /** + * Configure views. Each view has a selector which determines the instrument(s) it applies to, and + * a configuration for the resulting stream(s). If omitted, no views are registered. + */ + @JsonProperty("views") + @Nullable + public List getViews() { + return views; + } + + public MeterProviderModel withViews(List views) { + this.views = views; + return this; + } + + @JsonProperty("exemplar_filter") + @Nullable + public MeterProviderModel.ExemplarFilter getExemplarFilter() { + return exemplarFilter; + } + + public MeterProviderModel withExemplarFilter(MeterProviderModel.ExemplarFilter exemplarFilter) { + this.exemplarFilter = exemplarFilter; + return this; + } + + @JsonProperty("meter_configurator/development") + @Nullable + public ExperimentalMeterConfiguratorModel getMeterConfiguratorDevelopment() { + return meterConfiguratorDevelopment; + } + + public MeterProviderModel withMeterConfiguratorDevelopment( + ExperimentalMeterConfiguratorModel meterConfiguratorDevelopment) { + this.meterConfiguratorDevelopment = meterConfiguratorDevelopment; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(MeterProviderModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("readers"); + sb.append('='); + sb.append(((this.readers == null) ? "" : this.readers)); + sb.append(','); + sb.append("views"); + sb.append('='); + sb.append(((this.views == null) ? "" : this.views)); + sb.append(','); + sb.append("exemplarFilter"); + sb.append('='); + sb.append(((this.exemplarFilter == null) ? "" : this.exemplarFilter)); + sb.append(','); + sb.append("meterConfiguratorDevelopment"); + sb.append('='); + sb.append( + ((this.meterConfiguratorDevelopment == null) + ? "" + : this.meterConfiguratorDevelopment)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.exemplarFilter == null) ? 0 : this.exemplarFilter.hashCode())); + result = + ((result * 31) + + ((this.meterConfiguratorDevelopment == null) + ? 0 + : this.meterConfiguratorDevelopment.hashCode())); + result = ((result * 31) + ((this.readers == null) ? 0 : this.readers.hashCode())); + result = ((result * 31) + ((this.views == null) ? 0 : this.views.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof MeterProviderModel) == false) { + return false; + } + MeterProviderModel rhs = ((MeterProviderModel) other); + return (((((this.exemplarFilter == rhs.exemplarFilter) + || ((this.exemplarFilter != null) + && this.exemplarFilter.equals(rhs.exemplarFilter))) + && ((this.meterConfiguratorDevelopment == rhs.meterConfiguratorDevelopment) + || ((this.meterConfiguratorDevelopment != null) + && this.meterConfiguratorDevelopment.equals( + rhs.meterConfiguratorDevelopment)))) + && ((this.readers == rhs.readers) + || ((this.readers != null) && this.readers.equals(rhs.readers)))) + && ((this.views == rhs.views) || ((this.views != null) && this.views.equals(rhs.views)))); + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum ExemplarFilter { + ALWAYS_ON("always_on"), + ALWAYS_OFF("always_off"), + TRACE_BASED("trace_based"); + private final String value; + private static final Map CONSTANTS = + new HashMap(); + + static { + for (MeterProviderModel.ExemplarFilter c : values()) { + CONSTANTS.put(c.value, c); + } + } + + ExemplarFilter(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static MeterProviderModel.ExemplarFilter fromValue(String value) { + MeterProviderModel.ExemplarFilter constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java new file mode 100644 index 00000000000..db2628bd3be --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerModel.java @@ -0,0 +1,109 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"opencensus"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class MetricProducerModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("opencensus") + private OpenCensusMetricProducerModel opencensus; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("opencensus") + @Nullable + public OpenCensusMetricProducerModel getOpencensus() { + return opencensus; + } + + public MetricProducerModel withOpencensus(OpenCensusMetricProducerModel opencensus) { + this.opencensus = opencensus; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, MetricProducerPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public MetricProducerModel withAdditionalProperty( + String name, MetricProducerPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(MetricProducerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("opencensus"); + sb.append('='); + sb.append(((this.opencensus == null) ? "" : this.opencensus)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.opencensus == null) ? 0 : this.opencensus.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof MetricProducerModel) == false) { + return false; + } + MetricProducerModel rhs = ((MetricProducerModel) other); + return (((this.opencensus == rhs.opencensus) + || ((this.opencensus != null) && this.opencensus.equals(rhs.opencensus))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java new file mode 100644 index 00000000000..135ca0a99bc --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricProducerPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class MetricProducerPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public MetricProducerPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(MetricProducerPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof MetricProducerPropertyModel) == false) { + return false; + } + MetricProducerPropertyModel rhs = ((MetricProducerPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java new file mode 100644 index 00000000000..795b1fb4428 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/MetricReaderModel.java @@ -0,0 +1,94 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"periodic", "pull"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class MetricReaderModel { + + @Nullable + @JsonProperty("periodic") + private PeriodicMetricReaderModel periodic; + + @Nullable + @JsonProperty("pull") + private PullMetricReaderModel pull; + + @JsonProperty("periodic") + @Nullable + public PeriodicMetricReaderModel getPeriodic() { + return periodic; + } + + public MetricReaderModel withPeriodic(PeriodicMetricReaderModel periodic) { + this.periodic = periodic; + return this; + } + + @JsonProperty("pull") + @Nullable + public PullMetricReaderModel getPull() { + return pull; + } + + public MetricReaderModel withPull(PullMetricReaderModel pull) { + this.pull = pull; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(MetricReaderModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("periodic"); + sb.append('='); + sb.append(((this.periodic == null) ? "" : this.periodic)); + sb.append(','); + sb.append("pull"); + sb.append('='); + sb.append(((this.pull == null) ? "" : this.pull)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.pull == null) ? 0 : this.pull.hashCode())); + result = ((result * 31) + ((this.periodic == null) ? 0 : this.periodic.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof MetricReaderModel) == false) { + return false; + } + MetricReaderModel rhs = ((MetricReaderModel) other); + return (((this.pull == rhs.pull) || ((this.pull != null) && this.pull.equals(rhs.pull))) + && ((this.periodic == rhs.periodic) + || ((this.periodic != null) && this.periodic.equals(rhs.periodic)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java new file mode 100644 index 00000000000..e9a820a25b1 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/NameStringValuePairModel.java @@ -0,0 +1,120 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"name", "value"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class NameStringValuePairModel { + + /** + * The name of the pair. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @JsonPropertyDescription("The name of the pair.\nProperty is required and must be non-null.\n") + @Nonnull + private String name; + + /** + * The value of the pair. Property must be present, but if null the behavior is dependent on usage + * context. + * + *

(Required) + */ + @JsonProperty("value") + @JsonPropertyDescription( + "The value of the pair.\nProperty must be present, but if null the behavior is dependent on usage context.\n") + @Nonnull + private String value; + + /** + * The name of the pair. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("name") + @Nullable + public String getName() { + return name; + } + + public NameStringValuePairModel withName(String name) { + this.name = name; + return this; + } + + /** + * The value of the pair. Property must be present, but if null the behavior is dependent on usage + * context. + * + *

(Required) + */ + @JsonProperty("value") + @Nullable + public String getValue() { + return value; + } + + public NameStringValuePairModel withValue(String value) { + this.value = value; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(NameStringValuePairModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null) ? "" : this.name)); + sb.append(','); + sb.append("value"); + sb.append('='); + sb.append(((this.value == null) ? "" : this.value)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); + result = ((result * 31) + ((this.value == null) ? 0 : this.value.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof NameStringValuePairModel) == false) { + return false; + } + NameStringValuePairModel rhs = ((NameStringValuePairModel) other); + return (((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) + && ((this.value == rhs.value) || ((this.value != null) && this.value.equals(rhs.value)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java new file mode 100644 index 00000000000..35da7f2c958 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenCensusMetricProducerModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class OpenCensusMetricProducerModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(OpenCensusMetricProducerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof OpenCensusMetricProducerModel) == false) { + return false; + } + OpenCensusMetricProducerModel rhs = ((OpenCensusMetricProducerModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java new file mode 100644 index 00000000000..dc350e6e37a --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OpenTelemetryConfigurationModel.java @@ -0,0 +1,465 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * OpenTelemetryConfiguration + * + *

+ */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "file_format", + "disabled", + "log_level", + "attribute_limits", + "logger_provider", + "meter_provider", + "propagator", + "tracer_provider", + "resource", + "instrumentation/development", + "distribution" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class OpenTelemetryConfigurationModel { + + /** + * The file format version. Represented as a string including the semver major, minor version + * numbers (and optionally the meta tag). For example: "0.4", "1.0-rc.2", "1.0" (after stable + * release). See + * https://github.com/open-telemetry/opentelemetry-configuration/blob/main/VERSIONING.md for more + * details. The yaml format is documented at + * https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema Property is + * required and must be non-null. + * + *

(Required) + */ + @JsonProperty("file_format") + @JsonPropertyDescription( + "The file format version.\nRepresented as a string including the semver major, minor version numbers (and optionally the meta tag). For example: \"0.4\", \"1.0-rc.2\", \"1.0\" (after stable release).\nSee https://github.com/open-telemetry/opentelemetry-configuration/blob/main/VERSIONING.md for more details.\nThe yaml format is documented at https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema\nProperty is required and must be non-null.\n") + @Nonnull + private String fileFormat; + + /** + * Configure if the SDK is disabled or not. If omitted or null, false is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("disabled") + @JsonPropertyDescription( + "Configure if the SDK is disabled or not.\nIf omitted or null, false is used.\n") + private Boolean disabled; + + /** (Can be null) */ + @Nullable + @JsonProperty("log_level") + private OpenTelemetryConfigurationModel.SeverityNumber logLevel; + + /** (Can be null) */ + @Nullable + @JsonProperty("attribute_limits") + private AttributeLimitsModel attributeLimits; + + @Nullable + @JsonProperty("logger_provider") + private LoggerProviderModel loggerProvider; + + @Nullable + @JsonProperty("meter_provider") + private MeterProviderModel meterProvider; + + /** (Can be null) */ + @Nullable + @JsonProperty("propagator") + private PropagatorModel propagator; + + @Nullable + @JsonProperty("tracer_provider") + private TracerProviderModel tracerProvider; + + /** (Can be null) */ + @Nullable + @JsonProperty("resource") + private ResourceModel resource; + + /** (Can be null) */ + @Nullable + @JsonProperty("instrumentation/development") + private ExperimentalInstrumentationModel instrumentationDevelopment; + + /** (Can be null) */ + @Nullable + @JsonProperty("distribution") + private DistributionModel distribution; + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * The file format version. Represented as a string including the semver major, minor version + * numbers (and optionally the meta tag). For example: "0.4", "1.0-rc.2", "1.0" (after stable + * release). See + * https://github.com/open-telemetry/opentelemetry-configuration/blob/main/VERSIONING.md for more + * details. The yaml format is documented at + * https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema Property is + * required and must be non-null. + * + *

(Required) + */ + @JsonProperty("file_format") + @Nullable + public String getFileFormat() { + return fileFormat; + } + + public OpenTelemetryConfigurationModel withFileFormat(String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** Configure if the SDK is disabled or not. If omitted or null, false is used. */ + @JsonProperty("disabled") + @Nullable + public Boolean getDisabled() { + return disabled; + } + + public OpenTelemetryConfigurationModel withDisabled(Boolean disabled) { + this.disabled = disabled; + return this; + } + + @JsonProperty("log_level") + @Nullable + public OpenTelemetryConfigurationModel.SeverityNumber getLogLevel() { + return logLevel; + } + + public OpenTelemetryConfigurationModel withLogLevel( + OpenTelemetryConfigurationModel.SeverityNumber logLevel) { + this.logLevel = logLevel; + return this; + } + + @JsonProperty("attribute_limits") + @Nullable + public AttributeLimitsModel getAttributeLimits() { + return attributeLimits; + } + + public OpenTelemetryConfigurationModel withAttributeLimits(AttributeLimitsModel attributeLimits) { + this.attributeLimits = attributeLimits; + return this; + } + + @JsonProperty("logger_provider") + @Nullable + public LoggerProviderModel getLoggerProvider() { + return loggerProvider; + } + + public OpenTelemetryConfigurationModel withLoggerProvider(LoggerProviderModel loggerProvider) { + this.loggerProvider = loggerProvider; + return this; + } + + @JsonProperty("meter_provider") + @Nullable + public MeterProviderModel getMeterProvider() { + return meterProvider; + } + + public OpenTelemetryConfigurationModel withMeterProvider(MeterProviderModel meterProvider) { + this.meterProvider = meterProvider; + return this; + } + + @JsonProperty("propagator") + @Nullable + public PropagatorModel getPropagator() { + return propagator; + } + + public OpenTelemetryConfigurationModel withPropagator(PropagatorModel propagator) { + this.propagator = propagator; + return this; + } + + @JsonProperty("tracer_provider") + @Nullable + public TracerProviderModel getTracerProvider() { + return tracerProvider; + } + + public OpenTelemetryConfigurationModel withTracerProvider(TracerProviderModel tracerProvider) { + this.tracerProvider = tracerProvider; + return this; + } + + @JsonProperty("resource") + @Nullable + public ResourceModel getResource() { + return resource; + } + + public OpenTelemetryConfigurationModel withResource(ResourceModel resource) { + this.resource = resource; + return this; + } + + @JsonProperty("instrumentation/development") + @Nullable + public ExperimentalInstrumentationModel getInstrumentationDevelopment() { + return instrumentationDevelopment; + } + + public OpenTelemetryConfigurationModel withInstrumentationDevelopment( + ExperimentalInstrumentationModel instrumentationDevelopment) { + this.instrumentationDevelopment = instrumentationDevelopment; + return this; + } + + @JsonProperty("distribution") + @Nullable + public DistributionModel getDistribution() { + return distribution; + } + + public OpenTelemetryConfigurationModel withDistribution(DistributionModel distribution) { + this.distribution = distribution; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public OpenTelemetryConfigurationModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(OpenTelemetryConfigurationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("fileFormat"); + sb.append('='); + sb.append(((this.fileFormat == null) ? "" : this.fileFormat)); + sb.append(','); + sb.append("disabled"); + sb.append('='); + sb.append(((this.disabled == null) ? "" : this.disabled)); + sb.append(','); + sb.append("logLevel"); + sb.append('='); + sb.append(((this.logLevel == null) ? "" : this.logLevel)); + sb.append(','); + sb.append("attributeLimits"); + sb.append('='); + sb.append(((this.attributeLimits == null) ? "" : this.attributeLimits)); + sb.append(','); + sb.append("loggerProvider"); + sb.append('='); + sb.append(((this.loggerProvider == null) ? "" : this.loggerProvider)); + sb.append(','); + sb.append("meterProvider"); + sb.append('='); + sb.append(((this.meterProvider == null) ? "" : this.meterProvider)); + sb.append(','); + sb.append("propagator"); + sb.append('='); + sb.append(((this.propagator == null) ? "" : this.propagator)); + sb.append(','); + sb.append("tracerProvider"); + sb.append('='); + sb.append(((this.tracerProvider == null) ? "" : this.tracerProvider)); + sb.append(','); + sb.append("resource"); + sb.append('='); + sb.append(((this.resource == null) ? "" : this.resource)); + sb.append(','); + sb.append("instrumentationDevelopment"); + sb.append('='); + sb.append( + ((this.instrumentationDevelopment == null) ? "" : this.instrumentationDevelopment)); + sb.append(','); + sb.append("distribution"); + sb.append('='); + sb.append(((this.distribution == null) ? "" : this.distribution)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.instrumentationDevelopment == null) + ? 0 + : this.instrumentationDevelopment.hashCode())); + result = + ((result * 31) + ((this.attributeLimits == null) ? 0 : this.attributeLimits.hashCode())); + result = ((result * 31) + ((this.logLevel == null) ? 0 : this.logLevel.hashCode())); + result = ((result * 31) + ((this.tracerProvider == null) ? 0 : this.tracerProvider.hashCode())); + result = ((result * 31) + ((this.resource == null) ? 0 : this.resource.hashCode())); + result = ((result * 31) + ((this.meterProvider == null) ? 0 : this.meterProvider.hashCode())); + result = ((result * 31) + ((this.propagator == null) ? 0 : this.propagator.hashCode())); + result = ((result * 31) + ((this.disabled == null) ? 0 : this.disabled.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.distribution == null) ? 0 : this.distribution.hashCode())); + result = ((result * 31) + ((this.fileFormat == null) ? 0 : this.fileFormat.hashCode())); + result = ((result * 31) + ((this.loggerProvider == null) ? 0 : this.loggerProvider.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof OpenTelemetryConfigurationModel) == false) { + return false; + } + OpenTelemetryConfigurationModel rhs = ((OpenTelemetryConfigurationModel) other); + return (((((((((((((this.instrumentationDevelopment == rhs.instrumentationDevelopment) + || ((this.instrumentationDevelopment != null) + && this.instrumentationDevelopment.equals( + rhs.instrumentationDevelopment))) + && ((this.attributeLimits == rhs.attributeLimits) + || ((this.attributeLimits != null) + && this.attributeLimits.equals( + rhs.attributeLimits)))) + && ((this.logLevel == rhs.logLevel) + || ((this.logLevel != null) + && this.logLevel.equals(rhs.logLevel)))) + && ((this.tracerProvider == rhs.tracerProvider) + || ((this.tracerProvider != null) + && this.tracerProvider.equals(rhs.tracerProvider)))) + && ((this.resource == rhs.resource) + || ((this.resource != null) + && this.resource.equals(rhs.resource)))) + && ((this.meterProvider == rhs.meterProvider) + || ((this.meterProvider != null) + && this.meterProvider.equals(rhs.meterProvider)))) + && ((this.propagator == rhs.propagator) + || ((this.propagator != null) + && this.propagator.equals(rhs.propagator)))) + && ((this.disabled == rhs.disabled) + || ((this.disabled != null) && this.disabled.equals(rhs.disabled)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.distribution == rhs.distribution) + || ((this.distribution != null) && this.distribution.equals(rhs.distribution)))) + && ((this.fileFormat == rhs.fileFormat) + || ((this.fileFormat != null) && this.fileFormat.equals(rhs.fileFormat)))) + && ((this.loggerProvider == rhs.loggerProvider) + || ((this.loggerProvider != null) && this.loggerProvider.equals(rhs.loggerProvider)))); + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum SeverityNumber { + TRACE("trace"), + TRACE_2("trace2"), + TRACE_3("trace3"), + TRACE_4("trace4"), + DEBUG("debug"), + DEBUG_2("debug2"), + DEBUG_3("debug3"), + DEBUG_4("debug4"), + INFO("info"), + INFO_2("info2"), + INFO_3("info3"), + INFO_4("info4"), + WARN("warn"), + WARN_2("warn2"), + WARN_3("warn3"), + WARN_4("warn4"), + ERROR("error"), + ERROR_2("error2"), + ERROR_3("error3"), + ERROR_4("error4"), + FATAL("fatal"), + FATAL_2("fatal2"), + FATAL_3("fatal3"), + FATAL_4("fatal4"); + private final String value; + private static final Map CONSTANTS = + new HashMap(); + + static { + for (OpenTelemetryConfigurationModel.SeverityNumber c : values()) { + CONSTANTS.put(c.value, c); + } + } + + SeverityNumber(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static OpenTelemetryConfigurationModel.SeverityNumber fromValue(String value) { + OpenTelemetryConfigurationModel.SeverityNumber constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java new file mode 100644 index 00000000000..dc8462102c5 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcExporterModel.java @@ -0,0 +1,246 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"endpoint", "tls", "headers", "headers_list", "compression", "timeout"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class OtlpGrpcExporterModel { + + /** + * Configure endpoint. If omitted or null, http://localhost:4317 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("endpoint") + @JsonPropertyDescription( + "Configure endpoint.\nIf omitted or null, http://localhost:4317 is used.\n") + private String endpoint; + + /** (Can be null) */ + @Nullable + @JsonProperty("tls") + private GrpcTlsModel tls; + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers") + @JsonPropertyDescription( + "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + private List headers; + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers_list") + @JsonPropertyDescription( + "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + private String headersList; + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("compression") + @JsonPropertyDescription( + "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + private String compression; + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("timeout") + @JsonPropertyDescription( + "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + private Integer timeout; + + /** Configure endpoint. If omitted or null, http://localhost:4317 is used. */ + @JsonProperty("endpoint") + @Nullable + public String getEndpoint() { + return endpoint; + } + + public OtlpGrpcExporterModel withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + @JsonProperty("tls") + @Nullable + public GrpcTlsModel getTls() { + return tls; + } + + public OtlpGrpcExporterModel withTls(GrpcTlsModel tls) { + this.tls = tls; + return this; + } + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + */ + @JsonProperty("headers") + @Nullable + public List getHeaders() { + return headers; + } + + public OtlpGrpcExporterModel withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + */ + @JsonProperty("headers_list") + @Nullable + public String getHeadersList() { + return headersList; + } + + public OtlpGrpcExporterModel withHeadersList(String headersList) { + this.headersList = headersList; + return this; + } + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + */ + @JsonProperty("compression") + @Nullable + public String getCompression() { + return compression; + } + + public OtlpGrpcExporterModel withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + */ + @JsonProperty("timeout") + @Nullable + public Integer getTimeout() { + return timeout; + } + + public OtlpGrpcExporterModel withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(OtlpGrpcExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("endpoint"); + sb.append('='); + sb.append(((this.endpoint == null) ? "" : this.endpoint)); + sb.append(','); + sb.append("tls"); + sb.append('='); + sb.append(((this.tls == null) ? "" : this.tls)); + sb.append(','); + sb.append("headers"); + sb.append('='); + sb.append(((this.headers == null) ? "" : this.headers)); + sb.append(','); + sb.append("headersList"); + sb.append('='); + sb.append(((this.headersList == null) ? "" : this.headersList)); + sb.append(','); + sb.append("compression"); + sb.append('='); + sb.append(((this.compression == null) ? "" : this.compression)); + sb.append(','); + sb.append("timeout"); + sb.append('='); + sb.append(((this.timeout == null) ? "" : this.timeout)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); + result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); + result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); + result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); + result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); + result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof OtlpGrpcExporterModel) == false) { + return false; + } + OtlpGrpcExporterModel rhs = ((OtlpGrpcExporterModel) other); + return (((((((this.headersList == rhs.headersList) + || ((this.headersList != null) + && this.headersList.equals(rhs.headersList))) + && ((this.headers == rhs.headers) + || ((this.headers != null) && this.headers.equals(rhs.headers)))) + && ((this.endpoint == rhs.endpoint) + || ((this.endpoint != null) && this.endpoint.equals(rhs.endpoint)))) + && ((this.tls == rhs.tls) || ((this.tls != null) && this.tls.equals(rhs.tls)))) + && ((this.compression == rhs.compression) + || ((this.compression != null) && this.compression.equals(rhs.compression)))) + && ((this.timeout == rhs.timeout) + || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java new file mode 100644 index 00000000000..c3d67167930 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpGrpcMetricExporterModel.java @@ -0,0 +1,317 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "endpoint", + "tls", + "headers", + "headers_list", + "compression", + "timeout", + "temporality_preference", + "default_histogram_aggregation" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class OtlpGrpcMetricExporterModel { + + /** + * Configure endpoint. If omitted or null, http://localhost:4317 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("endpoint") + @JsonPropertyDescription( + "Configure endpoint.\nIf omitted or null, http://localhost:4317 is used.\n") + private String endpoint; + + /** (Can be null) */ + @Nullable + @JsonProperty("tls") + private GrpcTlsModel tls; + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers") + @JsonPropertyDescription( + "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + private List headers; + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers_list") + @JsonPropertyDescription( + "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + private String headersList; + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("compression") + @JsonPropertyDescription( + "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + private String compression; + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("timeout") + @JsonPropertyDescription( + "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + private Integer timeout; + + /** (Can be null) */ + @Nullable + @JsonProperty("temporality_preference") + private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; + + /** (Can be null) */ + @Nullable + @JsonProperty("default_histogram_aggregation") + private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + defaultHistogramAggregation; + + /** Configure endpoint. If omitted or null, http://localhost:4317 is used. */ + @JsonProperty("endpoint") + @Nullable + public String getEndpoint() { + return endpoint; + } + + public OtlpGrpcMetricExporterModel withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + @JsonProperty("tls") + @Nullable + public GrpcTlsModel getTls() { + return tls; + } + + public OtlpGrpcMetricExporterModel withTls(GrpcTlsModel tls) { + this.tls = tls; + return this; + } + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + */ + @JsonProperty("headers") + @Nullable + public List getHeaders() { + return headers; + } + + public OtlpGrpcMetricExporterModel withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + */ + @JsonProperty("headers_list") + @Nullable + public String getHeadersList() { + return headersList; + } + + public OtlpGrpcMetricExporterModel withHeadersList(String headersList) { + this.headersList = headersList; + return this; + } + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + */ + @JsonProperty("compression") + @Nullable + public String getCompression() { + return compression; + } + + public OtlpGrpcMetricExporterModel withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + */ + @JsonProperty("timeout") + @Nullable + public Integer getTimeout() { + return timeout; + } + + public OtlpGrpcMetricExporterModel withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + + @JsonProperty("temporality_preference") + @Nullable + public OtlpHttpMetricExporterModel.ExporterTemporalityPreference getTemporalityPreference() { + return temporalityPreference; + } + + public OtlpGrpcMetricExporterModel withTemporalityPreference( + OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference) { + this.temporalityPreference = temporalityPreference; + return this; + } + + @JsonProperty("default_histogram_aggregation") + @Nullable + public OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + getDefaultHistogramAggregation() { + return defaultHistogramAggregation; + } + + public OtlpGrpcMetricExporterModel withDefaultHistogramAggregation( + OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation) { + this.defaultHistogramAggregation = defaultHistogramAggregation; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(OtlpGrpcMetricExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("endpoint"); + sb.append('='); + sb.append(((this.endpoint == null) ? "" : this.endpoint)); + sb.append(','); + sb.append("tls"); + sb.append('='); + sb.append(((this.tls == null) ? "" : this.tls)); + sb.append(','); + sb.append("headers"); + sb.append('='); + sb.append(((this.headers == null) ? "" : this.headers)); + sb.append(','); + sb.append("headersList"); + sb.append('='); + sb.append(((this.headersList == null) ? "" : this.headersList)); + sb.append(','); + sb.append("compression"); + sb.append('='); + sb.append(((this.compression == null) ? "" : this.compression)); + sb.append(','); + sb.append("timeout"); + sb.append('='); + sb.append(((this.timeout == null) ? "" : this.timeout)); + sb.append(','); + sb.append("temporalityPreference"); + sb.append('='); + sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); + sb.append(','); + sb.append("defaultHistogramAggregation"); + sb.append('='); + sb.append( + ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); + result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); + result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); + result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); + result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); + result = + ((result * 31) + + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); + result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); + result = + ((result * 31) + + ((this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof OtlpGrpcMetricExporterModel) == false) { + return false; + } + OtlpGrpcMetricExporterModel rhs = ((OtlpGrpcMetricExporterModel) other); + return (((((((((this.headers == rhs.headers) + || ((this.headers != null) && this.headers.equals(rhs.headers))) + && ((this.endpoint == rhs.endpoint) + || ((this.endpoint != null) + && this.endpoint.equals(rhs.endpoint)))) + && ((this.headersList == rhs.headersList) + || ((this.headersList != null) + && this.headersList.equals(rhs.headersList)))) + && ((this.tls == rhs.tls) + || ((this.tls != null) && this.tls.equals(rhs.tls)))) + && ((this.compression == rhs.compression) + || ((this.compression != null) + && this.compression.equals(rhs.compression)))) + && ((this.temporalityPreference == rhs.temporalityPreference) + || ((this.temporalityPreference != null) + && this.temporalityPreference.equals(rhs.temporalityPreference)))) + && ((this.timeout == rhs.timeout) + || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))) + && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) + || ((this.defaultHistogramAggregation != null) + && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java new file mode 100644 index 00000000000..d3390db5b6e --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpExporterModel.java @@ -0,0 +1,325 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "endpoint", + "tls", + "headers", + "headers_list", + "compression", + "timeout", + "encoding" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class OtlpHttpExporterModel { + + /** + * Configure endpoint, including the signal specific path. If omitted or null, the + * http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("endpoint") + @JsonPropertyDescription( + "Configure endpoint, including the signal specific path.\nIf omitted or null, the http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used.\n") + private String endpoint; + + /** (Can be null) */ + @Nullable + @JsonProperty("tls") + private HttpTlsModel tls; + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers") + @JsonPropertyDescription( + "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + private List headers; + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers_list") + @JsonPropertyDescription( + "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + private String headersList; + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("compression") + @JsonPropertyDescription( + "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + private String compression; + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("timeout") + @JsonPropertyDescription( + "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + private Integer timeout; + + /** (Can be null) */ + @Nullable + @JsonProperty("encoding") + private OtlpHttpExporterModel.OtlpHttpEncoding encoding; + + /** + * Configure endpoint, including the signal specific path. If omitted or null, the + * http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used. + */ + @JsonProperty("endpoint") + @Nullable + public String getEndpoint() { + return endpoint; + } + + public OtlpHttpExporterModel withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + @JsonProperty("tls") + @Nullable + public HttpTlsModel getTls() { + return tls; + } + + public OtlpHttpExporterModel withTls(HttpTlsModel tls) { + this.tls = tls; + return this; + } + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + */ + @JsonProperty("headers") + @Nullable + public List getHeaders() { + return headers; + } + + public OtlpHttpExporterModel withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + */ + @JsonProperty("headers_list") + @Nullable + public String getHeadersList() { + return headersList; + } + + public OtlpHttpExporterModel withHeadersList(String headersList) { + this.headersList = headersList; + return this; + } + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + */ + @JsonProperty("compression") + @Nullable + public String getCompression() { + return compression; + } + + public OtlpHttpExporterModel withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + */ + @JsonProperty("timeout") + @Nullable + public Integer getTimeout() { + return timeout; + } + + public OtlpHttpExporterModel withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + + @JsonProperty("encoding") + @Nullable + public OtlpHttpExporterModel.OtlpHttpEncoding getEncoding() { + return encoding; + } + + public OtlpHttpExporterModel withEncoding(OtlpHttpExporterModel.OtlpHttpEncoding encoding) { + this.encoding = encoding; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(OtlpHttpExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("endpoint"); + sb.append('='); + sb.append(((this.endpoint == null) ? "" : this.endpoint)); + sb.append(','); + sb.append("tls"); + sb.append('='); + sb.append(((this.tls == null) ? "" : this.tls)); + sb.append(','); + sb.append("headers"); + sb.append('='); + sb.append(((this.headers == null) ? "" : this.headers)); + sb.append(','); + sb.append("headersList"); + sb.append('='); + sb.append(((this.headersList == null) ? "" : this.headersList)); + sb.append(','); + sb.append("compression"); + sb.append('='); + sb.append(((this.compression == null) ? "" : this.compression)); + sb.append(','); + sb.append("timeout"); + sb.append('='); + sb.append(((this.timeout == null) ? "" : this.timeout)); + sb.append(','); + sb.append("encoding"); + sb.append('='); + sb.append(((this.encoding == null) ? "" : this.encoding)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); + result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); + result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); + result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); + result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); + result = ((result * 31) + ((this.encoding == null) ? 0 : this.encoding.hashCode())); + result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof OtlpHttpExporterModel) == false) { + return false; + } + OtlpHttpExporterModel rhs = ((OtlpHttpExporterModel) other); + return ((((((((this.headers == rhs.headers) + || ((this.headers != null) && this.headers.equals(rhs.headers))) + && ((this.endpoint == rhs.endpoint) + || ((this.endpoint != null) && this.endpoint.equals(rhs.endpoint)))) + && ((this.headersList == rhs.headersList) + || ((this.headersList != null) + && this.headersList.equals(rhs.headersList)))) + && ((this.tls == rhs.tls) || ((this.tls != null) && this.tls.equals(rhs.tls)))) + && ((this.compression == rhs.compression) + || ((this.compression != null) && this.compression.equals(rhs.compression)))) + && ((this.encoding == rhs.encoding) + || ((this.encoding != null) && this.encoding.equals(rhs.encoding)))) + && ((this.timeout == rhs.timeout) + || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))); + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum OtlpHttpEncoding { + PROTOBUF("protobuf"), + JSON("json"); + private final String value; + private static final Map CONSTANTS = + new HashMap(); + + static { + for (OtlpHttpExporterModel.OtlpHttpEncoding c : values()) { + CONSTANTS.put(c.value, c); + } + } + + OtlpHttpEncoding(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static OtlpHttpExporterModel.OtlpHttpEncoding fromValue(String value) { + OtlpHttpExporterModel.OtlpHttpEncoding constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java new file mode 100644 index 00000000000..85b18f04082 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/OtlpHttpMetricExporterModel.java @@ -0,0 +1,433 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "endpoint", + "tls", + "headers", + "headers_list", + "compression", + "timeout", + "encoding", + "temporality_preference", + "default_histogram_aggregation" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class OtlpHttpMetricExporterModel { + + /** + * Configure endpoint. If omitted or null, http://localhost:4318/v1/metrics is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("endpoint") + @JsonPropertyDescription( + "Configure endpoint.\nIf omitted or null, http://localhost:4318/v1/metrics is used.\n") + private String endpoint; + + /** (Can be null) */ + @Nullable + @JsonProperty("tls") + private HttpTlsModel tls; + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers") + @JsonPropertyDescription( + "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\nIf omitted, no headers are added.\n") + private List headers; + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("headers_list") + @JsonPropertyDescription( + "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n") + private String headersList; + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("compression") + @JsonPropertyDescription( + "Configure compression.\nKnown values include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n") + private String compression; + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("timeout") + @JsonPropertyDescription( + "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n") + private Integer timeout; + + /** (Can be null) */ + @Nullable + @JsonProperty("encoding") + private OtlpHttpExporterModel.OtlpHttpEncoding encoding; + + /** (Can be null) */ + @Nullable + @JsonProperty("temporality_preference") + private OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference; + + /** (Can be null) */ + @Nullable + @JsonProperty("default_histogram_aggregation") + private OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + defaultHistogramAggregation; + + /** Configure endpoint. If omitted or null, http://localhost:4318/v1/metrics is used. */ + @JsonProperty("endpoint") + @Nullable + public String getEndpoint() { + return endpoint; + } + + public OtlpHttpMetricExporterModel withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + @JsonProperty("tls") + @Nullable + public HttpTlsModel getTls() { + return tls; + } + + public OtlpHttpMetricExporterModel withTls(HttpTlsModel tls) { + this.tls = tls; + return this; + } + + /** + * Configure headers. Entries have higher priority than entries from .headers_list. If an entry's + * .value is null, the entry is ignored. If omitted, no headers are added. + */ + @JsonProperty("headers") + @Nullable + public List getHeaders() { + return headers; + } + + public OtlpHttpMetricExporterModel withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Configure headers. Entries have lower priority than entries from .headers. The value is a list + * of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options + * for details. If omitted or null, no headers are added. + */ + @JsonProperty("headers_list") + @Nullable + public String getHeadersList() { + return headersList; + } + + public OtlpHttpMetricExporterModel withHeadersList(String headersList) { + this.headersList = headersList; + return this; + } + + /** + * Configure compression. Known values include: gzip, none. Implementations may support other + * compression algorithms. If omitted or null, none is used. + */ + @JsonProperty("compression") + @Nullable + public String getCompression() { + return compression; + } + + public OtlpHttpMetricExporterModel withCompression(String compression) { + this.compression = compression; + return this; + } + + /** + * Configure max time (in milliseconds) to wait for each export. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 10000 is used. + */ + @JsonProperty("timeout") + @Nullable + public Integer getTimeout() { + return timeout; + } + + public OtlpHttpMetricExporterModel withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + + @JsonProperty("encoding") + @Nullable + public OtlpHttpExporterModel.OtlpHttpEncoding getEncoding() { + return encoding; + } + + public OtlpHttpMetricExporterModel withEncoding(OtlpHttpExporterModel.OtlpHttpEncoding encoding) { + this.encoding = encoding; + return this; + } + + @JsonProperty("temporality_preference") + @Nullable + public OtlpHttpMetricExporterModel.ExporterTemporalityPreference getTemporalityPreference() { + return temporalityPreference; + } + + public OtlpHttpMetricExporterModel withTemporalityPreference( + OtlpHttpMetricExporterModel.ExporterTemporalityPreference temporalityPreference) { + this.temporalityPreference = temporalityPreference; + return this; + } + + @JsonProperty("default_histogram_aggregation") + @Nullable + public OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation + getDefaultHistogramAggregation() { + return defaultHistogramAggregation; + } + + public OtlpHttpMetricExporterModel withDefaultHistogramAggregation( + OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation defaultHistogramAggregation) { + this.defaultHistogramAggregation = defaultHistogramAggregation; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(OtlpHttpMetricExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("endpoint"); + sb.append('='); + sb.append(((this.endpoint == null) ? "" : this.endpoint)); + sb.append(','); + sb.append("tls"); + sb.append('='); + sb.append(((this.tls == null) ? "" : this.tls)); + sb.append(','); + sb.append("headers"); + sb.append('='); + sb.append(((this.headers == null) ? "" : this.headers)); + sb.append(','); + sb.append("headersList"); + sb.append('='); + sb.append(((this.headersList == null) ? "" : this.headersList)); + sb.append(','); + sb.append("compression"); + sb.append('='); + sb.append(((this.compression == null) ? "" : this.compression)); + sb.append(','); + sb.append("timeout"); + sb.append('='); + sb.append(((this.timeout == null) ? "" : this.timeout)); + sb.append(','); + sb.append("encoding"); + sb.append('='); + sb.append(((this.encoding == null) ? "" : this.encoding)); + sb.append(','); + sb.append("temporalityPreference"); + sb.append('='); + sb.append(((this.temporalityPreference == null) ? "" : this.temporalityPreference)); + sb.append(','); + sb.append("defaultHistogramAggregation"); + sb.append('='); + sb.append( + ((this.defaultHistogramAggregation == null) ? "" : this.defaultHistogramAggregation)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.headers == null) ? 0 : this.headers.hashCode())); + result = ((result * 31) + ((this.endpoint == null) ? 0 : this.endpoint.hashCode())); + result = ((result * 31) + ((this.headersList == null) ? 0 : this.headersList.hashCode())); + result = ((result * 31) + ((this.tls == null) ? 0 : this.tls.hashCode())); + result = ((result * 31) + ((this.compression == null) ? 0 : this.compression.hashCode())); + result = ((result * 31) + ((this.encoding == null) ? 0 : this.encoding.hashCode())); + result = + ((result * 31) + + ((this.temporalityPreference == null) ? 0 : this.temporalityPreference.hashCode())); + result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); + result = + ((result * 31) + + ((this.defaultHistogramAggregation == null) + ? 0 + : this.defaultHistogramAggregation.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof OtlpHttpMetricExporterModel) == false) { + return false; + } + OtlpHttpMetricExporterModel rhs = ((OtlpHttpMetricExporterModel) other); + return ((((((((((this.headers == rhs.headers) + || ((this.headers != null) + && this.headers.equals(rhs.headers))) + && ((this.endpoint == rhs.endpoint) + || ((this.endpoint != null) + && this.endpoint.equals(rhs.endpoint)))) + && ((this.headersList == rhs.headersList) + || ((this.headersList != null) + && this.headersList.equals(rhs.headersList)))) + && ((this.tls == rhs.tls) + || ((this.tls != null) && this.tls.equals(rhs.tls)))) + && ((this.compression == rhs.compression) + || ((this.compression != null) + && this.compression.equals(rhs.compression)))) + && ((this.encoding == rhs.encoding) + || ((this.encoding != null) && this.encoding.equals(rhs.encoding)))) + && ((this.temporalityPreference == rhs.temporalityPreference) + || ((this.temporalityPreference != null) + && this.temporalityPreference.equals(rhs.temporalityPreference)))) + && ((this.timeout == rhs.timeout) + || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))) + && ((this.defaultHistogramAggregation == rhs.defaultHistogramAggregation) + || ((this.defaultHistogramAggregation != null) + && this.defaultHistogramAggregation.equals(rhs.defaultHistogramAggregation)))); + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum ExporterDefaultHistogramAggregation { + EXPLICIT_BUCKET_HISTOGRAM("explicit_bucket_histogram"), + BASE_2_EXPONENTIAL_BUCKET_HISTOGRAM("base2_exponential_bucket_histogram"); + private final String value; + private static final Map< + String, OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation> + CONSTANTS = + new HashMap(); + + static { + for (OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation c : values()) { + CONSTANTS.put(c.value, c); + } + } + + ExporterDefaultHistogramAggregation(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation fromValue( + String value) { + OtlpHttpMetricExporterModel.ExporterDefaultHistogramAggregation constant = + CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum ExporterTemporalityPreference { + CUMULATIVE("cumulative"), + DELTA("delta"), + LOW_MEMORY("low_memory"); + private final String value; + private static final Map + CONSTANTS = + new HashMap(); + + static { + for (OtlpHttpMetricExporterModel.ExporterTemporalityPreference c : values()) { + CONSTANTS.put(c.value, c); + } + } + + ExporterTemporalityPreference(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static OtlpHttpMetricExporterModel.ExporterTemporalityPreference fromValue( + String value) { + OtlpHttpMetricExporterModel.ExporterTemporalityPreference constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java new file mode 100644 index 00000000000..a999a831210 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ParentBasedSamplerModel.java @@ -0,0 +1,183 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "root", + "remote_parent_sampled", + "remote_parent_not_sampled", + "local_parent_sampled", + "local_parent_not_sampled" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ParentBasedSamplerModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("root") + private SamplerModel root; + + /** (Can be null) */ + @Nullable + @JsonProperty("remote_parent_sampled") + private SamplerModel remoteParentSampled; + + /** (Can be null) */ + @Nullable + @JsonProperty("remote_parent_not_sampled") + private SamplerModel remoteParentNotSampled; + + /** (Can be null) */ + @Nullable + @JsonProperty("local_parent_sampled") + private SamplerModel localParentSampled; + + /** (Can be null) */ + @Nullable + @JsonProperty("local_parent_not_sampled") + private SamplerModel localParentNotSampled; + + @JsonProperty("root") + @Nullable + public SamplerModel getRoot() { + return root; + } + + public ParentBasedSamplerModel withRoot(SamplerModel root) { + this.root = root; + return this; + } + + @JsonProperty("remote_parent_sampled") + @Nullable + public SamplerModel getRemoteParentSampled() { + return remoteParentSampled; + } + + public ParentBasedSamplerModel withRemoteParentSampled(SamplerModel remoteParentSampled) { + this.remoteParentSampled = remoteParentSampled; + return this; + } + + @JsonProperty("remote_parent_not_sampled") + @Nullable + public SamplerModel getRemoteParentNotSampled() { + return remoteParentNotSampled; + } + + public ParentBasedSamplerModel withRemoteParentNotSampled(SamplerModel remoteParentNotSampled) { + this.remoteParentNotSampled = remoteParentNotSampled; + return this; + } + + @JsonProperty("local_parent_sampled") + @Nullable + public SamplerModel getLocalParentSampled() { + return localParentSampled; + } + + public ParentBasedSamplerModel withLocalParentSampled(SamplerModel localParentSampled) { + this.localParentSampled = localParentSampled; + return this; + } + + @JsonProperty("local_parent_not_sampled") + @Nullable + public SamplerModel getLocalParentNotSampled() { + return localParentNotSampled; + } + + public ParentBasedSamplerModel withLocalParentNotSampled(SamplerModel localParentNotSampled) { + this.localParentNotSampled = localParentNotSampled; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ParentBasedSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("root"); + sb.append('='); + sb.append(((this.root == null) ? "" : this.root)); + sb.append(','); + sb.append("remoteParentSampled"); + sb.append('='); + sb.append(((this.remoteParentSampled == null) ? "" : this.remoteParentSampled)); + sb.append(','); + sb.append("remoteParentNotSampled"); + sb.append('='); + sb.append(((this.remoteParentNotSampled == null) ? "" : this.remoteParentNotSampled)); + sb.append(','); + sb.append("localParentSampled"); + sb.append('='); + sb.append(((this.localParentSampled == null) ? "" : this.localParentSampled)); + sb.append(','); + sb.append("localParentNotSampled"); + sb.append('='); + sb.append(((this.localParentNotSampled == null) ? "" : this.localParentNotSampled)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.remoteParentNotSampled == null) ? 0 : this.remoteParentNotSampled.hashCode())); + result = + ((result * 31) + + ((this.localParentNotSampled == null) ? 0 : this.localParentNotSampled.hashCode())); + result = + ((result * 31) + + ((this.remoteParentSampled == null) ? 0 : this.remoteParentSampled.hashCode())); + result = ((result * 31) + ((this.root == null) ? 0 : this.root.hashCode())); + result = + ((result * 31) + + ((this.localParentSampled == null) ? 0 : this.localParentSampled.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ParentBasedSamplerModel) == false) { + return false; + } + ParentBasedSamplerModel rhs = ((ParentBasedSamplerModel) other); + return ((((((this.remoteParentNotSampled == rhs.remoteParentNotSampled) + || ((this.remoteParentNotSampled != null) + && this.remoteParentNotSampled.equals(rhs.remoteParentNotSampled))) + && ((this.localParentNotSampled == rhs.localParentNotSampled) + || ((this.localParentNotSampled != null) + && this.localParentNotSampled.equals(rhs.localParentNotSampled)))) + && ((this.remoteParentSampled == rhs.remoteParentSampled) + || ((this.remoteParentSampled != null) + && this.remoteParentSampled.equals(rhs.remoteParentSampled)))) + && ((this.root == rhs.root) || ((this.root != null) && this.root.equals(rhs.root)))) + && ((this.localParentSampled == rhs.localParentSampled) + || ((this.localParentSampled != null) + && this.localParentSampled.equals(rhs.localParentSampled)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java new file mode 100644 index 00000000000..1f6b13d9231 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PeriodicMetricReaderModel.java @@ -0,0 +1,202 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"interval", "timeout", "exporter", "producers", "cardinality_limits"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class PeriodicMetricReaderModel { + + /** + * Configure delay interval (in milliseconds) between start of two consecutive exports. Value must + * be non-negative. If omitted or null, 60000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("interval") + @JsonPropertyDescription( + "Configure delay interval (in milliseconds) between start of two consecutive exports. \nValue must be non-negative.\nIf omitted or null, 60000 is used.\n") + private Integer interval; + + /** + * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("timeout") + @JsonPropertyDescription( + "Configure maximum allowed time (in milliseconds) to export data. \nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 30000 is used.\n") + private Integer timeout; + + /** (Required) */ + @JsonProperty("exporter") + @Nonnull + private PushMetricExporterModel exporter; + + /** + * Configure metric producers. If omitted, no metric producers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("producers") + @JsonPropertyDescription( + "Configure metric producers.\nIf omitted, no metric producers are added.\n") + private List producers; + + /** (Can be null) */ + @Nullable + @JsonProperty("cardinality_limits") + private CardinalityLimitsModel cardinalityLimits; + + /** + * Configure delay interval (in milliseconds) between start of two consecutive exports. Value must + * be non-negative. If omitted or null, 60000 is used. + */ + @JsonProperty("interval") + @Nullable + public Integer getInterval() { + return interval; + } + + public PeriodicMetricReaderModel withInterval(Integer interval) { + this.interval = interval; + return this; + } + + /** + * Configure maximum allowed time (in milliseconds) to export data. Value must be non-negative. A + * value of 0 indicates no limit (infinity). If omitted or null, 30000 is used. + */ + @JsonProperty("timeout") + @Nullable + public Integer getTimeout() { + return timeout; + } + + public PeriodicMetricReaderModel withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + + /** (Required) */ + @JsonProperty("exporter") + @Nullable + public PushMetricExporterModel getExporter() { + return exporter; + } + + public PeriodicMetricReaderModel withExporter(PushMetricExporterModel exporter) { + this.exporter = exporter; + return this; + } + + /** Configure metric producers. If omitted, no metric producers are added. */ + @JsonProperty("producers") + @Nullable + public List getProducers() { + return producers; + } + + public PeriodicMetricReaderModel withProducers(List producers) { + this.producers = producers; + return this; + } + + @JsonProperty("cardinality_limits") + @Nullable + public CardinalityLimitsModel getCardinalityLimits() { + return cardinalityLimits; + } + + public PeriodicMetricReaderModel withCardinalityLimits(CardinalityLimitsModel cardinalityLimits) { + this.cardinalityLimits = cardinalityLimits; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PeriodicMetricReaderModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("interval"); + sb.append('='); + sb.append(((this.interval == null) ? "" : this.interval)); + sb.append(','); + sb.append("timeout"); + sb.append('='); + sb.append(((this.timeout == null) ? "" : this.timeout)); + sb.append(','); + sb.append("exporter"); + sb.append('='); + sb.append(((this.exporter == null) ? "" : this.exporter)); + sb.append(','); + sb.append("producers"); + sb.append('='); + sb.append(((this.producers == null) ? "" : this.producers)); + sb.append(','); + sb.append("cardinalityLimits"); + sb.append('='); + sb.append(((this.cardinalityLimits == null) ? "" : this.cardinalityLimits)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.interval == null) ? 0 : this.interval.hashCode())); + result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); + result = + ((result * 31) + + ((this.cardinalityLimits == null) ? 0 : this.cardinalityLimits.hashCode())); + result = ((result * 31) + ((this.timeout == null) ? 0 : this.timeout.hashCode())); + result = ((result * 31) + ((this.producers == null) ? 0 : this.producers.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PeriodicMetricReaderModel) == false) { + return false; + } + PeriodicMetricReaderModel rhs = ((PeriodicMetricReaderModel) other); + return ((((((this.interval == rhs.interval) + || ((this.interval != null) && this.interval.equals(rhs.interval))) + && ((this.exporter == rhs.exporter) + || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) + && ((this.cardinalityLimits == rhs.cardinalityLimits) + || ((this.cardinalityLimits != null) + && this.cardinalityLimits.equals(rhs.cardinalityLimits)))) + && ((this.timeout == rhs.timeout) + || ((this.timeout != null) && this.timeout.equals(rhs.timeout)))) + && ((this.producers == rhs.producers) + || ((this.producers != null) && this.producers.equals(rhs.producers)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java new file mode 100644 index 00000000000..a492177cb95 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PropagatorModel.java @@ -0,0 +1,135 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"composite", "composite_list"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class PropagatorModel { + + /** + * Configure the propagators in the composite text map propagator. Entries from .composite_list + * are appended to the list here with duplicates filtered out. Built-in propagator keys include: + * tracecontext, baggage, b3, b3multi. Known third party keys include: xray. If omitted, and + * .composite_list is omitted or null, a noop propagator is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("composite") + @JsonPropertyDescription( + "Configure the propagators in the composite text map propagator. Entries from .composite_list are appended to the list here with duplicates filtered out.\nBuilt-in propagator keys include: tracecontext, baggage, b3, b3multi. Known third party keys include: xray.\nIf omitted, and .composite_list is omitted or null, a noop propagator is used.\n") + private List composite; + + /** + * Configure the propagators in the composite text map propagator. Entries are appended to + * .composite with duplicates filtered out. The value is a comma separated list of propagator + * identifiers matching the format of OTEL_PROPAGATORS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration + * for details. Built-in propagator identifiers include: tracecontext, baggage, b3, b3multi. Known + * third party identifiers include: xray. If omitted or null, and .composite is omitted or null, a + * noop propagator is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("composite_list") + @JsonPropertyDescription( + "Configure the propagators in the composite text map propagator. Entries are appended to .composite with duplicates filtered out.\nThe value is a comma separated list of propagator identifiers matching the format of OTEL_PROPAGATORS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.\nBuilt-in propagator identifiers include: tracecontext, baggage, b3, b3multi. Known third party identifiers include: xray.\nIf omitted or null, and .composite is omitted or null, a noop propagator is used.\n") + private String compositeList; + + /** + * Configure the propagators in the composite text map propagator. Entries from .composite_list + * are appended to the list here with duplicates filtered out. Built-in propagator keys include: + * tracecontext, baggage, b3, b3multi. Known third party keys include: xray. If omitted, and + * .composite_list is omitted or null, a noop propagator is used. + */ + @JsonProperty("composite") + @Nullable + public List getComposite() { + return composite; + } + + public PropagatorModel withComposite(List composite) { + this.composite = composite; + return this; + } + + /** + * Configure the propagators in the composite text map propagator. Entries are appended to + * .composite with duplicates filtered out. The value is a comma separated list of propagator + * identifiers matching the format of OTEL_PROPAGATORS. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration + * for details. Built-in propagator identifiers include: tracecontext, baggage, b3, b3multi. Known + * third party identifiers include: xray. If omitted or null, and .composite is omitted or null, a + * noop propagator is used. + */ + @JsonProperty("composite_list") + @Nullable + public String getCompositeList() { + return compositeList; + } + + public PropagatorModel withCompositeList(String compositeList) { + this.compositeList = compositeList; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PropagatorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("composite"); + sb.append('='); + sb.append(((this.composite == null) ? "" : this.composite)); + sb.append(','); + sb.append("compositeList"); + sb.append('='); + sb.append(((this.compositeList == null) ? "" : this.compositeList)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.composite == null) ? 0 : this.composite.hashCode())); + result = ((result * 31) + ((this.compositeList == null) ? 0 : this.compositeList.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PropagatorModel) == false) { + return false; + } + PropagatorModel rhs = ((PropagatorModel) other); + return (((this.composite == rhs.composite) + || ((this.composite != null) && this.composite.equals(rhs.composite))) + && ((this.compositeList == rhs.compositeList) + || ((this.compositeList != null) && this.compositeList.equals(rhs.compositeList)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java new file mode 100644 index 00000000000..310e186b21a --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterModel.java @@ -0,0 +1,113 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"prometheus/development"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class PullMetricExporterModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("prometheus/development") + private ExperimentalPrometheusMetricExporterModel prometheusDevelopment; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("prometheus/development") + @Nullable + public ExperimentalPrometheusMetricExporterModel getPrometheusDevelopment() { + return prometheusDevelopment; + } + + public PullMetricExporterModel withPrometheusDevelopment( + ExperimentalPrometheusMetricExporterModel prometheusDevelopment) { + this.prometheusDevelopment = prometheusDevelopment; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, PullMetricExporterPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public PullMetricExporterModel withAdditionalProperty( + String name, PullMetricExporterPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PullMetricExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("prometheusDevelopment"); + sb.append('='); + sb.append(((this.prometheusDevelopment == null) ? "" : this.prometheusDevelopment)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.prometheusDevelopment == null) ? 0 : this.prometheusDevelopment.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PullMetricExporterModel) == false) { + return false; + } + PullMetricExporterModel rhs = ((PullMetricExporterModel) other); + return (((this.prometheusDevelopment == rhs.prometheusDevelopment) + || ((this.prometheusDevelopment != null) + && this.prometheusDevelopment.equals(rhs.prometheusDevelopment))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java new file mode 100644 index 00000000000..67f01874bbd --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricExporterPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class PullMetricExporterPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public PullMetricExporterPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PullMetricExporterPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PullMetricExporterPropertyModel) == false) { + return false; + } + PullMetricExporterPropertyModel rhs = ((PullMetricExporterPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java new file mode 100644 index 00000000000..ac001c326df --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PullMetricReaderModel.java @@ -0,0 +1,134 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"exporter", "producers", "cardinality_limits"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class PullMetricReaderModel { + + /** (Required) */ + @JsonProperty("exporter") + @Nonnull + private PullMetricExporterModel exporter; + + /** + * Configure metric producers. If omitted, no metric producers are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("producers") + @JsonPropertyDescription( + "Configure metric producers.\nIf omitted, no metric producers are added.\n") + private List producers; + + /** (Can be null) */ + @Nullable + @JsonProperty("cardinality_limits") + private CardinalityLimitsModel cardinalityLimits; + + /** (Required) */ + @JsonProperty("exporter") + @Nullable + public PullMetricExporterModel getExporter() { + return exporter; + } + + public PullMetricReaderModel withExporter(PullMetricExporterModel exporter) { + this.exporter = exporter; + return this; + } + + /** Configure metric producers. If omitted, no metric producers are added. */ + @JsonProperty("producers") + @Nullable + public List getProducers() { + return producers; + } + + public PullMetricReaderModel withProducers(List producers) { + this.producers = producers; + return this; + } + + @JsonProperty("cardinality_limits") + @Nullable + public CardinalityLimitsModel getCardinalityLimits() { + return cardinalityLimits; + } + + public PullMetricReaderModel withCardinalityLimits(CardinalityLimitsModel cardinalityLimits) { + this.cardinalityLimits = cardinalityLimits; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PullMetricReaderModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("exporter"); + sb.append('='); + sb.append(((this.exporter == null) ? "" : this.exporter)); + sb.append(','); + sb.append("producers"); + sb.append('='); + sb.append(((this.producers == null) ? "" : this.producers)); + sb.append(','); + sb.append("cardinalityLimits"); + sb.append('='); + sb.append(((this.cardinalityLimits == null) ? "" : this.cardinalityLimits)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.cardinalityLimits == null) ? 0 : this.cardinalityLimits.hashCode())); + result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); + result = ((result * 31) + ((this.producers == null) ? 0 : this.producers.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PullMetricReaderModel) == false) { + return false; + } + PullMetricReaderModel rhs = ((PullMetricReaderModel) other); + return ((((this.cardinalityLimits == rhs.cardinalityLimits) + || ((this.cardinalityLimits != null) + && this.cardinalityLimits.equals(rhs.cardinalityLimits))) + && ((this.exporter == rhs.exporter) + || ((this.exporter != null) && this.exporter.equals(rhs.exporter)))) + && ((this.producers == rhs.producers) + || ((this.producers != null) && this.producers.equals(rhs.producers)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java new file mode 100644 index 00000000000..dfc566921ee --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterModel.java @@ -0,0 +1,182 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"otlp_http", "otlp_grpc", "otlp_file/development", "console"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class PushMetricExporterModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_http") + private OtlpHttpMetricExporterModel otlpHttp; + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_grpc") + private OtlpGrpcMetricExporterModel otlpGrpc; + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_file/development") + private ExperimentalOtlpFileMetricExporterModel otlpFileDevelopment; + + /** (Can be null) */ + @Nullable + @JsonProperty("console") + private ConsoleMetricExporterModel console; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("otlp_http") + @Nullable + public OtlpHttpMetricExporterModel getOtlpHttp() { + return otlpHttp; + } + + public PushMetricExporterModel withOtlpHttp(OtlpHttpMetricExporterModel otlpHttp) { + this.otlpHttp = otlpHttp; + return this; + } + + @JsonProperty("otlp_grpc") + @Nullable + public OtlpGrpcMetricExporterModel getOtlpGrpc() { + return otlpGrpc; + } + + public PushMetricExporterModel withOtlpGrpc(OtlpGrpcMetricExporterModel otlpGrpc) { + this.otlpGrpc = otlpGrpc; + return this; + } + + @JsonProperty("otlp_file/development") + @Nullable + public ExperimentalOtlpFileMetricExporterModel getOtlpFileDevelopment() { + return otlpFileDevelopment; + } + + public PushMetricExporterModel withOtlpFileDevelopment( + ExperimentalOtlpFileMetricExporterModel otlpFileDevelopment) { + this.otlpFileDevelopment = otlpFileDevelopment; + return this; + } + + @JsonProperty("console") + @Nullable + public ConsoleMetricExporterModel getConsole() { + return console; + } + + public PushMetricExporterModel withConsole(ConsoleMetricExporterModel console) { + this.console = console; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, PushMetricExporterPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public PushMetricExporterModel withAdditionalProperty( + String name, PushMetricExporterPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PushMetricExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("otlpHttp"); + sb.append('='); + sb.append(((this.otlpHttp == null) ? "" : this.otlpHttp)); + sb.append(','); + sb.append("otlpGrpc"); + sb.append('='); + sb.append(((this.otlpGrpc == null) ? "" : this.otlpGrpc)); + sb.append(','); + sb.append("otlpFileDevelopment"); + sb.append('='); + sb.append(((this.otlpFileDevelopment == null) ? "" : this.otlpFileDevelopment)); + sb.append(','); + sb.append("console"); + sb.append('='); + sb.append(((this.console == null) ? "" : this.console)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.console == null) ? 0 : this.console.hashCode())); + result = + ((result * 31) + + ((this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode())); + result = ((result * 31) + ((this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PushMetricExporterModel) == false) { + return false; + } + PushMetricExporterModel rhs = ((PushMetricExporterModel) other); + return ((((((this.console == rhs.console) + || ((this.console != null) && this.console.equals(rhs.console))) + && ((this.otlpFileDevelopment == rhs.otlpFileDevelopment) + || ((this.otlpFileDevelopment != null) + && this.otlpFileDevelopment.equals(rhs.otlpFileDevelopment)))) + && ((this.otlpGrpc == rhs.otlpGrpc) + || ((this.otlpGrpc != null) && this.otlpGrpc.equals(rhs.otlpGrpc)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.otlpHttp == rhs.otlpHttp) + || ((this.otlpHttp != null) && this.otlpHttp.equals(rhs.otlpHttp)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java new file mode 100644 index 00000000000..a970972d725 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/PushMetricExporterPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class PushMetricExporterPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public PushMetricExporterPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(PushMetricExporterPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof PushMetricExporterPropertyModel) == false) { + return false; + } + PushMetricExporterPropertyModel rhs = ((PushMetricExporterPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java new file mode 100644 index 00000000000..89bda1df0c9 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ResourceModel.java @@ -0,0 +1,185 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"attributes", "detection/development", "schema_url", "attributes_list"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ResourceModel { + + /** + * Configure resource attributes. Entries have higher priority than entries from + * .resource.attributes_list. If omitted, no resource attributes are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attributes") + @JsonPropertyDescription( + "Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.\nIf omitted, no resource attributes are added.\n") + private List attributes; + + /** (Can be null) */ + @Nullable + @JsonProperty("detection/development") + private ExperimentalResourceDetectionModel detectionDevelopment; + + /** + * Configure resource schema URL. If omitted or null, no schema URL is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("schema_url") + @JsonPropertyDescription( + "Configure resource schema URL.\nIf omitted or null, no schema URL is used.\n") + private String schemaUrl; + + /** + * Configure resource attributes. Entries have lower priority than entries from + * .resource.attributes. The value is a list of comma separated key-value pairs matching the + * format of OTEL_RESOURCE_ATTRIBUTES. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration + * for details. If omitted or null, no resource attributes are added. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attributes_list") + @JsonPropertyDescription( + "Configure resource attributes. Entries have lower priority than entries from .resource.attributes.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_RESOURCE_ATTRIBUTES. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration for details.\nIf omitted or null, no resource attributes are added.\n") + private String attributesList; + + /** + * Configure resource attributes. Entries have higher priority than entries from + * .resource.attributes_list. If omitted, no resource attributes are added. + */ + @JsonProperty("attributes") + @Nullable + public List getAttributes() { + return attributes; + } + + public ResourceModel withAttributes(List attributes) { + this.attributes = attributes; + return this; + } + + @JsonProperty("detection/development") + @Nullable + public ExperimentalResourceDetectionModel getDetectionDevelopment() { + return detectionDevelopment; + } + + public ResourceModel withDetectionDevelopment( + ExperimentalResourceDetectionModel detectionDevelopment) { + this.detectionDevelopment = detectionDevelopment; + return this; + } + + /** Configure resource schema URL. If omitted or null, no schema URL is used. */ + @JsonProperty("schema_url") + @Nullable + public String getSchemaUrl() { + return schemaUrl; + } + + public ResourceModel withSchemaUrl(String schemaUrl) { + this.schemaUrl = schemaUrl; + return this; + } + + /** + * Configure resource attributes. Entries have lower priority than entries from + * .resource.attributes. The value is a list of comma separated key-value pairs matching the + * format of OTEL_RESOURCE_ATTRIBUTES. See + * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration + * for details. If omitted or null, no resource attributes are added. + */ + @JsonProperty("attributes_list") + @Nullable + public String getAttributesList() { + return attributesList; + } + + public ResourceModel withAttributesList(String attributesList) { + this.attributesList = attributesList; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ResourceModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("attributes"); + sb.append('='); + sb.append(((this.attributes == null) ? "" : this.attributes)); + sb.append(','); + sb.append("detectionDevelopment"); + sb.append('='); + sb.append(((this.detectionDevelopment == null) ? "" : this.detectionDevelopment)); + sb.append(','); + sb.append("schemaUrl"); + sb.append('='); + sb.append(((this.schemaUrl == null) ? "" : this.schemaUrl)); + sb.append(','); + sb.append("attributesList"); + sb.append('='); + sb.append(((this.attributesList == null) ? "" : this.attributesList)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.attributes == null) ? 0 : this.attributes.hashCode())); + result = + ((result * 31) + + ((this.detectionDevelopment == null) ? 0 : this.detectionDevelopment.hashCode())); + result = ((result * 31) + ((this.attributesList == null) ? 0 : this.attributesList.hashCode())); + result = ((result * 31) + ((this.schemaUrl == null) ? 0 : this.schemaUrl.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ResourceModel) == false) { + return false; + } + ResourceModel rhs = ((ResourceModel) other); + return (((((this.attributes == rhs.attributes) + || ((this.attributes != null) && this.attributes.equals(rhs.attributes))) + && ((this.detectionDevelopment == rhs.detectionDevelopment) + || ((this.detectionDevelopment != null) + && this.detectionDevelopment.equals(rhs.detectionDevelopment)))) + && ((this.attributesList == rhs.attributesList) + || ((this.attributesList != null) + && this.attributesList.equals(rhs.attributesList)))) + && ((this.schemaUrl == rhs.schemaUrl) + || ((this.schemaUrl != null) && this.schemaUrl.equals(rhs.schemaUrl)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java new file mode 100644 index 00000000000..30ec7e9a202 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerModel.java @@ -0,0 +1,273 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "always_off", + "always_on", + "composite/development", + "jaeger_remote/development", + "parent_based", + "probability/development", + "trace_id_ratio_based" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SamplerModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("always_off") + private AlwaysOffSamplerModel alwaysOff; + + /** (Can be null) */ + @Nullable + @JsonProperty("always_on") + private AlwaysOnSamplerModel alwaysOn; + + /** (Can be null) */ + @Nullable + @JsonProperty("composite/development") + private ExperimentalComposableSamplerModel compositeDevelopment; + + @Nullable + @JsonProperty("jaeger_remote/development") + private ExperimentalJaegerRemoteSamplerModel jaegerRemoteDevelopment; + + /** (Can be null) */ + @Nullable + @JsonProperty("parent_based") + private ParentBasedSamplerModel parentBased; + + /** (Can be null) */ + @Nullable + @JsonProperty("probability/development") + private ExperimentalProbabilitySamplerModel probabilityDevelopment; + + /** (Can be null) */ + @Nullable + @JsonProperty("trace_id_ratio_based") + private TraceIdRatioBasedSamplerModel traceIdRatioBased; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("always_off") + @Nullable + public AlwaysOffSamplerModel getAlwaysOff() { + return alwaysOff; + } + + public SamplerModel withAlwaysOff(AlwaysOffSamplerModel alwaysOff) { + this.alwaysOff = alwaysOff; + return this; + } + + @JsonProperty("always_on") + @Nullable + public AlwaysOnSamplerModel getAlwaysOn() { + return alwaysOn; + } + + public SamplerModel withAlwaysOn(AlwaysOnSamplerModel alwaysOn) { + this.alwaysOn = alwaysOn; + return this; + } + + @JsonProperty("composite/development") + @Nullable + public ExperimentalComposableSamplerModel getCompositeDevelopment() { + return compositeDevelopment; + } + + public SamplerModel withCompositeDevelopment( + ExperimentalComposableSamplerModel compositeDevelopment) { + this.compositeDevelopment = compositeDevelopment; + return this; + } + + @JsonProperty("jaeger_remote/development") + @Nullable + public ExperimentalJaegerRemoteSamplerModel getJaegerRemoteDevelopment() { + return jaegerRemoteDevelopment; + } + + public SamplerModel withJaegerRemoteDevelopment( + ExperimentalJaegerRemoteSamplerModel jaegerRemoteDevelopment) { + this.jaegerRemoteDevelopment = jaegerRemoteDevelopment; + return this; + } + + @JsonProperty("parent_based") + @Nullable + public ParentBasedSamplerModel getParentBased() { + return parentBased; + } + + public SamplerModel withParentBased(ParentBasedSamplerModel parentBased) { + this.parentBased = parentBased; + return this; + } + + @JsonProperty("probability/development") + @Nullable + public ExperimentalProbabilitySamplerModel getProbabilityDevelopment() { + return probabilityDevelopment; + } + + public SamplerModel withProbabilityDevelopment( + ExperimentalProbabilitySamplerModel probabilityDevelopment) { + this.probabilityDevelopment = probabilityDevelopment; + return this; + } + + @JsonProperty("trace_id_ratio_based") + @Nullable + public TraceIdRatioBasedSamplerModel getTraceIdRatioBased() { + return traceIdRatioBased; + } + + public SamplerModel withTraceIdRatioBased(TraceIdRatioBasedSamplerModel traceIdRatioBased) { + this.traceIdRatioBased = traceIdRatioBased; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, SamplerPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public SamplerModel withAdditionalProperty(String name, SamplerPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("alwaysOff"); + sb.append('='); + sb.append(((this.alwaysOff == null) ? "" : this.alwaysOff)); + sb.append(','); + sb.append("alwaysOn"); + sb.append('='); + sb.append(((this.alwaysOn == null) ? "" : this.alwaysOn)); + sb.append(','); + sb.append("compositeDevelopment"); + sb.append('='); + sb.append(((this.compositeDevelopment == null) ? "" : this.compositeDevelopment)); + sb.append(','); + sb.append("jaegerRemoteDevelopment"); + sb.append('='); + sb.append(((this.jaegerRemoteDevelopment == null) ? "" : this.jaegerRemoteDevelopment)); + sb.append(','); + sb.append("parentBased"); + sb.append('='); + sb.append(((this.parentBased == null) ? "" : this.parentBased)); + sb.append(','); + sb.append("probabilityDevelopment"); + sb.append('='); + sb.append(((this.probabilityDevelopment == null) ? "" : this.probabilityDevelopment)); + sb.append(','); + sb.append("traceIdRatioBased"); + sb.append('='); + sb.append(((this.traceIdRatioBased == null) ? "" : this.traceIdRatioBased)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.compositeDevelopment == null) ? 0 : this.compositeDevelopment.hashCode())); + result = + ((result * 31) + + ((this.jaegerRemoteDevelopment == null) + ? 0 + : this.jaegerRemoteDevelopment.hashCode())); + result = + ((result * 31) + + ((this.probabilityDevelopment == null) ? 0 : this.probabilityDevelopment.hashCode())); + result = + ((result * 31) + + ((this.traceIdRatioBased == null) ? 0 : this.traceIdRatioBased.hashCode())); + result = ((result * 31) + ((this.alwaysOff == null) ? 0 : this.alwaysOff.hashCode())); + result = ((result * 31) + ((this.parentBased == null) ? 0 : this.parentBased.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.alwaysOn == null) ? 0 : this.alwaysOn.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SamplerModel) == false) { + return false; + } + SamplerModel rhs = ((SamplerModel) other); + return (((((((((this.compositeDevelopment == rhs.compositeDevelopment) + || ((this.compositeDevelopment != null) + && this.compositeDevelopment.equals( + rhs.compositeDevelopment))) + && ((this.jaegerRemoteDevelopment == rhs.jaegerRemoteDevelopment) + || ((this.jaegerRemoteDevelopment != null) + && this.jaegerRemoteDevelopment.equals( + rhs.jaegerRemoteDevelopment)))) + && ((this.probabilityDevelopment == rhs.probabilityDevelopment) + || ((this.probabilityDevelopment != null) + && this.probabilityDevelopment.equals( + rhs.probabilityDevelopment)))) + && ((this.traceIdRatioBased == rhs.traceIdRatioBased) + || ((this.traceIdRatioBased != null) + && this.traceIdRatioBased.equals(rhs.traceIdRatioBased)))) + && ((this.alwaysOff == rhs.alwaysOff) + || ((this.alwaysOff != null) && this.alwaysOff.equals(rhs.alwaysOff)))) + && ((this.parentBased == rhs.parentBased) + || ((this.parentBased != null) && this.parentBased.equals(rhs.parentBased)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.alwaysOn == rhs.alwaysOn) + || ((this.alwaysOn != null) && this.alwaysOn.equals(rhs.alwaysOn)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java new file mode 100644 index 00000000000..fa3fa34db11 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SamplerPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SamplerPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public SamplerPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SamplerPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SamplerPropertyModel) == false) { + return false; + } + SamplerPropertyModel rhs = ((SamplerPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java new file mode 100644 index 00000000000..75ff8079367 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleLogRecordProcessorModel.java @@ -0,0 +1,76 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"exporter"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SimpleLogRecordProcessorModel { + + /** (Required) */ + @JsonProperty("exporter") + @Nonnull + private LogRecordExporterModel exporter; + + /** (Required) */ + @JsonProperty("exporter") + @Nullable + public LogRecordExporterModel getExporter() { + return exporter; + } + + public SimpleLogRecordProcessorModel withExporter(LogRecordExporterModel exporter) { + this.exporter = exporter; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SimpleLogRecordProcessorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("exporter"); + sb.append('='); + sb.append(((this.exporter == null) ? "" : this.exporter)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SimpleLogRecordProcessorModel) == false) { + return false; + } + SimpleLogRecordProcessorModel rhs = ((SimpleLogRecordProcessorModel) other); + return ((this.exporter == rhs.exporter) + || ((this.exporter != null) && this.exporter.equals(rhs.exporter))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java new file mode 100644 index 00000000000..797b3cac9cf --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SimpleSpanProcessorModel.java @@ -0,0 +1,76 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"exporter"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SimpleSpanProcessorModel { + + /** (Required) */ + @JsonProperty("exporter") + @Nonnull + private SpanExporterModel exporter; + + /** (Required) */ + @JsonProperty("exporter") + @Nullable + public SpanExporterModel getExporter() { + return exporter; + } + + public SimpleSpanProcessorModel withExporter(SpanExporterModel exporter) { + this.exporter = exporter; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SimpleSpanProcessorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("exporter"); + sb.append('='); + sb.append(((this.exporter == null) ? "" : this.exporter)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.exporter == null) ? 0 : this.exporter.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SimpleSpanProcessorModel) == false) { + return false; + } + SimpleSpanProcessorModel rhs = ((SimpleSpanProcessorModel) other); + return ((this.exporter == rhs.exporter) + || ((this.exporter != null) && this.exporter.equals(rhs.exporter))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java new file mode 100644 index 00000000000..079694ccccd --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterModel.java @@ -0,0 +1,181 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"otlp_http", "otlp_grpc", "otlp_file/development", "console"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SpanExporterModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_http") + private OtlpHttpExporterModel otlpHttp; + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_grpc") + private OtlpGrpcExporterModel otlpGrpc; + + /** (Can be null) */ + @Nullable + @JsonProperty("otlp_file/development") + private ExperimentalOtlpFileExporterModel otlpFileDevelopment; + + /** (Can be null) */ + @Nullable + @JsonProperty("console") + private ConsoleExporterModel console; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("otlp_http") + @Nullable + public OtlpHttpExporterModel getOtlpHttp() { + return otlpHttp; + } + + public SpanExporterModel withOtlpHttp(OtlpHttpExporterModel otlpHttp) { + this.otlpHttp = otlpHttp; + return this; + } + + @JsonProperty("otlp_grpc") + @Nullable + public OtlpGrpcExporterModel getOtlpGrpc() { + return otlpGrpc; + } + + public SpanExporterModel withOtlpGrpc(OtlpGrpcExporterModel otlpGrpc) { + this.otlpGrpc = otlpGrpc; + return this; + } + + @JsonProperty("otlp_file/development") + @Nullable + public ExperimentalOtlpFileExporterModel getOtlpFileDevelopment() { + return otlpFileDevelopment; + } + + public SpanExporterModel withOtlpFileDevelopment( + ExperimentalOtlpFileExporterModel otlpFileDevelopment) { + this.otlpFileDevelopment = otlpFileDevelopment; + return this; + } + + @JsonProperty("console") + @Nullable + public ConsoleExporterModel getConsole() { + return console; + } + + public SpanExporterModel withConsole(ConsoleExporterModel console) { + this.console = console; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, SpanExporterPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public SpanExporterModel withAdditionalProperty(String name, SpanExporterPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SpanExporterModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("otlpHttp"); + sb.append('='); + sb.append(((this.otlpHttp == null) ? "" : this.otlpHttp)); + sb.append(','); + sb.append("otlpGrpc"); + sb.append('='); + sb.append(((this.otlpGrpc == null) ? "" : this.otlpGrpc)); + sb.append(','); + sb.append("otlpFileDevelopment"); + sb.append('='); + sb.append(((this.otlpFileDevelopment == null) ? "" : this.otlpFileDevelopment)); + sb.append(','); + sb.append("console"); + sb.append('='); + sb.append(((this.console == null) ? "" : this.console)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.console == null) ? 0 : this.console.hashCode())); + result = + ((result * 31) + + ((this.otlpFileDevelopment == null) ? 0 : this.otlpFileDevelopment.hashCode())); + result = ((result * 31) + ((this.otlpGrpc == null) ? 0 : this.otlpGrpc.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.otlpHttp == null) ? 0 : this.otlpHttp.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SpanExporterModel) == false) { + return false; + } + SpanExporterModel rhs = ((SpanExporterModel) other); + return ((((((this.console == rhs.console) + || ((this.console != null) && this.console.equals(rhs.console))) + && ((this.otlpFileDevelopment == rhs.otlpFileDevelopment) + || ((this.otlpFileDevelopment != null) + && this.otlpFileDevelopment.equals(rhs.otlpFileDevelopment)))) + && ((this.otlpGrpc == rhs.otlpGrpc) + || ((this.otlpGrpc != null) && this.otlpGrpc.equals(rhs.otlpGrpc)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.otlpHttp == rhs.otlpHttp) + || ((this.otlpHttp != null) && this.otlpHttp.equals(rhs.otlpHttp)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java new file mode 100644 index 00000000000..7041a635657 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanExporterPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SpanExporterPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public SpanExporterPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SpanExporterPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SpanExporterPropertyModel) == false) { + return false; + } + SpanExporterPropertyModel rhs = ((SpanExporterPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java new file mode 100644 index 00000000000..153cbf0f1f9 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanKind.java @@ -0,0 +1,54 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; + +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public enum SpanKind { + INTERNAL("internal"), + SERVER("server"), + CLIENT("client"), + PRODUCER("producer"), + CONSUMER("consumer"); + private final String value; + private static final Map CONSTANTS = new HashMap(); + + static { + for (SpanKind c : values()) { + CONSTANTS.put(c.value, c); + } + } + + SpanKind(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static SpanKind fromValue(String value) { + SpanKind constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java new file mode 100644 index 00000000000..848d6efba40 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanLimitsModel.java @@ -0,0 +1,282 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "attribute_value_length_limit", + "attribute_count_limit", + "event_count_limit", + "link_count_limit", + "event_attribute_count_limit", + "link_attribute_count_limit" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SpanLimitsModel { + + /** + * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + * Value must be non-negative. If omitted or null, there is no limit. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attribute_value_length_limit") + @JsonPropertyDescription( + "Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. \nValue must be non-negative.\nIf omitted or null, there is no limit.\n") + private Integer attributeValueLengthLimit; + + /** + * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. Value must be + * non-negative. If omitted or null, 128 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("attribute_count_limit") + @JsonPropertyDescription( + "Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + private Integer attributeCountLimit; + + /** + * Configure max span event count. Value must be non-negative. If omitted or null, 128 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("event_count_limit") + @JsonPropertyDescription( + "Configure max span event count. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + private Integer eventCountLimit; + + /** + * Configure max span link count. Value must be non-negative. If omitted or null, 128 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("link_count_limit") + @JsonPropertyDescription( + "Configure max span link count. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + private Integer linkCountLimit; + + /** + * Configure max attributes per span event. Value must be non-negative. If omitted or null, 128 is + * used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("event_attribute_count_limit") + @JsonPropertyDescription( + "Configure max attributes per span event. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + private Integer eventAttributeCountLimit; + + /** + * Configure max attributes per span link. Value must be non-negative. If omitted or null, 128 is + * used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("link_attribute_count_limit") + @JsonPropertyDescription( + "Configure max attributes per span link. \nValue must be non-negative.\nIf omitted or null, 128 is used.\n") + private Integer linkAttributeCountLimit; + + /** + * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit. + * Value must be non-negative. If omitted or null, there is no limit. + */ + @JsonProperty("attribute_value_length_limit") + @Nullable + public Integer getAttributeValueLengthLimit() { + return attributeValueLengthLimit; + } + + public SpanLimitsModel withAttributeValueLengthLimit(Integer attributeValueLengthLimit) { + this.attributeValueLengthLimit = attributeValueLengthLimit; + return this; + } + + /** + * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. Value must be + * non-negative. If omitted or null, 128 is used. + */ + @JsonProperty("attribute_count_limit") + @Nullable + public Integer getAttributeCountLimit() { + return attributeCountLimit; + } + + public SpanLimitsModel withAttributeCountLimit(Integer attributeCountLimit) { + this.attributeCountLimit = attributeCountLimit; + return this; + } + + /** + * Configure max span event count. Value must be non-negative. If omitted or null, 128 is used. + */ + @JsonProperty("event_count_limit") + @Nullable + public Integer getEventCountLimit() { + return eventCountLimit; + } + + public SpanLimitsModel withEventCountLimit(Integer eventCountLimit) { + this.eventCountLimit = eventCountLimit; + return this; + } + + /** Configure max span link count. Value must be non-negative. If omitted or null, 128 is used. */ + @JsonProperty("link_count_limit") + @Nullable + public Integer getLinkCountLimit() { + return linkCountLimit; + } + + public SpanLimitsModel withLinkCountLimit(Integer linkCountLimit) { + this.linkCountLimit = linkCountLimit; + return this; + } + + /** + * Configure max attributes per span event. Value must be non-negative. If omitted or null, 128 is + * used. + */ + @JsonProperty("event_attribute_count_limit") + @Nullable + public Integer getEventAttributeCountLimit() { + return eventAttributeCountLimit; + } + + public SpanLimitsModel withEventAttributeCountLimit(Integer eventAttributeCountLimit) { + this.eventAttributeCountLimit = eventAttributeCountLimit; + return this; + } + + /** + * Configure max attributes per span link. Value must be non-negative. If omitted or null, 128 is + * used. + */ + @JsonProperty("link_attribute_count_limit") + @Nullable + public Integer getLinkAttributeCountLimit() { + return linkAttributeCountLimit; + } + + public SpanLimitsModel withLinkAttributeCountLimit(Integer linkAttributeCountLimit) { + this.linkAttributeCountLimit = linkAttributeCountLimit; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SpanLimitsModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("attributeValueLengthLimit"); + sb.append('='); + sb.append( + ((this.attributeValueLengthLimit == null) ? "" : this.attributeValueLengthLimit)); + sb.append(','); + sb.append("attributeCountLimit"); + sb.append('='); + sb.append(((this.attributeCountLimit == null) ? "" : this.attributeCountLimit)); + sb.append(','); + sb.append("eventCountLimit"); + sb.append('='); + sb.append(((this.eventCountLimit == null) ? "" : this.eventCountLimit)); + sb.append(','); + sb.append("linkCountLimit"); + sb.append('='); + sb.append(((this.linkCountLimit == null) ? "" : this.linkCountLimit)); + sb.append(','); + sb.append("eventAttributeCountLimit"); + sb.append('='); + sb.append(((this.eventAttributeCountLimit == null) ? "" : this.eventAttributeCountLimit)); + sb.append(','); + sb.append("linkAttributeCountLimit"); + sb.append('='); + sb.append(((this.linkAttributeCountLimit == null) ? "" : this.linkAttributeCountLimit)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.linkAttributeCountLimit == null) + ? 0 + : this.linkAttributeCountLimit.hashCode())); + result = + ((result * 31) + + ((this.eventAttributeCountLimit == null) + ? 0 + : this.eventAttributeCountLimit.hashCode())); + result = + ((result * 31) + + ((this.attributeValueLengthLimit == null) + ? 0 + : this.attributeValueLengthLimit.hashCode())); + result = + ((result * 31) + + ((this.attributeCountLimit == null) ? 0 : this.attributeCountLimit.hashCode())); + result = ((result * 31) + ((this.linkCountLimit == null) ? 0 : this.linkCountLimit.hashCode())); + result = + ((result * 31) + ((this.eventCountLimit == null) ? 0 : this.eventCountLimit.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SpanLimitsModel) == false) { + return false; + } + SpanLimitsModel rhs = ((SpanLimitsModel) other); + return (((((((this.linkAttributeCountLimit == rhs.linkAttributeCountLimit) + || ((this.linkAttributeCountLimit != null) + && this.linkAttributeCountLimit.equals( + rhs.linkAttributeCountLimit))) + && ((this.eventAttributeCountLimit == rhs.eventAttributeCountLimit) + || ((this.eventAttributeCountLimit != null) + && this.eventAttributeCountLimit.equals( + rhs.eventAttributeCountLimit)))) + && ((this.attributeValueLengthLimit == rhs.attributeValueLengthLimit) + || ((this.attributeValueLengthLimit != null) + && this.attributeValueLengthLimit.equals( + rhs.attributeValueLengthLimit)))) + && ((this.attributeCountLimit == rhs.attributeCountLimit) + || ((this.attributeCountLimit != null) + && this.attributeCountLimit.equals(rhs.attributeCountLimit)))) + && ((this.linkCountLimit == rhs.linkCountLimit) + || ((this.linkCountLimit != null) + && this.linkCountLimit.equals(rhs.linkCountLimit)))) + && ((this.eventCountLimit == rhs.eventCountLimit) + || ((this.eventCountLimit != null) + && this.eventCountLimit.equals(rhs.eventCountLimit)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java new file mode 100644 index 00000000000..2b41a5bf052 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorModel.java @@ -0,0 +1,128 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"batch", "simple"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SpanProcessorModel { + + @Nullable + @JsonProperty("batch") + private BatchSpanProcessorModel batch; + + @Nullable + @JsonProperty("simple") + private SimpleSpanProcessorModel simple; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("batch") + @Nullable + public BatchSpanProcessorModel getBatch() { + return batch; + } + + public SpanProcessorModel withBatch(BatchSpanProcessorModel batch) { + this.batch = batch; + return this; + } + + @JsonProperty("simple") + @Nullable + public SimpleSpanProcessorModel getSimple() { + return simple; + } + + public SpanProcessorModel withSimple(SimpleSpanProcessorModel simple) { + this.simple = simple; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, SpanProcessorPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public SpanProcessorModel withAdditionalProperty(String name, SpanProcessorPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SpanProcessorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("batch"); + sb.append('='); + sb.append(((this.batch == null) ? "" : this.batch)); + sb.append(','); + sb.append("simple"); + sb.append('='); + sb.append(((this.simple == null) ? "" : this.simple)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.batch == null) ? 0 : this.batch.hashCode())); + result = ((result * 31) + ((this.simple == null) ? 0 : this.simple.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SpanProcessorModel) == false) { + return false; + } + SpanProcessorModel rhs = ((SpanProcessorModel) other); + return ((((this.batch == rhs.batch) || ((this.batch != null) && this.batch.equals(rhs.batch))) + && ((this.simple == rhs.simple) + || ((this.simple != null) && this.simple.equals(rhs.simple)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java new file mode 100644 index 00000000000..3d30832f452 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SpanProcessorPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SpanProcessorPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public SpanProcessorPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SpanProcessorPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SpanProcessorPropertyModel) == false) { + return false; + } + SpanProcessorPropertyModel rhs = ((SpanProcessorPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java new file mode 100644 index 00000000000..5725de39f09 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/SumAggregationModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class SumAggregationModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SumAggregationModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SumAggregationModel) == false) { + return false; + } + SumAggregationModel rhs = ((SumAggregationModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java new file mode 100644 index 00000000000..ae0d540e0f3 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorModel.java @@ -0,0 +1,177 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"tracecontext", "baggage", "b3", "b3multi"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class TextMapPropagatorModel { + + /** (Can be null) */ + @Nullable + @JsonProperty("tracecontext") + private TraceContextPropagatorModel tracecontext; + + /** (Can be null) */ + @Nullable + @JsonProperty("baggage") + private BaggagePropagatorModel baggage; + + /** (Can be null) */ + @Nullable + @JsonProperty("b3") + private B3PropagatorModel b3; + + /** (Can be null) */ + @Nullable + @JsonProperty("b3multi") + private B3MultiPropagatorModel b3multi; + + @JsonIgnore + private Map additionalProperties = + new LinkedHashMap(); + + @JsonProperty("tracecontext") + @Nullable + public TraceContextPropagatorModel getTracecontext() { + return tracecontext; + } + + public TextMapPropagatorModel withTracecontext(TraceContextPropagatorModel tracecontext) { + this.tracecontext = tracecontext; + return this; + } + + @JsonProperty("baggage") + @Nullable + public BaggagePropagatorModel getBaggage() { + return baggage; + } + + public TextMapPropagatorModel withBaggage(BaggagePropagatorModel baggage) { + this.baggage = baggage; + return this; + } + + @JsonProperty("b3") + @Nullable + public B3PropagatorModel getB3() { + return b3; + } + + public TextMapPropagatorModel withB3(B3PropagatorModel b3) { + this.b3 = b3; + return this; + } + + @JsonProperty("b3multi") + @Nullable + public B3MultiPropagatorModel getB3multi() { + return b3multi; + } + + public TextMapPropagatorModel withB3multi(B3MultiPropagatorModel b3multi) { + this.b3multi = b3multi; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, TextMapPropagatorPropertyModel value) { + this.additionalProperties.put(name, value); + } + + public TextMapPropagatorModel withAdditionalProperty( + String name, TextMapPropagatorPropertyModel value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TextMapPropagatorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("tracecontext"); + sb.append('='); + sb.append(((this.tracecontext == null) ? "" : this.tracecontext)); + sb.append(','); + sb.append("baggage"); + sb.append('='); + sb.append(((this.baggage == null) ? "" : this.baggage)); + sb.append(','); + sb.append("b3"); + sb.append('='); + sb.append(((this.b3 == null) ? "" : this.b3)); + sb.append(','); + sb.append("b3multi"); + sb.append('='); + sb.append(((this.b3multi == null) ? "" : this.b3multi)); + sb.append(','); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.b3multi == null) ? 0 : this.b3multi.hashCode())); + result = ((result * 31) + ((this.b3 == null) ? 0 : this.b3.hashCode())); + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + result = ((result * 31) + ((this.baggage == null) ? 0 : this.baggage.hashCode())); + result = ((result * 31) + ((this.tracecontext == null) ? 0 : this.tracecontext.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TextMapPropagatorModel) == false) { + return false; + } + TextMapPropagatorModel rhs = ((TextMapPropagatorModel) other); + return ((((((this.b3multi == rhs.b3multi) + || ((this.b3multi != null) && this.b3multi.equals(rhs.b3multi))) + && ((this.b3 == rhs.b3) || ((this.b3 != null) && this.b3.equals(rhs.b3)))) + && ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties)))) + && ((this.baggage == rhs.baggage) + || ((this.baggage != null) && this.baggage.equals(rhs.baggage)))) + && ((this.tracecontext == rhs.tracecontext) + || ((this.tracecontext != null) && this.tracecontext.equals(rhs.tracecontext)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java new file mode 100644 index 00000000000..857b9637db2 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TextMapPropagatorPropertyModel.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class TextMapPropagatorPropertyModel { + + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public TextMapPropagatorPropertyModel withAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TextMapPropagatorPropertyModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("additionalProperties"); + sb.append('='); + sb.append(((this.additionalProperties == null) ? "" : this.additionalProperties)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TextMapPropagatorPropertyModel) == false) { + return false; + } + TextMapPropagatorPropertyModel rhs = ((TextMapPropagatorPropertyModel) other); + return ((this.additionalProperties == rhs.additionalProperties) + || ((this.additionalProperties != null) + && this.additionalProperties.equals(rhs.additionalProperties))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java new file mode 100644 index 00000000000..3826aec67bd --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceContextPropagatorModel.java @@ -0,0 +1,50 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class TraceContextPropagatorModel { + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TraceContextPropagatorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TraceContextPropagatorModel) == false) { + return false; + } + TraceContextPropagatorModel rhs = ((TraceContextPropagatorModel) other); + return true; + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java new file mode 100644 index 00000000000..886bbb2e45d --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TraceIdRatioBasedSamplerModel.java @@ -0,0 +1,80 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"ratio"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class TraceIdRatioBasedSamplerModel { + + /** + * Configure trace_id_ratio. If omitted or null, 1.0 is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("ratio") + @JsonPropertyDescription("Configure trace_id_ratio.\nIf omitted or null, 1.0 is used.\n") + private Double ratio; + + /** Configure trace_id_ratio. If omitted or null, 1.0 is used. */ + @JsonProperty("ratio") + @Nullable + public Double getRatio() { + return ratio; + } + + public TraceIdRatioBasedSamplerModel withRatio(Double ratio) { + this.ratio = ratio; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TraceIdRatioBasedSamplerModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("ratio"); + sb.append('='); + sb.append(((this.ratio == null) ? "" : this.ratio)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.ratio == null) ? 0 : this.ratio.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TraceIdRatioBasedSamplerModel) == false) { + return false; + } + TraceIdRatioBasedSamplerModel rhs = ((TraceIdRatioBasedSamplerModel) other); + return ((this.ratio == rhs.ratio) || ((this.ratio != null) && this.ratio.equals(rhs.ratio))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java new file mode 100644 index 00000000000..e8514146730 --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/TracerProviderModel.java @@ -0,0 +1,167 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.List; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"processors", "limits", "sampler", "tracer_configurator/development"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class TracerProviderModel { + + /** + * Configure span processors. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("processors") + @JsonPropertyDescription( + "Configure span processors.\nProperty is required and must be non-null.\n") + @Nonnull + private List processors; + + /** (Can be null) */ + @Nullable + @JsonProperty("limits") + private SpanLimitsModel limits; + + /** (Can be null) */ + @Nullable + @JsonProperty("sampler") + private SamplerModel sampler; + + /** (Can be null) */ + @Nullable + @JsonProperty("tracer_configurator/development") + private ExperimentalTracerConfiguratorModel tracerConfiguratorDevelopment; + + /** + * Configure span processors. Property is required and must be non-null. + * + *

(Required) + */ + @JsonProperty("processors") + @Nullable + public List getProcessors() { + return processors; + } + + public TracerProviderModel withProcessors(List processors) { + this.processors = processors; + return this; + } + + @JsonProperty("limits") + @Nullable + public SpanLimitsModel getLimits() { + return limits; + } + + public TracerProviderModel withLimits(SpanLimitsModel limits) { + this.limits = limits; + return this; + } + + @JsonProperty("sampler") + @Nullable + public SamplerModel getSampler() { + return sampler; + } + + public TracerProviderModel withSampler(SamplerModel sampler) { + this.sampler = sampler; + return this; + } + + @JsonProperty("tracer_configurator/development") + @Nullable + public ExperimentalTracerConfiguratorModel getTracerConfiguratorDevelopment() { + return tracerConfiguratorDevelopment; + } + + public TracerProviderModel withTracerConfiguratorDevelopment( + ExperimentalTracerConfiguratorModel tracerConfiguratorDevelopment) { + this.tracerConfiguratorDevelopment = tracerConfiguratorDevelopment; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(TracerProviderModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("processors"); + sb.append('='); + sb.append(((this.processors == null) ? "" : this.processors)); + sb.append(','); + sb.append("limits"); + sb.append('='); + sb.append(((this.limits == null) ? "" : this.limits)); + sb.append(','); + sb.append("sampler"); + sb.append('='); + sb.append(((this.sampler == null) ? "" : this.sampler)); + sb.append(','); + sb.append("tracerConfiguratorDevelopment"); + sb.append('='); + sb.append( + ((this.tracerConfiguratorDevelopment == null) + ? "" + : this.tracerConfiguratorDevelopment)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = + ((result * 31) + + ((this.tracerConfiguratorDevelopment == null) + ? 0 + : this.tracerConfiguratorDevelopment.hashCode())); + result = ((result * 31) + ((this.processors == null) ? 0 : this.processors.hashCode())); + result = ((result * 31) + ((this.limits == null) ? 0 : this.limits.hashCode())); + result = ((result * 31) + ((this.sampler == null) ? 0 : this.sampler.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof TracerProviderModel) == false) { + return false; + } + TracerProviderModel rhs = ((TracerProviderModel) other); + return (((((this.tracerConfiguratorDevelopment == rhs.tracerConfiguratorDevelopment) + || ((this.tracerConfiguratorDevelopment != null) + && this.tracerConfiguratorDevelopment.equals( + rhs.tracerConfiguratorDevelopment))) + && ((this.processors == rhs.processors) + || ((this.processors != null) && this.processors.equals(rhs.processors)))) + && ((this.limits == rhs.limits) + || ((this.limits != null) && this.limits.equals(rhs.limits)))) + && ((this.sampler == rhs.sampler) + || ((this.sampler != null) && this.sampler.equals(rhs.sampler)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java new file mode 100644 index 00000000000..6f8c0f29c0b --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewModel.java @@ -0,0 +1,100 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"selector", "stream"}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ViewModel { + + /** (Required) */ + @JsonProperty("selector") + @Nonnull + private ViewSelectorModel selector; + + /** (Required) */ + @JsonProperty("stream") + @Nonnull + private ViewStreamModel stream; + + /** (Required) */ + @JsonProperty("selector") + @Nullable + public ViewSelectorModel getSelector() { + return selector; + } + + public ViewModel withSelector(ViewSelectorModel selector) { + this.selector = selector; + return this; + } + + /** (Required) */ + @JsonProperty("stream") + @Nullable + public ViewStreamModel getStream() { + return stream; + } + + public ViewModel withStream(ViewStreamModel stream) { + this.stream = stream; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ViewModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("selector"); + sb.append('='); + sb.append(((this.selector == null) ? "" : this.selector)); + sb.append(','); + sb.append("stream"); + sb.append('='); + sb.append(((this.stream == null) ? "" : this.stream)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.stream == null) ? 0 : this.stream.hashCode())); + result = ((result * 31) + ((this.selector == null) ? 0 : this.selector.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ViewModel) == false) { + return false; + } + ViewModel rhs = ((ViewModel) other); + return (((this.stream == rhs.stream) + || ((this.stream != null) && this.stream.equals(rhs.stream))) + && ((this.selector == rhs.selector) + || ((this.selector != null) && this.selector.equals(rhs.selector)))); + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java new file mode 100644 index 00000000000..df859d3aa1b --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewSelectorModel.java @@ -0,0 +1,292 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "instrument_name", + "instrument_type", + "unit", + "meter_name", + "meter_version", + "meter_schema_url" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ViewSelectorModel { + + /** + * Configure instrument name selection criteria. If omitted or null, all instrument names match. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("instrument_name") + @JsonPropertyDescription( + "Configure instrument name selection criteria.\nIf omitted or null, all instrument names match.\n") + private String instrumentName; + + /** (Can be null) */ + @Nullable + @JsonProperty("instrument_type") + private ViewSelectorModel.InstrumentType instrumentType; + + /** + * Configure the instrument unit selection criteria. If omitted or null, all instrument units + * match. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("unit") + @JsonPropertyDescription( + "Configure the instrument unit selection criteria.\nIf omitted or null, all instrument units match.\n") + private String unit; + + /** + * Configure meter name selection criteria. If omitted or null, all meter names match. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("meter_name") + @JsonPropertyDescription( + "Configure meter name selection criteria.\nIf omitted or null, all meter names match.\n") + private String meterName; + + /** + * Configure meter version selection criteria. If omitted or null, all meter versions match. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("meter_version") + @JsonPropertyDescription( + "Configure meter version selection criteria.\nIf omitted or null, all meter versions match.\n") + private String meterVersion; + + /** + * Configure meter schema url selection criteria. If omitted or null, all meter schema URLs match. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("meter_schema_url") + @JsonPropertyDescription( + "Configure meter schema url selection criteria.\nIf omitted or null, all meter schema URLs match.\n") + private String meterSchemaUrl; + + /** + * Configure instrument name selection criteria. If omitted or null, all instrument names match. + */ + @JsonProperty("instrument_name") + @Nullable + public String getInstrumentName() { + return instrumentName; + } + + public ViewSelectorModel withInstrumentName(String instrumentName) { + this.instrumentName = instrumentName; + return this; + } + + @JsonProperty("instrument_type") + @Nullable + public ViewSelectorModel.InstrumentType getInstrumentType() { + return instrumentType; + } + + public ViewSelectorModel withInstrumentType(ViewSelectorModel.InstrumentType instrumentType) { + this.instrumentType = instrumentType; + return this; + } + + /** + * Configure the instrument unit selection criteria. If omitted or null, all instrument units + * match. + */ + @JsonProperty("unit") + @Nullable + public String getUnit() { + return unit; + } + + public ViewSelectorModel withUnit(String unit) { + this.unit = unit; + return this; + } + + /** Configure meter name selection criteria. If omitted or null, all meter names match. */ + @JsonProperty("meter_name") + @Nullable + public String getMeterName() { + return meterName; + } + + public ViewSelectorModel withMeterName(String meterName) { + this.meterName = meterName; + return this; + } + + /** Configure meter version selection criteria. If omitted or null, all meter versions match. */ + @JsonProperty("meter_version") + @Nullable + public String getMeterVersion() { + return meterVersion; + } + + public ViewSelectorModel withMeterVersion(String meterVersion) { + this.meterVersion = meterVersion; + return this; + } + + /** + * Configure meter schema url selection criteria. If omitted or null, all meter schema URLs match. + */ + @JsonProperty("meter_schema_url") + @Nullable + public String getMeterSchemaUrl() { + return meterSchemaUrl; + } + + public ViewSelectorModel withMeterSchemaUrl(String meterSchemaUrl) { + this.meterSchemaUrl = meterSchemaUrl; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ViewSelectorModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("instrumentName"); + sb.append('='); + sb.append(((this.instrumentName == null) ? "" : this.instrumentName)); + sb.append(','); + sb.append("instrumentType"); + sb.append('='); + sb.append(((this.instrumentType == null) ? "" : this.instrumentType)); + sb.append(','); + sb.append("unit"); + sb.append('='); + sb.append(((this.unit == null) ? "" : this.unit)); + sb.append(','); + sb.append("meterName"); + sb.append('='); + sb.append(((this.meterName == null) ? "" : this.meterName)); + sb.append(','); + sb.append("meterVersion"); + sb.append('='); + sb.append(((this.meterVersion == null) ? "" : this.meterVersion)); + sb.append(','); + sb.append("meterSchemaUrl"); + sb.append('='); + sb.append(((this.meterSchemaUrl == null) ? "" : this.meterSchemaUrl)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.instrumentName == null) ? 0 : this.instrumentName.hashCode())); + result = ((result * 31) + ((this.instrumentType == null) ? 0 : this.instrumentType.hashCode())); + result = ((result * 31) + ((this.unit == null) ? 0 : this.unit.hashCode())); + result = ((result * 31) + ((this.meterSchemaUrl == null) ? 0 : this.meterSchemaUrl.hashCode())); + result = ((result * 31) + ((this.meterName == null) ? 0 : this.meterName.hashCode())); + result = ((result * 31) + ((this.meterVersion == null) ? 0 : this.meterVersion.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ViewSelectorModel) == false) { + return false; + } + ViewSelectorModel rhs = ((ViewSelectorModel) other); + return (((((((this.instrumentName == rhs.instrumentName) + || ((this.instrumentName != null) + && this.instrumentName.equals(rhs.instrumentName))) + && ((this.instrumentType == rhs.instrumentType) + || ((this.instrumentType != null) + && this.instrumentType.equals(rhs.instrumentType)))) + && ((this.unit == rhs.unit) + || ((this.unit != null) && this.unit.equals(rhs.unit)))) + && ((this.meterSchemaUrl == rhs.meterSchemaUrl) + || ((this.meterSchemaUrl != null) + && this.meterSchemaUrl.equals(rhs.meterSchemaUrl)))) + && ((this.meterName == rhs.meterName) + || ((this.meterName != null) && this.meterName.equals(rhs.meterName)))) + && ((this.meterVersion == rhs.meterVersion) + || ((this.meterVersion != null) && this.meterVersion.equals(rhs.meterVersion)))); + } + + @Generated("jsonschema2pojo") + @SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) + public enum InstrumentType { + COUNTER("counter"), + GAUGE("gauge"), + HISTOGRAM("histogram"), + OBSERVABLE_COUNTER("observable_counter"), + OBSERVABLE_GAUGE("observable_gauge"), + OBSERVABLE_UP_DOWN_COUNTER("observable_up_down_counter"), + UP_DOWN_COUNTER("up_down_counter"); + private final String value; + private static final Map CONSTANTS = + new HashMap(); + + static { + for (ViewSelectorModel.InstrumentType c : values()) { + CONSTANTS.put(c.value, c); + } + } + + InstrumentType(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static ViewSelectorModel.InstrumentType fromValue(String value) { + ViewSelectorModel.InstrumentType constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } +} diff --git a/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java new file mode 100644 index 00000000000..e172e91450d --- /dev/null +++ b/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/ViewStreamModel.java @@ -0,0 +1,212 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.autoconfigure.declarativeconfig.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "name", + "description", + "aggregation", + "aggregation_cardinality_limit", + "attribute_keys" +}) +@Generated("jsonschema2pojo") +@SuppressWarnings({"NullAway", "rawtypes", "BoxedPrimitiveEquality"}) +public class ViewStreamModel { + + /** + * Configure metric name of the resulting stream(s). If omitted or null, the instrument's original + * name is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("name") + @JsonPropertyDescription( + "Configure metric name of the resulting stream(s).\nIf omitted or null, the instrument's original name is used.\n") + private String name; + + /** + * Configure metric description of the resulting stream(s). If omitted or null, the instrument's + * origin description is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("description") + @JsonPropertyDescription( + "Configure metric description of the resulting stream(s).\nIf omitted or null, the instrument's origin description is used.\n") + private String description; + + /** (Can be null) */ + @Nullable + @JsonProperty("aggregation") + private AggregationModel aggregation; + + /** + * Configure the aggregation cardinality limit. If omitted or null, the metric reader's default + * cardinality limit is used. + * + *

(Can be null) + */ + @Nullable + @JsonProperty("aggregation_cardinality_limit") + @JsonPropertyDescription( + "Configure the aggregation cardinality limit.\nIf omitted or null, the metric reader's default cardinality limit is used.\n") + private Integer aggregationCardinalityLimit; + + /** (Can be null) */ + @Nullable + @JsonProperty("attribute_keys") + private IncludeExcludeModel attributeKeys; + + /** + * Configure metric name of the resulting stream(s). If omitted or null, the instrument's original + * name is used. + */ + @JsonProperty("name") + @Nullable + public String getName() { + return name; + } + + public ViewStreamModel withName(String name) { + this.name = name; + return this; + } + + /** + * Configure metric description of the resulting stream(s). If omitted or null, the instrument's + * origin description is used. + */ + @JsonProperty("description") + @Nullable + public String getDescription() { + return description; + } + + public ViewStreamModel withDescription(String description) { + this.description = description; + return this; + } + + @JsonProperty("aggregation") + @Nullable + public AggregationModel getAggregation() { + return aggregation; + } + + public ViewStreamModel withAggregation(AggregationModel aggregation) { + this.aggregation = aggregation; + return this; + } + + /** + * Configure the aggregation cardinality limit. If omitted or null, the metric reader's default + * cardinality limit is used. + */ + @JsonProperty("aggregation_cardinality_limit") + @Nullable + public Integer getAggregationCardinalityLimit() { + return aggregationCardinalityLimit; + } + + public ViewStreamModel withAggregationCardinalityLimit(Integer aggregationCardinalityLimit) { + this.aggregationCardinalityLimit = aggregationCardinalityLimit; + return this; + } + + @JsonProperty("attribute_keys") + @Nullable + public IncludeExcludeModel getAttributeKeys() { + return attributeKeys; + } + + public ViewStreamModel withAttributeKeys(IncludeExcludeModel attributeKeys) { + this.attributeKeys = attributeKeys; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ViewStreamModel.class.getName()) + .append('@') + .append(Integer.toHexString(System.identityHashCode(this))) + .append('['); + sb.append("name"); + sb.append('='); + sb.append(((this.name == null) ? "" : this.name)); + sb.append(','); + sb.append("description"); + sb.append('='); + sb.append(((this.description == null) ? "" : this.description)); + sb.append(','); + sb.append("aggregation"); + sb.append('='); + sb.append(((this.aggregation == null) ? "" : this.aggregation)); + sb.append(','); + sb.append("aggregationCardinalityLimit"); + sb.append('='); + sb.append( + ((this.aggregationCardinalityLimit == null) ? "" : this.aggregationCardinalityLimit)); + sb.append(','); + sb.append("attributeKeys"); + sb.append('='); + sb.append(((this.attributeKeys == null) ? "" : this.attributeKeys)); + sb.append(','); + if (sb.charAt((sb.length() - 1)) == ',') { + sb.setCharAt((sb.length() - 1), ']'); + } else { + sb.append(']'); + } + return sb.toString(); + } + + @Override + public int hashCode() { + int result = 1; + result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode())); + result = ((result * 31) + ((this.description == null) ? 0 : this.description.hashCode())); + result = ((result * 31) + ((this.aggregation == null) ? 0 : this.aggregation.hashCode())); + result = ((result * 31) + ((this.attributeKeys == null) ? 0 : this.attributeKeys.hashCode())); + result = + ((result * 31) + + ((this.aggregationCardinalityLimit == null) + ? 0 + : this.aggregationCardinalityLimit.hashCode())); + return result; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof ViewStreamModel) == false) { + return false; + } + ViewStreamModel rhs = ((ViewStreamModel) other); + return ((((((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))) + && ((this.description == rhs.description) + || ((this.description != null) + && this.description.equals(rhs.description)))) + && ((this.aggregation == rhs.aggregation) + || ((this.aggregation != null) && this.aggregation.equals(rhs.aggregation)))) + && ((this.attributeKeys == rhs.attributeKeys) + || ((this.attributeKeys != null) && this.attributeKeys.equals(rhs.attributeKeys)))) + && ((this.aggregationCardinalityLimit == rhs.aggregationCardinalityLimit) + || ((this.aggregationCardinalityLimit != null) + && this.aggregationCardinalityLimit.equals(rhs.aggregationCardinalityLimit)))); + } +}