diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 10cf668292..bc280ac8e4 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -44,6 +44,7 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2 * feat(opentelemetry-configuration): parse more parameters from config file [#5955](https://github.com/open-telemetry/opentelemetry-js/pull/5955) @maryliag * feat(exporter-prometheus): support withoutTargetInfo option [#5962](https://github.com/open-telemetry/opentelemetry-js/pull/5962) @cjihrig * feat(opentelemetry-configuration): parse trace provider from config file [#5992](https://github.com/open-telemetry/opentelemetry-js/pull/5992) @maryliag +* feat(opentelemetry-configuration): parse logger provider from config file [#5995](https://github.com/open-telemetry/opentelemetry-js/pull/5995) @maryliag ### :bug: Bug Fixes diff --git a/experimental/packages/opentelemetry-configuration/src/EnvironmentConfigProvider.ts b/experimental/packages/opentelemetry-configuration/src/EnvironmentConfigProvider.ts index 06ac35e55f..46447297cd 100644 --- a/experimental/packages/opentelemetry-configuration/src/EnvironmentConfigProvider.ts +++ b/experimental/packages/opentelemetry-configuration/src/EnvironmentConfigProvider.ts @@ -358,7 +358,7 @@ function setLoggerProvider(config: ConfigurationModel): void { ); if (attributeValueLengthLimit || attributeCountLimit) { if (config.logger_provider == null) { - config.logger_provider = {}; + config.logger_provider = { processors: [] }; } if (config.logger_provider.limits == null) { config.logger_provider.limits = { attribute_count_limit: 128 }; diff --git a/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts b/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts index 9b31cf2ceb..4de69d1a6b 100644 --- a/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts +++ b/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts @@ -17,8 +17,6 @@ import { diagLogLevelFromString, getStringFromEnv } from '@opentelemetry/core'; import { AttributeLimits, - ConfigAttributes, - LoggerProvider, MeterProvider, Propagator, ConfigurationModel, @@ -41,6 +39,8 @@ import { SpanProcessor, TracerProvider, } from './models/tracerProviderModel'; +import { LoggerProvider } from './models/loggerProviderModel'; +import { AttributeNameValue } from './models/resourceModel'; export class FileConfigProvider implements ConfigProvider { private _config: ConfigurationModel; @@ -98,14 +98,14 @@ function parseConfigFile(config: ConfigurationModel) { config.resource = {}; } const attrList = getStringFromConfigFile( - parsedContent['resource']?.['attributes_list'] + parsedContent['resource']['attributes_list'] ); if (attrList) { config.resource.attributes_list = attrList; } const schemaUrl = getStringFromConfigFile( - parsedContent['resource']?.['schema_url'] + parsedContent['resource']['schema_url'] ); if (schemaUrl) { config.resource.schema_url = schemaUrl; @@ -127,7 +127,7 @@ function parseConfigFile(config: ConfigurationModel) { function setResourceAttributes( config: ConfigurationModel, - attributes: ConfigAttributes[] + attributes: AttributeNameValue[] ) { if (attributes) { if (config.resource == null) { @@ -254,7 +254,16 @@ function getConfigHeaders( return null; } -function parseConfigExporter(exporter: SpanExporter): SpanExporter { +enum ProviderType { + TRACER = 0, + METER = 1, + LOGGER = 2, +} + +function parseConfigExporter( + exporter: SpanExporter, + providerType: ProviderType +): SpanExporter { const exporterType = Object.keys(exporter)[0]; let parsedExporter: SpanExporter = {}; let e; @@ -265,15 +274,24 @@ function parseConfigExporter(exporter: SpanExporter): SpanExporter { let headers; let headersList; let insecure; + let endpoint; + + switch (providerType) { + case ProviderType.TRACER: + endpoint = 'http://localhost:4318/v1/traces'; + break; + case ProviderType.LOGGER: + endpoint = 'http://localhost:4318/v1/logs'; + break; + } + switch (exporterType) { case 'otlp_http': e = exporter['otlp_http']; if (e) { parsedExporter = { otlp_http: { - endpoint: - getStringFromConfigFile(e['endpoint']) ?? - 'http://localhost:4318/v1/traces', + endpoint: getStringFromConfigFile(e['endpoint']) ?? endpoint, timeout: getNumberFromConfigFile(e['timeout']) ?? 10000, encoding: getStringFromConfigFile(e['encoding']) === 'json' @@ -460,7 +478,10 @@ function setTracerProvider( if (processorType === 'batch') { const element = tracerProvider['processors'][i]['batch']; if (element) { - const parsedExporter = parseConfigExporter(element['exporter']); + const parsedExporter = parseConfigExporter( + element['exporter'], + ProviderType.TRACER + ); const batchConfig: SpanProcessor = { batch: { schedule_delay: @@ -481,7 +502,10 @@ function setTracerProvider( } else if (processorType === 'simple') { const element = tracerProvider['processors'][i]['simple']; if (element) { - const parsedExporter = parseConfigExporter(element['exporter']); + const parsedExporter = parseConfigExporter( + element['exporter'], + ProviderType.TRACER + ); const simpleConfig: SpanProcessor = { simple: { exporter: parsedExporter, @@ -524,8 +548,9 @@ function setLoggerProvider( ): void { if (loggerProvider) { if (config.logger_provider == null) { - config.logger_provider = {}; + config.logger_provider = { processors: [] }; } + // Limits if (loggerProvider['limits']) { const attributeValueLengthLimit = getNumberFromConfigFile( loggerProvider['limits']['attribute_value_length_limit'] @@ -537,17 +562,124 @@ function setLoggerProvider( if (config.logger_provider.limits == null) { config.logger_provider.limits = { attribute_count_limit: 128 }; } - if (attributeValueLengthLimit) { config.logger_provider.limits.attribute_value_length_limit = attributeValueLengthLimit; } - if (attributeCountLimit) { config.logger_provider.limits.attribute_count_limit = attributeCountLimit; } } } + + // Processors + if (loggerProvider['processors']) { + if (loggerProvider['processors'].length > 0) { + if (config.logger_provider == null) { + config.logger_provider = { processors: [] }; + } + config.logger_provider.processors = []; + for (let i = 0; i < loggerProvider['processors'].length; i++) { + const processorType = Object.keys(loggerProvider['processors'][i])[0]; + if (processorType === 'batch') { + const element = loggerProvider['processors'][i]['batch']; + if (element) { + const parsedExporter = parseConfigExporter( + element['exporter'], + ProviderType.LOGGER + ); + const batchConfig: SpanProcessor = { + batch: { + schedule_delay: + getNumberFromConfigFile(element['schedule_delay']) ?? 1000, + export_timeout: + getNumberFromConfigFile(element['export_timeout']) ?? 30000, + max_queue_size: + getNumberFromConfigFile(element['max_queue_size']) ?? 2048, + max_export_batch_size: + getNumberFromConfigFile(element['max_export_batch_size']) ?? + 512, + exporter: parsedExporter, + }, + }; + + config.logger_provider.processors.push(batchConfig); + } + } else if (processorType === 'simple') { + const element = loggerProvider['processors'][i]['simple']; + if (element) { + const parsedExporter = parseConfigExporter( + element['exporter'], + ProviderType.LOGGER + ); + const simpleConfig: SpanProcessor = { + simple: { + exporter: parsedExporter, + }, + }; + + config.logger_provider.processors.push(simpleConfig); + } + } + } + } + } + + // logger_configurator/development + if (loggerProvider['logger_configurator/development']) { + const defaultConfigDisabled = getBooleanFromConfigFile( + loggerProvider['logger_configurator/development']['default_config']?.[ + 'disabled' + ] + ); + if (defaultConfigDisabled || defaultConfigDisabled === false) { + if (config.logger_provider == null) { + config.logger_provider = { processors: [] }; + } + config.logger_provider['logger_configurator/development'] = { + default_config: { + disabled: defaultConfigDisabled, + }, + }; + } + + if ( + loggerProvider['logger_configurator/development'].loggers && + loggerProvider['logger_configurator/development'].loggers.length > 0 + ) { + const loggers = []; + for ( + let i = 0; + i < loggerProvider['logger_configurator/development'].loggers.length; + i++ + ) { + const logger = + loggerProvider['logger_configurator/development'].loggers[i]; + let disabled = false; + if (logger['config']) { + disabled = + getBooleanFromConfigFile(logger['config']['disabled']) ?? false; + } + const name = getStringFromConfigFile(logger['name']); + if (name) { + loggers.push({ + name: name, + config: { + disabled: disabled, + }, + }); + } + } + if (config.logger_provider == null) { + config.logger_provider = { processors: [] }; + } + if (config.logger_provider['logger_configurator/development'] == null) { + config.logger_provider['logger_configurator/development'] = {}; + } + config.logger_provider['logger_configurator/development'].loggers = + loggers; + } + } } } diff --git a/experimental/packages/opentelemetry-configuration/src/models/commonModel.ts b/experimental/packages/opentelemetry-configuration/src/models/commonModel.ts index d2a0addb3d..55a5553599 100644 --- a/experimental/packages/opentelemetry-configuration/src/models/commonModel.ts +++ b/experimental/packages/opentelemetry-configuration/src/models/commonModel.ts @@ -15,6 +15,26 @@ */ 'use strict'; +export interface IncludeExclude { + /** + * Configure list of attribute key patterns to include from resource detectors. + * Attribute keys from resource detectors are evaluated to match as follows: + * * If the value of the attribute key exactly matches. + * * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + * If omitted, all attributes are included. + */ + include: string[]; + + /** + * Configure list of attribute key patterns to exclude from resource detectors. Applies after .resource.detectors.attributes.included (i.e. excluded has higher priority than included). + * Attribute keys from resource detectors are evaluated to match as follows: + * * If the value of the attribute key exactly matches. + * * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + * If omitted, .included attributes are included. + */ + exclude: string[]; +} + export interface NameStringValuePair { name: string; value: string; diff --git a/experimental/packages/opentelemetry-configuration/src/models/configModel.ts b/experimental/packages/opentelemetry-configuration/src/models/configModel.ts index 8efba5b152..8aa13872ab 100644 --- a/experimental/packages/opentelemetry-configuration/src/models/configModel.ts +++ b/experimental/packages/opentelemetry-configuration/src/models/configModel.ts @@ -16,12 +16,16 @@ 'use strict'; import { DiagLogLevel } from '@opentelemetry/api'; -import { NameStringValuePair, OtlpHttpEncoding } from './commonModel'; +import { NameStringValuePair } from './commonModel'; import { initializeDefaultTracerProviderConfiguration, - SpanProcessor, TracerProvider, } from './tracerProviderModel'; +import { + initializeDefaultLoggerProviderConfiguration, + LoggerProvider, +} from './loggerProviderModel'; +import { Resource } from './resourceModel'; export interface ConfigurationModel { /** @@ -108,76 +112,11 @@ export function initializeDefaultConfiguration(): ConfigurationModel { ], exemplar_filter: 'trace_based', }, - logger_provider: { - processors: [ - { - batch: { - schedule_delay: 1000, - export_timeout: 30000, - max_queue_size: 2048, - max_export_batch_size: 512, - exporter: { - otlp_http: { - endpoint: 'http://localhost:4318/v1/logs', - timeout: 10000, - encoding: OtlpHttpEncoding.protobuf, - }, - }, - }, - }, - ], - limits: { - attribute_count_limit: 128, - }, - }, + logger_provider: initializeDefaultLoggerProviderConfiguration(), }; return config; } - -export interface ConfigAttributes { - name: string; - value: - | string - | boolean - | number - | string[] - | boolean[] - | number[] - | undefined; - type: - | 'string' - | 'bool' - | 'int' - | 'double' - | 'string_array' - | 'bool_array' - | 'int_array' - | 'double_array'; -} - -export interface Resource { - /** - * Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. - * Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used. - * The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. - */ - attributes?: ConfigAttributes[]; - - /** - * 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. - * If omitted or null, no resource attributes are added. - */ - attributes_list?: string; - - /** - * Configure resource schema URL. - * If omitted or null, no schema URL is used. - */ - schema_url?: string; -} - export interface AttributeLimits { /** * Configure max attribute value size. @@ -313,6 +252,7 @@ export interface ConfigPeriodicReader { */ exporter: ConfigMeterExporter; } + export interface ConfigReader { /** * Configure a periodic metric reader. @@ -332,15 +272,3 @@ export interface MeterProvider { */ exemplar_filter?: 'trace_based' | 'always_on' | 'always_off'; } - -export interface LoggerProvider { - /** - * Configure log record processors. - */ - processors?: SpanProcessor[]; - - /** - * Configure log record limits. See also attribute_limits. - */ - limits?: AttributeLimits; -} diff --git a/experimental/packages/opentelemetry-configuration/src/models/loggerProviderModel.ts b/experimental/packages/opentelemetry-configuration/src/models/loggerProviderModel.ts new file mode 100644 index 0000000000..cbb1bd2fe2 --- /dev/null +++ b/experimental/packages/opentelemetry-configuration/src/models/loggerProviderModel.ts @@ -0,0 +1,191 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +import { + OtlpFileExporter, + OtlpGrpcExporter, + OtlpHttpEncoding, + OtlpHttpExporter, +} from './commonModel'; + +export function initializeDefaultLoggerProviderConfiguration(): LoggerProvider { + return { + processors: [ + { + batch: { + schedule_delay: 1000, + export_timeout: 30000, + max_queue_size: 2048, + max_export_batch_size: 512, + exporter: { + otlp_http: { + endpoint: 'http://localhost:4318/v1/logs', + timeout: 10000, + encoding: OtlpHttpEncoding.protobuf, + }, + }, + }, + }, + ], + limits: { + attribute_count_limit: 128, + }, + }; +} + +export interface LoggerProvider { + /** + * Configure log record processors. + */ + processors: LogRecordProcessor[]; + + /** + * Configure log record limits. See also attribute_limits. + */ + limits?: LogRecordLimits; + + /** + * Configure loggers. + * This type is in development and subject to breaking changes in minor versions. + */ + 'logger_configurator/development'?: LoggerConfigurator; +} + +export interface SimpleLogRecordProcessor { + /** + * Configure exporter. + */ + exporter: LogRecordExporter; +} + +export interface BatchLogRecordProcessor { + /** + * Configure delay interval (in milliseconds) between two consecutive exports. + * Value must be non-negative. + * If omitted or null, 1000 is used for traces and 1000 for logs. + */ + schedule_delay?: number; + + /** + * 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. + */ + export_timeout?: number; + + /** + * Configure maximum queue size. Value must be positive. + * If omitted or null, 2048 is used. + */ + max_queue_size?: number; + + /** + * Configure maximum batch size. Value must be positive. + * If omitted or null, 512 is used. + */ + max_export_batch_size?: number; + + /** + * Configure exporter. + */ + exporter: LogRecordExporter; +} + +export interface LogRecordExporter { + /** + * Configure exporter to be OTLP with HTTP transport. + */ + otlp_http?: OtlpHttpExporter; + + /** + * Configure exporter to be OTLP with gRPC transport. + */ + otlp_grpc?: OtlpGrpcExporter; + + /** + * Configure exporter to be OTLP with file transport. + * This type is in development and subject to breaking changes in minor versions. + */ + 'otlp_file/development'?: OtlpFileExporter; + + /** + * Configure exporter to be console. + */ + console?: object; +} + +export interface LogRecordLimits { + /** + * 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. + */ + attribute_value_length_limit?: number; + + /** + * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit. + * Value must be non-negative. + * If omitted or null, 128 is used. + */ + attribute_count_limit?: number; +} + +export interface LogRecordProcessor { + /** + * Configure a batch log record processor. + */ + batch?: BatchLogRecordProcessor; + + /** + * Configure a simple log record processor. + */ + simple?: SimpleLogRecordProcessor; +} + +export interface LoggerConfigurator { + /** + * Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers. + */ + default_config?: LoggerConfig; + + /** + * Configure loggers. + */ + loggers?: LoggerMatcherAndConfig[]; +} + +export interface LoggerConfig { + /** + * Configure if the logger is enabled or not. + */ + disabled: boolean; +} + +export interface LoggerMatcherAndConfig { + /** + * 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. + */ + name?: string; + + /** + * The logger config. + */ + config?: LoggerConfig; +} diff --git a/experimental/packages/opentelemetry-configuration/src/models/resourceModel.ts b/experimental/packages/opentelemetry-configuration/src/models/resourceModel.ts index 911c018826..6646766a50 100644 --- a/experimental/packages/opentelemetry-configuration/src/models/resourceModel.ts +++ b/experimental/packages/opentelemetry-configuration/src/models/resourceModel.ts @@ -14,3 +14,92 @@ * limitations under the License. */ 'use strict'; + +import { IncludeExclude } from './commonModel'; + +export interface Resource { + /** + * Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list. + * Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used. + * The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array. + */ + attributes?: AttributeNameValue[]; + + /** + * 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. + * If omitted or null, no resource attributes are added. + */ + attributes_list?: string; + + /** + * Configure resource schema URL. + * If omitted or null, no schema URL is used. + */ + schema_url?: string; + + /** + * Configure resource detection. + * This type is in development and subject to breaking changes in minor versions. + * If omitted or null, resource detection is disabled. + */ + 'detection/development'?: ResourceDetection; +} + +export interface AttributeNameValue { + name: string; + value: + | string + | boolean + | number + | string[] + | boolean[] + | number[] + | undefined; + type?: + | 'string' + | 'bool' + | 'int' + | 'double' + | 'string_array' + | 'bool_array' + | 'int_array' + | 'double_array'; +} + +export interface ResourceDetection { + /** + * Configure attributes provided by resource detectors. + */ + attributes?: IncludeExclude; + + /** + * Configure resource detectors. + * Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language. + * If omitted or null, no resource detectors are enabled. + */ + detectors?: ResourceDetector; +} + +export interface ResourceDetector { + /** + * Enable the container resource detector, which populates container.* attributes. + */ + container?: object; + + /** + * Enable the host resource detector, which populates host.* and os.* attributes. + */ + host?: object; + + /** + * Enable the process resource detector, which populates process.* attributes. + */ + process?: object; + + /** + * Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME + * environment variable and service.instance.id. + */ + service?: object; +} diff --git a/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts b/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts index b0063b9766..e762bd9194 100644 --- a/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts +++ b/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts @@ -315,7 +315,7 @@ const configFromFile: Configuration = { processors: [ { batch: { - schedule_delay: 1000, + schedule_delay: 5000, export_timeout: 30000, max_queue_size: 2048, max_export_batch_size: 512, @@ -324,15 +324,88 @@ const configFromFile: Configuration = { endpoint: 'http://localhost:4318/v1/logs', timeout: 10000, encoding: OtlpHttpEncoding.protobuf, + certificate_file: '/app/cert.pem', + client_key_file: '/app/cert.pem', + client_certificate_file: '/app/cert.pem', + headers: [{ name: 'api-key', value: '1234' }], + headers_list: 'api-key=1234', + compression: 'gzip', + }, + }, + }, + }, + { + batch: { + schedule_delay: 1000, + export_timeout: 30000, + max_queue_size: 2048, + max_export_batch_size: 512, + exporter: { + otlp_grpc: { + endpoint: 'http://localhost:4317', + timeout: 10000, + certificate_file: '/app/cert.pem', + client_key_file: '/app/cert.pem', + client_certificate_file: '/app/cert.pem', + headers: [{ name: 'api-key', value: '1234' }], + headers_list: 'api-key=1234', + compression: 'gzip', + insecure: false, + }, + }, + }, + }, + { + batch: { + schedule_delay: 1000, + export_timeout: 30000, + max_queue_size: 2048, + max_export_batch_size: 512, + exporter: { + 'otlp_file/development': { + output_stream: 'file:///var/log/logs.jsonl', }, }, }, }, + { + batch: { + schedule_delay: 1000, + export_timeout: 30000, + max_queue_size: 2048, + max_export_batch_size: 512, + exporter: { + 'otlp_file/development': { + output_stream: 'stdout', + }, + }, + }, + }, + { + simple: { + exporter: { + console: {}, + }, + }, + }, ], limits: { attribute_count_limit: 128, attribute_value_length_limit: 4096, }, + 'logger_configurator/development': { + default_config: { + disabled: true, + }, + loggers: [ + { + name: 'io.opentelemetry.contrib.*', + config: { + disabled: false, + }, + }, + ], + }, }, }; @@ -424,6 +497,7 @@ const defaultConfigFromFileWithEnvVariables: Configuration = { endpoint: 'http://localhost:4318/v1/logs', timeout: 10000, encoding: OtlpHttpEncoding.protobuf, + compression: 'gzip', }, }, }, @@ -849,7 +923,8 @@ describe('ConfigProvider', function () { process.env.OTEL_BLRP_EXPORT_TIMEOUT = '24'; process.env.OTEL_BLRP_MAX_QUEUE_SIZE = '25'; process.env.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE = '26'; - process.env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT = 'logs-endpoint'; + process.env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT = + 'http://test.com:4318/v1/logs'; process.env.OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE = 'logs-certificate'; process.env.OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY = 'logs-client-key'; process.env.OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE = @@ -923,6 +998,28 @@ describe('ConfigProvider', function () { attribute_value_length_limit: 28, attribute_count_limit: 29, }, + processors: [ + { + batch: { + export_timeout: 24, + max_export_batch_size: 26, + max_queue_size: 25, + schedule_delay: 23, + exporter: { + otlp_http: { + certificate_file: 'logs-certificate', + client_certificate_file: 'logs-client-certificate', + client_key_file: 'logs-client-key', + compression: 'logs-compression', + encoding: OtlpHttpEncoding.protobuf, + endpoint: 'http://test.com:4318/v1/logs', + headers_list: 'logs-header', + timeout: 27, + }, + }, + }, + }, + ], }, };