File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,10 @@ func NewEnvironmentServiceImpl(environmentRepository repository.EnvironmentRepos
109109func (impl EnvironmentServiceImpl ) GetDataSourceName (bean * bean2.EnvironmentBean ) (* bean2.DataSourceMetaData , error ) {
110110 datasource := & bean2.DataSourceMetaData {}
111111 if bean .DataSourceId == 0 || bean .PrometheusEndpoint == "" {
112- return datasource , fmt .Errorf ("prometheus endpoint not found" )
112+ impl .logger .Debugw ("grafana data source not configured for given" , "dataSourceId" , bean .DataSourceId )
113+ return datasource , nil
113114 } else {
114- impl .logger .Debugw ("environment datasource name " , "datasource" , bean .DataSourceId )
115+ impl .logger .Debugw ("environment datasource" , "datasource" , bean .DataSourceId )
115116 data , err := impl .grafanaClient .GetDatasource (bean .DataSourceId )
116117 if err != nil {
117118 impl .logger .Errorw ("error in fetching datasource" , "err" , err )
You can’t perform that action at this time.
0 commit comments