withServiceDefaults method

DVOpenTelemetryConfig withServiceDefaults({
  1. String? name,
  2. String? version,
})

The same configuration with serviceName and serviceVersion filled in where nothing set them: the build passes the package's own.

Implementation

DVOpenTelemetryConfig withServiceDefaults({String? name, String? version}) =>
    DVOpenTelemetryConfig.parse(<String, Object?>{
      ...toDeclaration(),
      if (serviceName == null && name != null) 'serviceName': name,
      if (serviceVersion == null && version != null) 'serviceVersion': version,
    })._withHeaders(headers);