Skip to content

Commit

Permalink
Improve debug logging when resource name cannot be detected. (#122)
Browse files Browse the repository at this point in the history
This expands log message with discovered labels as well, which makes
debugging 'unknown_resource' errors easier.
  • Loading branch information
knyar authored and jkohen committed May 10, 2019
1 parent 16dfa35 commit e00aaf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion retrieval/series_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func (c *seriesCache) refresh(ctx context.Context, ref uint64) error {
if !ok {
ctx, _ = tag.New(ctx, tag.Insert(keyReason, "unknown_resource"))
stats.Record(ctx, droppedSeries.M(1))
level.Debug(c.logger).Log("msg", "unknown resource", "labels", target.Labels)
level.Debug(c.logger).Log("msg", "unknown resource", "labels", target.Labels, "discovered_labels", target.DiscoveredLabels)
return nil
}
var (
Expand Down

0 comments on commit e00aaf5

Please sign in to comment.