Skip to content

Commit

Permalink
[receiver/podman] update string to semconv (#8315)
Browse files Browse the repository at this point in the history
Replace hardcoded strings with semconv variables.
  • Loading branch information
Alex Boten committed Mar 7, 2022
1 parent 274e470 commit 6a22c3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/podmanreceiver/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func translateStatsToMetrics(stats *containerStats, ts time.Time, rm pdata.Resou

resource := rm.Resource()
resource.Attributes().InsertString(conventions.AttributeContainerRuntime, "podman")
resource.Attributes().InsertString("container.name", stats.Name)
resource.Attributes().InsertString("container.id", stats.ContainerID)
resource.Attributes().InsertString(conventions.AttributeContainerName, stats.Name)
resource.Attributes().InsertString(conventions.AttributeContainerID, stats.ContainerID)

ms := rm.InstrumentationLibraryMetrics().AppendEmpty().Metrics()
appendIOMetrics(ms, stats, pbts)
Expand Down

0 comments on commit 6a22c3f

Please sign in to comment.