Skip to content

Commit

Permalink
Add check for DB remote service name
Browse files Browse the repository at this point in the history
Should not be null except if we are not able to connect to the DB.
  • Loading branch information
jonatan-ivanov committed Aug 23, 2024
1 parent 7fbbbf2 commit e1b475e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static class DataSourceActuatorConfig {
ObservationFilter tempoServiceGraphFilter() {
// TODO: remove this once Tempo is fixed: https://github.com/grafana/tempo/issues/2212
return context -> {
if (context instanceof DataSourceBaseContext dataSourceContext) {
if (context instanceof DataSourceBaseContext dataSourceContext && dataSourceContext.getRemoteServiceName() != null) {
context.addHighCardinalityKeyValue(KeyValue.of("db.name", dataSourceContext.getRemoteServiceName()));
}
return context;
Expand Down

0 comments on commit e1b475e

Please sign in to comment.